Accept Merge Request #973: (feature/制造代码优化 -> develop)

Merge Request: 增加工单处的尺寸赋值

Created By: @马广威
Accepted By: @马广威
URL: https://jikimo-hn.coding.net/p/jikimo_sfs/d/jikimo_sf/git/merge/973?initial=true
This commit is contained in:
马广威
2024-04-25 09:03:56 +08:00
committed by Coding

View File

@@ -715,6 +715,11 @@ class ResMrpWorkOrder(models.Model):
'materiel_width': self.move_raw_ids[0].product_id.width,
'materiel_height': self.move_raw_ids[0].product_id.height
})
self.write({
'material_length': self.move_raw_ids[0].product_id.length,
'material_width': self.move_raw_ids[0].product_id.width,
'material_height': self.move_raw_ids[0].product_id.height
})
self.ensure_one()
if any(not time.date_end for time in self.time_ids.filtered(lambda t: t.user_id.id == self.env.user.id)):