添加功能
This commit is contained in:
@@ -105,6 +105,16 @@ class YuthonVacationReports(models.Model):
|
||||
)
|
||||
records.write({'vacation_state': 'not_sent'})
|
||||
|
||||
def update_wg_is_confirm(self):
|
||||
records = self.env["yuthon.vacation.reports"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id', self.ids))
|
||||
)
|
||||
for record in records:
|
||||
inherit_vals = {
|
||||
'year_distribution': record.leave,
|
||||
'year_workday': record.working_overtime,
|
||||
}
|
||||
record.write(inherit_vals)
|
||||
|
||||
def write(self, vals):
|
||||
result = super(YuthonVacationReports, self).write(vals)
|
||||
|
||||
@@ -519,6 +519,13 @@
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.update_is_confirm()</field>
|
||||
</record>
|
||||
<record id="all_update_wg_vac" model="ir.actions.server">
|
||||
<field name="name">wg一次性</field>
|
||||
<field name="model_id" ref="yuthon_hr_attendance.model_yuthon_vacation_reports"/>
|
||||
<field name="binding_model_id" ref="yuthon_hr_attendance.model_yuthon_vacation_reports"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.update_wg_is_confirm()</field>
|
||||
</record>
|
||||
<record id="all_update_data" model="ir.actions.server">
|
||||
<field name="name">更新报表</field>
|
||||
<field name="model_id" ref="yuthon_hr_attendance.model_yuthon_vacation_reports"/>
|
||||
|
||||
Reference in New Issue
Block a user