mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[mrp_planned_order_matrix][mig] migrate to 14.0
This commit is contained in:
@@ -1,14 +1,17 @@
|
||||
# Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# Copyright 2019-21 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
{
|
||||
"name": "MRP Planned Order Matrix",
|
||||
"summary": "Allows to create fixed planned orders on a grid view.",
|
||||
"version": "13.0.1.0.0",
|
||||
"version": "14.0.1.0.0",
|
||||
"author": "ForgeFlow, Odoo Community Association (OCA)",
|
||||
"website": "https://github.com/OCA/manufacture",
|
||||
"category": "Warehouse Management",
|
||||
"depends": ["mrp_multi_level", "web_widget_x2many_2d_matrix", "date_range"],
|
||||
"data": ["wizards/mrp_planned_order_wizard_view.xml"],
|
||||
"data": [
|
||||
"security/ir.model.access.csv",
|
||||
"wizards/mrp_planned_order_wizard_view.xml",
|
||||
],
|
||||
"license": "AGPL-3",
|
||||
"installable": True,
|
||||
}
|
||||
|
||||
4
mrp_planned_order_matrix/security/ir.model.access.csv
Normal file
4
mrp_planned_order_matrix/security/ir.model.access.csv
Normal file
@@ -0,0 +1,4 @@
|
||||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_mrp_planned_order_wizard,mrp.planned.order.wizard user,model_mrp_planned_order_wizard,mrp.group_mrp_user,1,1,1,1
|
||||
access_mrp_planned_order_sheet,mrp.planned.order.sheet user,model_mrp_planned_order_sheet,mrp.group_mrp_user,1,1,1,1
|
||||
access_mrp_planned_order_sheet_line,mrp.planned.order.sheet.line user,model_mrp_planned_order_sheet_line,mrp.group_mrp_user,1,1,1,1
|
||||
|
@@ -1,3 +1 @@
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from . import test_mrp_planned_order_matrix
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# Copyright 2020-21 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
|
||||
|
||||
from dateutil.rrule import MONTHLY
|
||||
@@ -54,7 +54,9 @@ class TestMrpPlannedOrderMatrix(TestMrpMultiLevelCommon):
|
||||
sheets = self.env["mrp.planned.order.sheet"].search([])
|
||||
for sheet in sheets:
|
||||
self.assertEqual(
|
||||
len(sheet.line_ids), 12, "There should be 12 lines.",
|
||||
len(sheet.line_ids),
|
||||
12,
|
||||
"There should be 12 lines.",
|
||||
)
|
||||
self.assertEqual(
|
||||
fields.Date.to_string(sheet.date_start),
|
||||
@@ -92,7 +94,9 @@ class TestMrpPlannedOrderMatrix(TestMrpMultiLevelCommon):
|
||||
"The product does not match in the estimate",
|
||||
)
|
||||
self.assertEqual(
|
||||
planned_order.product_qty, 1, "The product qty does not match",
|
||||
planned_order.product_qty,
|
||||
1,
|
||||
"The product qty does not match",
|
||||
)
|
||||
mrp_planned_orders = self.env["mrp.planned.order"].search(
|
||||
[("product_mrp_area_id", "=", self.product_mrp_area_1.id)]
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2020 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# Copyright 2020-21 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# - Jordi Ballester Alomar <jordi.ballester@forgeflow.com>
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
from datetime import timedelta
|
||||
@@ -17,7 +17,9 @@ class MrpPlannedOrderWizard(models.TransientModel):
|
||||
date_start = fields.Date(string="Date From", required=True)
|
||||
date_end = fields.Date(string="Date To", required=True)
|
||||
date_range_type_id = fields.Many2one(
|
||||
string="Date Range Type", comodel_name="date.range.type", required=True,
|
||||
string="Date Range Type",
|
||||
comodel_name="date.range.type",
|
||||
required=True,
|
||||
)
|
||||
product_mrp_area_ids = fields.Many2many(
|
||||
string="Product Parameters", comodel_name="product.mrp.area", required=True
|
||||
@@ -67,7 +69,9 @@ class MprPlannedOrderSheet(models.TransientModel):
|
||||
date_start = fields.Date(string="Date From", readonly=True)
|
||||
date_end = fields.Date(string="Date to", readonly=True)
|
||||
date_range_type_id = fields.Many2one(
|
||||
string="Date Range Type", comodel_name="date.range.type", readonly=True,
|
||||
string="Date Range Type",
|
||||
comodel_name="date.range.type",
|
||||
readonly=True,
|
||||
)
|
||||
product_mrp_area_ids = fields.Many2many(
|
||||
string="Product Parameters", comodel_name="product.mrp.area"
|
||||
@@ -218,7 +222,10 @@ class MprPlannedOrderSheetLine(models.TransientModel):
|
||||
product_mrp_area_id = fields.Many2one(
|
||||
string="Product Parameters", comodel_name="product.mrp.area"
|
||||
)
|
||||
date_range_id = fields.Many2one(comodel_name="date.range", string="Date Range",)
|
||||
date_range_id = fields.Many2one(
|
||||
comodel_name="date.range",
|
||||
string="Date Range",
|
||||
)
|
||||
value_x = fields.Char(string="Period")
|
||||
value_y = fields.Char(string="Product")
|
||||
product_qty = fields.Float(string="Quantity", digits="Product UoM")
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
../../../../mrp_planned_order_matrix
|
||||
6
setup/mrp_planned_order_matrix/setup.py
Normal file
6
setup/mrp_planned_order_matrix/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