Merge branch 'develop' of https://e.coding.net/jikimo-hn/jikimo_sfs/jikimo_sf into feature/新增工件装夹预调工单任务
# Conflicts: # sf_manufacturing/models/mrp_workorder.py
This commit is contained in:
@@ -50,6 +50,18 @@ class MrpProduction(models.Model):
|
||||
work_state = fields.Char('业务状态')
|
||||
programming_state = fields.Char('编程状态')
|
||||
glb_file = fields.Binary("glb模型文件")
|
||||
production_line_id = fields.Many2one('sf.production.line', string='生产线', compute='_compute_production_line_id',
|
||||
store=True)
|
||||
plan_start_processing_time = fields.Datetime('计划开始加工时间')
|
||||
|
||||
@api.depends('name')
|
||||
def _compute_production_line_id(self):
|
||||
for production in self:
|
||||
if production.name:
|
||||
plan_production = self.env['sf.production.plan'].search([('production_id', '=', self.id)])
|
||||
if plan_production:
|
||||
production.production_line_id = plan_production.production_id.id
|
||||
production.plan_start_processing_time = plan_production.date_planned_start
|
||||
|
||||
@api.depends(
|
||||
'move_raw_ids.state', 'move_raw_ids.quantity_done', 'move_finished_ids.state',
|
||||
@@ -511,7 +523,7 @@ class MrpProduction(models.Model):
|
||||
|
||||
# if completed products make other confirmed/partially_available moves available, assign them
|
||||
done_move_finished_ids = (
|
||||
productions_to_backorder.move_finished_ids | productions_not_to_backorder.move_finished_ids).filtered(
|
||||
productions_to_backorder.move_finished_ids | productions_not_to_backorder.move_finished_ids).filtered(
|
||||
lambda m: m.state == 'done')
|
||||
done_move_finished_ids._trigger_assign()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user