添加功能
This commit is contained in:
@@ -184,6 +184,12 @@ class YuthonVacationReports(models.Model):
|
||||
else:
|
||||
rec.remaining_number_card = 3
|
||||
|
||||
def all_update_line(self):
|
||||
records = self.env["yuthon.vacation.reports"].browse(
|
||||
self._context.get('active_ids', self._context.get('active_id', self.ids))
|
||||
)
|
||||
for rec in records:
|
||||
rec.update_line()
|
||||
|
||||
def update_line(self):
|
||||
self.manage_reject()
|
||||
|
||||
@@ -773,6 +773,13 @@
|
||||
<field name="binding_model_id" ref="yuthon_hr_attendance.model_yuthon_vacation_reports"/>
|
||||
<field name="state">code</field>
|
||||
<field name="code">action = model.update_vacation()</field>
|
||||
</record>
|
||||
<record id="all_update_line" model="ir.actions.server">
|
||||
<field name="name">批量重新计算</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.all_update_line()</field>
|
||||
</record>
|
||||
<record id="all_update_working_overtime" model="ir.actions.server">
|
||||
<field name="name">一次性</field>
|
||||
|
||||
Reference in New Issue
Block a user