mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
* Planned Order release and due date become required. * Add button to Product MRP Area to update MOQ from Supplier Info. * Link Manufacturing Orders with Planned Orders. * Allow Mrp Inventory Procure Wizard to be used from other models. * Make MRP Inventory creation more extensible. * Main Supplier computation (v13 requires explicit False definitions).
36 lines
855 B
Python
36 lines
855 B
Python
# Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
|
|
# - Héctor Villarreal <hector.villarreal@forgeflow.com>
|
|
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
|
|
from odoo import models
|
|
|
|
|
|
class StockRule(models.Model):
|
|
_inherit = "stock.rule"
|
|
|
|
def _prepare_mo_vals(
|
|
self,
|
|
product_id,
|
|
product_qty,
|
|
product_uom,
|
|
location_id,
|
|
name,
|
|
origin,
|
|
company_id,
|
|
values,
|
|
bom,
|
|
):
|
|
res = super()._prepare_mo_vals(
|
|
product_id,
|
|
product_qty,
|
|
product_uom,
|
|
location_id,
|
|
name,
|
|
origin,
|
|
company_id,
|
|
values,
|
|
bom,
|
|
)
|
|
if "planned_order_id" in values:
|
|
res["planned_order_id"] = values["planned_order_id"]
|
|
return res
|