diff --git a/yuthon_hr_employee/models/yuthon_hr_employee.py b/yuthon_hr_employee/models/yuthon_hr_employee.py index 9ac2a1767..3fb0f2327 100644 --- a/yuthon_hr_employee/models/yuthon_hr_employee.py +++ b/yuthon_hr_employee/models/yuthon_hr_employee.py @@ -216,6 +216,7 @@ class YuthonHrEmployee(models.Model): last_month_performance_deduction = fields.Float(string="上月绩效扣款") last_month_commuting_deduction = fields.Float(string='上月通信扣款') last_attendance = fields.Boolean(string="上月全勤", store=True) + last_month_overtime = fields.Float(string="上月加班时数") # 请假记录 done_leave = fields.Float(string='年假') diff --git a/yuthon_stock/models/inherit_stock_picking.py b/yuthon_stock/models/inherit_stock_picking.py index c9745c6ae..e498f509b 100644 --- a/yuthon_stock/models/inherit_stock_picking.py +++ b/yuthon_stock/models/inherit_stock_picking.py @@ -42,7 +42,7 @@ class StockPicking(models.Model): @api.depends('origin') def _compute_origin(self): for record in self: - purchase = self.env['purchase.order'].search([('origin', '=', record.origin)], limit=1) + purchase = self.env['purchase.order'].search([('name', '=', record.origin)], limit=1) if purchase: record.user_id = purchase.user_id.id else: