mirror of
https://github.com/bringout/oca-mrp.git
synced 2026-04-27 04:52:05 +02:00
Initial commit: OCA Mrp packages (117 packages)
This commit is contained in:
commit
277e84fd7a
4403 changed files with 395154 additions and 0 deletions
|
|
@ -0,0 +1 @@
|
|||
from . import stock_rule
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
# Copyright 2024 Quartile
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import models
|
||||
|
||||
|
||||
class StockRule(models.Model):
|
||||
_inherit = "stock.rule"
|
||||
|
||||
def _prepare_mo_vals(
|
||||
self,
|
||||
product_id,
|
||||
product_qty,
|
||||
product_uom,
|
||||
location_dest_id,
|
||||
name,
|
||||
origin,
|
||||
company_id,
|
||||
values,
|
||||
bom,
|
||||
):
|
||||
vals = super(StockRule, self)._prepare_mo_vals(
|
||||
product_id,
|
||||
product_qty,
|
||||
product_uom,
|
||||
location_dest_id,
|
||||
name,
|
||||
origin,
|
||||
company_id,
|
||||
values,
|
||||
bom,
|
||||
)
|
||||
move_dest_ids = values.get("move_dest_ids")
|
||||
if move_dest_ids:
|
||||
vals["owner_id"] = move_dest_ids[0].raw_material_production_id.owner_id.id
|
||||
return vals
|
||||
Loading…
Add table
Add a link
Reference in a new issue