mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[IMP]mrp_multi_level
* let third modules to choose wether to continue exploding or not This is useful for subcontracting and potentially for other flows.
This commit is contained in:
committed by
JasminSForgeFlow
parent
22a4c318a5
commit
64ff10eae0
@@ -259,3 +259,10 @@ class ProductMRPArea(models.Model):
|
||||
|
||||
def action_view_outgoing_stock_moves(self):
|
||||
return self.action_view_stock_moves(self._out_stock_moves_domain())
|
||||
|
||||
def _to_be_exploded(self):
|
||||
self.ensure_one()
|
||||
if self.supply_method == "manufacture":
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
@@ -247,7 +247,7 @@ class MultiLevelMrp(models.TransientModel):
|
||||
planned_order = self.env["mrp.planned.order"].create(order_data)
|
||||
qty_ordered = qty_ordered + qty
|
||||
|
||||
if product_mrp_area_id.supply_method == "manufacture":
|
||||
if product_mrp_area_id._to_be_exploded():
|
||||
self.explode_action(
|
||||
product_mrp_area_id, mrp_action_date, name, qty, planned_order
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user