报废新生成的制造订单没关联新采购单
This commit is contained in:
@@ -1495,7 +1495,9 @@ class MrpProduction(models.Model):
|
||||
|
||||
def action_view_purchase_orders(self):
|
||||
self.ensure_one()
|
||||
if self.product_id.product_tmpl_id.single_manufacturing == True:
|
||||
if self.is_remanufacture:
|
||||
production = self
|
||||
elif self.product_id.product_tmpl_id.single_manufacturing == True:
|
||||
production = self.env['mrp.production'].search(
|
||||
[('origin', '=', self.origin), ('product_id', '=', self.product_id.id)], limit=1, order='id asc')
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user