diff --git a/rma_sale_mrp/models/rma.py b/rma_sale_mrp/models/rma.py index 0fbf87b2..870c3fbb 100644 --- a/rma_sale_mrp/models/rma.py +++ b/rma_sale_mrp/models/rma.py @@ -8,7 +8,9 @@ class Rma(models.Model): _inherit = "rma" phantom_bom_product = fields.Many2one( - comodel_name="product.product", string="Related kit product", readonly=True, + comodel_name="product.product", + string="Related kit product", + readonly=True, ) kit_qty = fields.Float( string="Kit quantity", diff --git a/rma_sale_mrp/tests/test_rma_sale_mrp.py b/rma_sale_mrp/tests/test_rma_sale_mrp.py index 9b66d0a5..e207c69e 100644 --- a/rma_sale_mrp/tests/test_rma_sale_mrp.py +++ b/rma_sale_mrp/tests/test_rma_sale_mrp.py @@ -98,10 +98,12 @@ class TestRmaSaleMrp(SavepointCase): self.assertEqual(rma_2.mapped("product_uom"), move_2.mapped("product_uom")) self.assertEqual(rma.state, "confirmed") self.assertEqual( - rma_1.mapped("reception_move_id.origin_returned_move_id"), move_1, + rma_1.mapped("reception_move_id.origin_returned_move_id"), + move_1, ) self.assertEqual( - rma_2.mapped("reception_move_id.origin_returned_move_id"), move_2, + rma_2.mapped("reception_move_id.origin_returned_move_id"), + move_2, ) self.assertEqual( rmas.mapped("reception_move_id.picking_id") diff --git a/rma_sale_mrp/wizard/sale_order_rma_wizard.py b/rma_sale_mrp/wizard/sale_order_rma_wizard.py index 2fcc0247..321907ac 100644 --- a/rma_sale_mrp/wizard/sale_order_rma_wizard.py +++ b/rma_sale_mrp/wizard/sale_order_rma_wizard.py @@ -86,12 +86,16 @@ class SaleOrderRmaWizard(models.TransientModel): class SaleOrderLineRmaWizard(models.TransientModel): _inherit = "sale.order.line.rma.wizard" - phantom_bom_product = fields.Many2one(comodel_name="product.product",) + phantom_bom_product = fields.Many2one( + comodel_name="product.product", + ) kit_qty_done = fields.Float( readonly=True, help="Used to inform kit qty used in the rma. Will be useful to refund", ) - per_kit_quantity = fields.Float(readonly=True,) + per_kit_quantity = fields.Float( + readonly=True, + ) phantom_kit_line = fields.Boolean(readonly=True) @api.depends("picking_id") diff --git a/setup/rma_sale_mrp/odoo/addons/rma_sale_mrp b/setup/rma_sale_mrp/odoo/addons/rma_sale_mrp new file mode 120000 index 00000000..aa7efac9 --- /dev/null +++ b/setup/rma_sale_mrp/odoo/addons/rma_sale_mrp @@ -0,0 +1 @@ +../../../../rma_sale_mrp \ No newline at end of file diff --git a/setup/rma_sale_mrp/setup.py b/setup/rma_sale_mrp/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/rma_sale_mrp/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)