diff --git a/sf_manufacturing/models/mrp_workcenter.py b/sf_manufacturing/models/mrp_workcenter.py index ecb29ad7..6af8fc85 100644 --- a/sf_manufacturing/models/mrp_workcenter.py +++ b/sf_manufacturing/models/mrp_workcenter.py @@ -133,11 +133,11 @@ class ResWorkcenter(models.Model): available_machine_number = fields.Integer(string="可用机台数量") single_machine_capacity = fields.Float(string="单台小时产能") production_line_hour_capacity = fields.Float(string="生产线小时产能", readonly=True, - _compute='_compute_production_line_hour_capacity') + _compute='_compute_production_line_hour_capacity', store=True) effective_working_hours_day = fields.Float(string="日有效工作时长", default=0, readonly=True, - _compute='_compute_effective_working_hours_day') + _compute='_compute_effective_working_hours_day', store=True) default_capacity = fields.Float( - '生产线日产能', default=2.0, _compute='_compute_production_line_day_capacity', readonly=True) + '生产线日产能', default=2.0, _compute='_compute_production_line_day_capacity', store=True, readonly=True) # 计算生产线日产能 @api.depends('production_line_hour_capacity', 'effective_working_hours_day')