计划排程考虑CNC生产线日产能的优化需求,新增可用机台数量,单台小时产能,日有效工作时长计算规则
This commit is contained in:
@@ -133,11 +133,11 @@ class ResWorkcenter(models.Model):
|
|||||||
available_machine_number = fields.Integer(string="可用机台数量")
|
available_machine_number = fields.Integer(string="可用机台数量")
|
||||||
single_machine_capacity = fields.Float(string="单台小时产能")
|
single_machine_capacity = fields.Float(string="单台小时产能")
|
||||||
production_line_hour_capacity = fields.Float(string="生产线小时产能", readonly=True,
|
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,
|
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_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')
|
@api.depends('production_line_hour_capacity', 'effective_working_hours_day')
|
||||||
|
|||||||
Reference in New Issue
Block a user