mirror of
https://github.com/bringout/oca-mrp.git
synced 2026-04-26 08:12:04 +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 mrp_bom
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
# Copyright 2017-20 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class MrpBom(models.Model):
|
||||
_inherit = "mrp.bom"
|
||||
|
||||
location_id = fields.Many2one(string="Location", comodel_name="stock.location")
|
||||
|
||||
@api.onchange("picking_type_id")
|
||||
def _onchange_picking_type_id(self):
|
||||
if self.picking_type_id and self.picking_type_id.default_location_src_id:
|
||||
self.location_id = self.picking_type_id.default_location_src_id
|
||||
|
||||
|
||||
class MrpBomLine(models.Model):
|
||||
_inherit = "mrp.bom.line"
|
||||
|
||||
location_id = fields.Many2one(related="bom_id.location_id", store=True)
|
||||
Loading…
Add table
Add a link
Reference in a new issue