diff --git a/product_mrp_info/__manifest__.py b/product_mrp_info/__manifest__.py index 53ac391f1..8f9d74fd7 100644 --- a/product_mrp_info/__manifest__.py +++ b/product_mrp_info/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Product MRP Info", - "version": "13.0.1.0.0", + "version": "14.0.1.0.0", "development_status": "Beta", "license": "LGPL-3", "author": "ForgeFlow, Odoo Community Association (OCA)", diff --git a/product_mrp_info/models/product.py b/product_mrp_info/models/product.py index b6dab56e1..bdc8257dd 100644 --- a/product_mrp_info/models/product.py +++ b/product_mrp_info/models/product.py @@ -9,7 +9,8 @@ class ProductTemplate(models.Model): _inherit = "product.template" mo_count = fields.Integer( - string="# Manufacturing Orders", compute="_compute_mo_count", + string="# Manufacturing Orders", + compute="_compute_mo_count", ) def _compute_mo_count(self): @@ -29,7 +30,9 @@ class ProductTemplate(models.Model): def action_view_mrp_productions(self): product_ids = self.mapped("product_variant_ids").ids - action = self.env.ref("mrp.act_product_mrp_production").read()[0] + action = self.env["ir.actions.act_window"]._for_xml_id( + "mrp.act_product_mrp_production_workcenter" + ) action["domain"] = [("product_id", "in", product_ids)] action["context"] = {} return action @@ -39,7 +42,8 @@ class ProductProduct(models.Model): _inherit = "product.product" mo_count = fields.Integer( - string="# Manufacturing Orders", compute="_compute_mo_count", + string="# Manufacturing Orders", + compute="_compute_mo_count", ) def _compute_mo_count(self): @@ -54,7 +58,9 @@ class ProductProduct(models.Model): def action_view_mrp_productions(self): product_ids = self.ids - action = self.env.ref("mrp.act_product_mrp_production").read()[0] + action = self.env["ir.actions.act_window"]._for_xml_id( + "mrp.act_product_mrp_production_workcenter" + ) action["domain"] = [("product_id", "in", product_ids)] action["context"] = {} return action diff --git a/setup/product_mrp_info/odoo/addons/product_mrp_info b/setup/product_mrp_info/odoo/addons/product_mrp_info new file mode 120000 index 000000000..9bb8d4565 --- /dev/null +++ b/setup/product_mrp_info/odoo/addons/product_mrp_info @@ -0,0 +1 @@ +../../../../product_mrp_info \ No newline at end of file diff --git a/setup/product_mrp_info/setup.py b/setup/product_mrp_info/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/product_mrp_info/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)