@@ -23,7 +23,7 @@
|
||||
<field name="name">soong.workflow.record.tree</field>
|
||||
<field name="model">soong.workflow.record</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="流程查询" action="open_record" delete="false" type="object"
|
||||
<tree string="流程查询" action="open_record" type="object"
|
||||
decoration-muted="approve_state == 'end'"
|
||||
create="false" default_order="write_date2 desc">
|
||||
<field name="code"/>
|
||||
|
||||
@@ -25,11 +25,13 @@ class InheritHrPayslipRun(models.Model):
|
||||
"context": "{'tree_view_ref': 'yuthon_salary.my_hr_payslip_view_tree'}"
|
||||
}
|
||||
|
||||
@api.onchange('document_ids')
|
||||
def _onchange_document_ids(self):
|
||||
for rec in self:
|
||||
if rec.document_ids:
|
||||
rec.run_stage = 'to_be_issued'
|
||||
def write(self, vals):
|
||||
res = super().write(vals)
|
||||
if 'document_ids' in vals:
|
||||
for rec in self:
|
||||
if rec.document_ids:
|
||||
rec.run_stage = 'to_be_issued'
|
||||
return res
|
||||
|
||||
def open_payslip(self):
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user