diff --git a/rma_sale/__manifest__.py b/rma_sale/__manifest__.py index 4ab4bbee..ab99826d 100644 --- a/rma_sale/__manifest__.py +++ b/rma_sale/__manifest__.py @@ -3,7 +3,7 @@ { "name": "Return Merchandise Authorization Management - Link with Sales", "summary": "Sale Order - Return Merchandise Authorization (RMA)", - "version": "14.0.2.1.0", + "version": "15.0.1.0.0", "development_status": "Production/Stable", "category": "RMA", "website": "https://github.com/OCA/rma", @@ -13,7 +13,6 @@ "depends": ["rma", "sale_stock"], "data": [ "security/ir.model.access.csv", - "views/assets.xml", "views/report_rma.xml", "views/rma_views.xml", "views/sale_views.xml", @@ -21,4 +20,10 @@ "views/res_config_settings_views.xml", "wizard/sale_order_rma_wizard_views.xml", ], + "assets": { + "web.assets_frontend": [ + "/rma_sale/static/src/js/rma_portal_form.js", + "/rma_sale/static/src/scss/rma_sale.scss", + ], + }, } diff --git a/rma_sale/models/rma.py b/rma_sale/models/rma.py index 7446ca2c..0b1bc5d1 100644 --- a/rma_sale/models/rma.py +++ b/rma_sale/models/rma.py @@ -105,8 +105,9 @@ class Rma(models.Model): def _prepare_refund_line(self, line_form): """Add line data""" - super()._prepare_refund_line(line_form) + res = super()._prepare_refund_line(line_form) line = self.sale_line_id if line: line_form.discount = line.discount line_form.sequence = line.sequence + return res diff --git a/rma_sale/models/sale.py b/rma_sale/models/sale.py index 3c15ad7b..609ba13d 100644 --- a/rma_sale/models/sale.py +++ b/rma_sale/models/sale.py @@ -86,13 +86,14 @@ class SaleOrder(models.Model): """Search for possible RMA refunds and link them to the order. We don't want to link their sale lines as that would unbalance the qtys to invoice wich isn't correct for this case""" - super()._get_invoiced() + res = super()._get_invoiced() for order in self: refunds = order.sudo().rma_ids.mapped("refund_id") if not refunds: continue order.invoice_ids += refunds order.invoice_count = len(order.invoice_ids) + return res class SaleOrderLine(models.Model): diff --git a/rma_sale/tests/test_rma_sale.py b/rma_sale/tests/test_rma_sale.py index b49c9d47..54d4a456 100644 --- a/rma_sale/tests/test_rma_sale.py +++ b/rma_sale/tests/test_rma_sale.py @@ -1,10 +1,10 @@ # Copyright 2020 Tecnativa - Ernesto Tejeda # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -from odoo.tests import Form, SavepointCase +from odoo.tests import Form, TransactionCase -class TestRmaSale(SavepointCase): +class TestRmaSale(TransactionCase): @classmethod def setUpClass(cls): super(TestRmaSale, cls).setUpClass() diff --git a/rma_sale/views/assets.xml b/rma_sale/views/assets.xml deleted file mode 100644 index 53633488..00000000 --- a/rma_sale/views/assets.xml +++ /dev/null @@ -1,16 +0,0 @@ - - -