mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[MIG] Migrated the module mrp_bom_location to v13.
This commit is contained in:
committed by
Don Kendall
parent
679bed1daa
commit
d6a2ca6b20
@@ -7,22 +7,15 @@ from odoo import api, fields, models
|
||||
class MrpBom(models.Model):
|
||||
_inherit = "mrp.bom"
|
||||
|
||||
location_id = fields.Many2one(
|
||||
string='Location',
|
||||
comodel_name='stock.location',
|
||||
)
|
||||
location_id = fields.Many2one(string="Location", comodel_name="stock.location")
|
||||
|
||||
@api.onchange('picking_type_id')
|
||||
@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):
|
||||
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,
|
||||
)
|
||||
location_id = fields.Many2one(related="bom_id.location_id", store=True)
|
||||
|
||||
Reference in New Issue
Block a user