From 9d69ae88a745584e5f3a17af621ad3621412f70f Mon Sep 17 00:00:00 2001 From: Jared Kipe Date: Wed, 1 Jun 2022 19:29:57 +0000 Subject: [PATCH] [MIG] mrp_bom_add: to 15.0 --- mrp_bom_add/__manifest__.py | 4 ++-- mrp_bom_add/security/ir.model.access.csv | 2 ++ mrp_bom_add/tests/test_mrp_bom_add.py | 4 ++-- mrp_bom_add/wizard/mrp_bom_add.py | 3 --- mrp_bom_add/wizard/mrp_bom_add_views.xml | 2 -- 5 files changed, 6 insertions(+), 9 deletions(-) create mode 100644 mrp_bom_add/security/ir.model.access.csv diff --git a/mrp_bom_add/__manifest__.py b/mrp_bom_add/__manifest__.py index 2a9021ca..5c79f1aa 100755 --- a/mrp_bom_add/__manifest__.py +++ b/mrp_bom_add/__manifest__.py @@ -2,7 +2,7 @@ 'name': 'BoM Mass Add', 'author': 'Hibou Corp. ', 'category': 'Hidden', - 'version': '13.0.1.1.0', + 'version': '15.0.1.0.0', 'description': """ Bill of Materials Mass Component Adder @@ -18,10 +18,10 @@ to allow you to quickly re-configure qty or operation for bulk products. """, 'depends': [ 'mrp', - 'sale', ], 'auto_install': False, 'data': [ + 'security/ir.model.access.csv', 'wizard/mrp_bom_add_views.xml', ], } diff --git a/mrp_bom_add/security/ir.model.access.csv b/mrp_bom_add/security/ir.model.access.csv new file mode 100644 index 00000000..bf7d46d3 --- /dev/null +++ b/mrp_bom_add/security/ir.model.access.csv @@ -0,0 +1,2 @@ +"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" +"access_mrp_bom_add","access mrp.bom.add","mrp_bom_add.model_mrp_bom_add","base.group_user",1,1,1,1 diff --git a/mrp_bom_add/tests/test_mrp_bom_add.py b/mrp_bom_add/tests/test_mrp_bom_add.py index 5b60917f..631862ff 100644 --- a/mrp_bom_add/tests/test_mrp_bom_add.py +++ b/mrp_bom_add/tests/test_mrp_bom_add.py @@ -8,7 +8,7 @@ class TestMRPBOMAdd(TransactionCase): self.attr1 = self.env['product.attribute'].create({ 'name': 'Test Attr1', 'create_variant': 'always', - 'type': 'radio', + 'display_type': 'radio', }) self.attr1_val1 = self.env['product.attribute.value'].create({ 'attribute_id': self.attr1.id, @@ -22,7 +22,7 @@ class TestMRPBOMAdd(TransactionCase): self.attr2 = self.env['product.attribute'].create({ 'name': 'Test Attr2', 'create_variant': 'always', - 'type': 'radio', + 'display_type': 'radio', }) self.attr2_val1 = self.env['product.attribute.value'].create({ 'attribute_id': self.attr2.id, diff --git a/mrp_bom_add/wizard/mrp_bom_add.py b/mrp_bom_add/wizard/mrp_bom_add.py index 64a26bc8..a7743cda 100644 --- a/mrp_bom_add/wizard/mrp_bom_add.py +++ b/mrp_bom_add/wizard/mrp_bom_add.py @@ -18,8 +18,6 @@ class ProgramOutputView(models.TransientModel): compute='_compute_variant_count') product_qty = fields.Float(string='Quantity to Consume', default=1.0) product_uom_id = fields.Many2one('uom.uom', string='Consume Unit of Measure') - bom_routing_id = fields.Many2one('mrp.routing', related='bom_id.routing_id') - operation_id = fields.Many2one('mrp.routing.workcenter', 'Consume in Operation') @api.depends('product_tmpl_id', 'limit_possible') def _compute_variant_count(self): @@ -81,6 +79,5 @@ class ProgramOutputView(models.TransientModel): 'product_uom_id': self.product_uom_id.id, 'bom_product_template_attribute_value_ids': [(4, a.id, 0) for a in bom_product_template_attribute_value_ids], - 'operation_id': self.operation_id.id, })) self.bom_id.write({'bom_line_ids': lines}) diff --git a/mrp_bom_add/wizard/mrp_bom_add_views.xml b/mrp_bom_add/wizard/mrp_bom_add_views.xml index f56037b3..123d090a 100644 --- a/mrp_bom_add/wizard/mrp_bom_add_views.xml +++ b/mrp_bom_add/wizard/mrp_bom_add_views.xml @@ -10,7 +10,6 @@ - @@ -20,7 +19,6 @@ -