mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[MIG] product_mrp_info: Migration to 14.0
This commit is contained in:
committed by
Héctor Vi Or
parent
cadc98f0d0
commit
b16c3aa749
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "Product MRP Info",
|
"name": "Product MRP Info",
|
||||||
"version": "13.0.1.0.0",
|
"version": "14.0.1.0.0",
|
||||||
"development_status": "Beta",
|
"development_status": "Beta",
|
||||||
"license": "LGPL-3",
|
"license": "LGPL-3",
|
||||||
"author": "ForgeFlow, Odoo Community Association (OCA)",
|
"author": "ForgeFlow, Odoo Community Association (OCA)",
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ class ProductTemplate(models.Model):
|
|||||||
_inherit = "product.template"
|
_inherit = "product.template"
|
||||||
|
|
||||||
mo_count = fields.Integer(
|
mo_count = fields.Integer(
|
||||||
string="# Manufacturing Orders", compute="_compute_mo_count",
|
string="# Manufacturing Orders",
|
||||||
|
compute="_compute_mo_count",
|
||||||
)
|
)
|
||||||
|
|
||||||
def _compute_mo_count(self):
|
def _compute_mo_count(self):
|
||||||
@@ -29,7 +30,9 @@ class ProductTemplate(models.Model):
|
|||||||
|
|
||||||
def action_view_mrp_productions(self):
|
def action_view_mrp_productions(self):
|
||||||
product_ids = self.mapped("product_variant_ids").ids
|
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["domain"] = [("product_id", "in", product_ids)]
|
||||||
action["context"] = {}
|
action["context"] = {}
|
||||||
return action
|
return action
|
||||||
@@ -39,7 +42,8 @@ class ProductProduct(models.Model):
|
|||||||
_inherit = "product.product"
|
_inherit = "product.product"
|
||||||
|
|
||||||
mo_count = fields.Integer(
|
mo_count = fields.Integer(
|
||||||
string="# Manufacturing Orders", compute="_compute_mo_count",
|
string="# Manufacturing Orders",
|
||||||
|
compute="_compute_mo_count",
|
||||||
)
|
)
|
||||||
|
|
||||||
def _compute_mo_count(self):
|
def _compute_mo_count(self):
|
||||||
@@ -54,7 +58,9 @@ class ProductProduct(models.Model):
|
|||||||
|
|
||||||
def action_view_mrp_productions(self):
|
def action_view_mrp_productions(self):
|
||||||
product_ids = self.ids
|
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["domain"] = [("product_id", "in", product_ids)]
|
||||||
action["context"] = {}
|
action["context"] = {}
|
||||||
return action
|
return action
|
||||||
|
|||||||
1
setup/product_mrp_info/odoo/addons/product_mrp_info
Symbolic link
1
setup/product_mrp_info/odoo/addons/product_mrp_info
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
../../../../product_mrp_info
|
||||||
6
setup/product_mrp_info/setup.py
Normal file
6
setup/product_mrp_info/setup.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
import setuptools
|
||||||
|
|
||||||
|
setuptools.setup(
|
||||||
|
setup_requires=['setuptools-odoo'],
|
||||||
|
odoo_addon=True,
|
||||||
|
)
|
||||||
Reference in New Issue
Block a user