diff --git a/yuthon_purchase/models/inherit_purchase_order.py b/yuthon_purchase/models/inherit_purchase_order.py index 8fe8f2e63..571aba687 100644 --- a/yuthon_purchase/models/inherit_purchase_order.py +++ b/yuthon_purchase/models/inherit_purchase_order.py @@ -12,8 +12,6 @@ class PurchaseOrder(models.Model): company_id = fields.Many2one('res.company', string="公司", default=lambda self: self.env.company) user_id = fields.Many2one('res.users', string="申请人", default=lambda self: self.env.user) department_id = fields.Many2one(related='user_id.employee_id.department_id', string="部门") - date_order = fields.Datetime(string="订单日期") - date_planned = fields.Datetime(string="预计到货日期") start_date = fields.Date(string="申请日期", default=fields.Date.today) reason_text = fields.Text(string='申请事由') document_ids = fields.Many2many('ir.attachment', string="附件") diff --git a/yuthon_salary/models/inherit_hr_payslip.py b/yuthon_salary/models/inherit_hr_payslip.py index c892bbbd2..8ac68a050 100644 --- a/yuthon_salary/models/inherit_hr_payslip.py +++ b/yuthon_salary/models/inherit_hr_payslip.py @@ -131,7 +131,10 @@ class InheritHrPayslip(models.Model): def action_refresh_from_work_entries(self): payslip_records = self.browse(self._context.get('active_ids', self._context.get('active_id'))) - for rec in payslip_records: + payslips = payslip_records.filtered( + lambda slip: slip.employee_id.name != '王鸿怡' + ) + for rec in payslips: rec.compute_sheet() @api.onchange('employee_id')