mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
Add dependency to mrp_hook
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
"license": "AGPL-3",
|
||||
"application": False,
|
||||
"installable": True,
|
||||
"depends": ["mrp", "stock_available_unreserved"],
|
||||
"depends": ["mrp", "stock_available_unreserved", "mrp_hook"],
|
||||
"data": [
|
||||
"security/mrp_production_request_security.xml",
|
||||
"security/ir.model.access.csv",
|
||||
|
||||
@@ -27,14 +27,13 @@ class MrpProductionRequestCreateMo(models.TransientModel):
|
||||
(workcenter_lines) needed for manufacturing the given a BoM.
|
||||
:return: product_lines, workcenter_lines
|
||||
"""
|
||||
bom_obj = self.env['mrp.bom']
|
||||
uom_obj = self.env['product.uom']
|
||||
bom_point = self.bom_id
|
||||
factor = uom_obj._compute_qty(
|
||||
self.mrp_production_request_id.product_uom.id, self.pending_qty,
|
||||
bom_point.product_uom.id)
|
||||
return bom_obj._bom_explode(
|
||||
bom_point, self.mrp_production_request_id.product_id,
|
||||
return bom_point._bom_explode(
|
||||
self.mrp_production_request_id.product_id,
|
||||
factor / bom_point.product_qty,
|
||||
routing_id=self.mrp_production_request_id.routing_id.id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user