mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[IMP] mrp_multi_level: Add MRP Planner
For each MRP Parameter or for each Product in a MRP Area, we will be able to add a MRP Planner. Once this planner is set, he can filter himself in the MRP Parameters view, MRP Inventory view or MRP Planned Orders view.
This commit is contained in:
committed by
JasminSForgeFlow
parent
3800400d1c
commit
d4de93f79a
@@ -71,6 +71,11 @@ class MrpInventory(models.Model):
|
||||
readonly=True,
|
||||
store=True,
|
||||
)
|
||||
mrp_planner_id = fields.Many2one(
|
||||
related="product_mrp_area_id.mrp_planner_id",
|
||||
readonly=True,
|
||||
store=True,
|
||||
)
|
||||
|
||||
def _compute_uom_id(self):
|
||||
for rec in self:
|
||||
|
||||
@@ -76,6 +76,11 @@ class MrpPlannedOrder(models.Model):
|
||||
"mrp.production", "planned_order_id", string="Manufacturing Orders"
|
||||
)
|
||||
mo_count = fields.Integer(compute="_compute_mrp_production_count")
|
||||
mrp_planner_id = fields.Many2one(
|
||||
related="product_mrp_area_id.mrp_planner_id",
|
||||
readonly=True,
|
||||
store=True,
|
||||
)
|
||||
|
||||
def _compute_mrp_production_count(self):
|
||||
for rec in self:
|
||||
|
||||
@@ -97,6 +97,7 @@ class ProductMRPArea(models.Model):
|
||||
inverse_name="product_mrp_area_id",
|
||||
readonly=True,
|
||||
)
|
||||
mrp_planner_id = fields.Many2one("res.users")
|
||||
|
||||
_sql_constraints = [
|
||||
(
|
||||
|
||||
Reference in New Issue
Block a user