mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[13.0][MIG] mrp_multi_level
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
# Copyright 2018 Eficent Business and IT Consulting Services S.L.
|
||||
# Copyright 2018-19 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
|
||||
|
||||
import ast
|
||||
|
||||
from odoo import api, fields, models
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ProductTemplate(models.Model):
|
||||
@@ -19,12 +20,10 @@ class ProductTemplate(models.Model):
|
||||
compute="_compute_mrp_area_count",
|
||||
)
|
||||
|
||||
@api.multi
|
||||
def _compute_mrp_area_count(self):
|
||||
for rec in self:
|
||||
rec.mrp_area_count = len(rec.mrp_area_ids)
|
||||
|
||||
@api.multi
|
||||
def action_view_mrp_area_parameters(self):
|
||||
self.ensure_one()
|
||||
action = self.env.ref("mrp_multi_level.product_mrp_area_action")
|
||||
|
||||
Reference in New Issue
Block a user