mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
add support for multi-company
This commit is contained in:
committed by
Lois Rilo
parent
f5483cb563
commit
69c6fa901d
@@ -16,6 +16,11 @@ class MrpArea(models.Model):
|
||||
comodel_name='stock.warehouse', string='Warehouse',
|
||||
required=True,
|
||||
)
|
||||
company_id = fields.Many2one(
|
||||
comodel_name='res.company',
|
||||
related='warehouse_id.company_id',
|
||||
store=True,
|
||||
)
|
||||
location_id = fields.Many2one(
|
||||
comodel_name='stock.location', string='Location',
|
||||
required=True,
|
||||
|
||||
@@ -28,6 +28,11 @@ class MrpInventory(models.Model):
|
||||
index=True,
|
||||
required=True,
|
||||
)
|
||||
company_id = fields.Many2one(
|
||||
comodel_name='res.company',
|
||||
related='product_mrp_area_id.mrp_area_id.warehouse_id.company_id',
|
||||
store=True,
|
||||
)
|
||||
product_id = fields.Many2one(
|
||||
comodel_name='product.product',
|
||||
related='product_mrp_area_id.product_id',
|
||||
|
||||
@@ -25,6 +25,11 @@ class MrpMove(models.Model):
|
||||
store=True,
|
||||
index=True,
|
||||
)
|
||||
company_id = fields.Many2one(
|
||||
comodel_name='res.company',
|
||||
related='product_mrp_area_id.mrp_area_id.warehouse_id.company_id',
|
||||
store=True,
|
||||
)
|
||||
product_id = fields.Many2one(
|
||||
comodel_name='product.product',
|
||||
related='product_mrp_area_id.product_id',
|
||||
|
||||
@@ -25,6 +25,11 @@ class MrpPlannedOrder(models.Model):
|
||||
index=True,
|
||||
readonly=True,
|
||||
)
|
||||
company_id = fields.Many2one(
|
||||
comodel_name='res.company',
|
||||
related='product_mrp_area_id.mrp_area_id.warehouse_id.company_id',
|
||||
store=True,
|
||||
)
|
||||
product_id = fields.Many2one(
|
||||
comodel_name="product.product",
|
||||
related="product_mrp_area_id.product_id",
|
||||
|
||||
@@ -19,6 +19,11 @@ class ProductMRPArea(models.Model):
|
||||
comodel_name='mrp.area',
|
||||
required=True,
|
||||
)
|
||||
company_id = fields.Many2one(
|
||||
comodel_name='res.company',
|
||||
related='mrp_area_id.warehouse_id.company_id',
|
||||
store=True,
|
||||
)
|
||||
product_id = fields.Many2one(
|
||||
comodel_name='product.product',
|
||||
required=True,
|
||||
|
||||
Reference in New Issue
Block a user