销售和产品代码整合
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
|
||||
class MrpProduction(models.Model):
|
||||
_inherit = 'mrp.production'
|
||||
_description = "制造订单"
|
||||
@@ -69,7 +70,7 @@ class MrpProduction(models.Model):
|
||||
# 则根据设备找到工作中心;否则采用前面描述的工作中心分配机制;
|
||||
# 其他规则限制: 默认只分配给工作中心状态为非故障的工作中心;
|
||||
|
||||
def _create_workorder(self):
|
||||
def _create_workorder3(self):
|
||||
for production in self:
|
||||
if not production.bom_id or not production.product_id:
|
||||
continue
|
||||
@@ -214,6 +215,6 @@ class MrpProduction(models.Model):
|
||||
current_sequence += 1
|
||||
|
||||
def _create_workorder(self):
|
||||
res = super()._create_workorder()
|
||||
res = self._create_workorder3()
|
||||
self._reset_work_order_sequence()
|
||||
return res
|
||||
|
||||
Reference in New Issue
Block a user