diff --git a/rma_account/__manifest__.py b/rma_account/__manifest__.py index 05b4e858d..796f2ec92 100644 --- a/rma_account/__manifest__.py +++ b/rma_account/__manifest__.py @@ -3,7 +3,7 @@ { "name": "RMA Account", - "version": "17.0.1.0.0", + "version": "18.0.1.0.0", "license": "LGPL-3", "category": "RMA", "summary": "Integrates RMA with Invoice Processing", diff --git a/rma_account/models/rma_order.py b/rma_account/models/rma_order.py index 1b6f0fab9..6c66a012a 100644 --- a/rma_account/models/rma_order.py +++ b/rma_account/models/rma_order.py @@ -97,23 +97,23 @@ def _prepare_rma_data(self, partner, origin_rma): def action_view_invoice_refund(self): move_ids = self.mapped("rma_line_ids.move_id").ids form_view_ref = self.env.ref("account.view_move_form", False) - tree_view_ref = self.env.ref("account.view_move_tree", False) + list_view_ref = self.env.ref("account.view_move_tree", False) return { "domain": [("id", "in", move_ids)], "name": "Refunds", "res_model": "account.move", - "views": [(tree_view_ref.id, "tree"), (form_view_ref.id, "form")], + "views": [(list_view_ref.id, "list"), (form_view_ref.id, "form")], } def action_view_invoice(self): move_ids = self.mapped("rma_line_ids.move_id").ids form_view_ref = self.env.ref("account.view_move_form", False) - tree_view_ref = self.env.ref("account.view_move_tree", False) + list_view_ref = self.env.ref("account.view_move_tree", False) return { "domain": [("id", "in", move_ids)], "name": "Originating Invoice", "res_model": "account.move", - "views": [(tree_view_ref.id, "tree"), (form_view_ref.id, "form")], + "views": [(list_view_ref.id, "list"), (form_view_ref.id, "form")], } diff --git a/rma_account/models/rma_order_line.py b/rma_account/models/rma_order_line.py index b659cae52..89d9a891a 100644 --- a/rma_account/models/rma_order_line.py +++ b/rma_account/models/rma_order_line.py @@ -281,27 +281,27 @@ def _check_duplicated_lines(self): def action_view_invoice(self): form_view_ref = self.env.ref("account.view_move_form", False) - tree_view_ref = self.env.ref("account.view_move_tree", False) + list_view_ref = self.env.ref("account.view_move_tree", False) return { "domain": [("id", "in", [self.account_move_line_id.move_id.id])], "name": "Originating Invoice", "res_model": "account.move", "type": "ir.actions.act_window", - "views": [(tree_view_ref.id, "tree"), (form_view_ref.id, "form")], + "views": [(list_view_ref.id, "list"), (form_view_ref.id, "form")], } def action_view_refunds(self): moves = self.mapped("refund_line_ids.move_id") form_view_ref = self.env.ref("account.view_move_form", False) - tree_view_ref = self.env.ref("account.view_move_tree", False) + list_view_ref = self.env.ref("account.view_move_tree", False) return { "domain": [("id", "in", moves.ids)], "name": "Refunds", "res_model": "account.move", "type": "ir.actions.act_window", - "views": [(tree_view_ref.id, "tree"), (form_view_ref.id, "form")], + "views": [(list_view_ref.id, "list"), (form_view_ref.id, "form")], } def _compute_display_name(self): diff --git a/rma_account/tests/test_account_move_line_rma_order_line.py b/rma_account/tests/test_account_move_line_rma_order_line.py index f9ee4fead..21a621afa 100644 --- a/rma_account/tests/test_account_move_line_rma_order_line.py +++ b/rma_account/tests/test_account_move_line_rma_order_line.py @@ -87,7 +87,7 @@ def _create_account(cls, acc_type, name, code, company, reconcile=False): "name": name, "code": code, "account_type": acc_type, - "company_id": company.id, + "company_ids": [(4, company.id)], "reconcile": reconcile, } ) @@ -110,7 +110,7 @@ def _create_product(cls): { "name": "test_product", "categ_id": product_ctg.id, - "type": "product", + "is_storable": True, "standard_price": 1.0, "list_price": 1.0, } diff --git a/rma_account/tests/test_rma_account.py b/rma_account/tests/test_rma_account.py index bfc33bb2b..57bb23ff2 100644 --- a/rma_account/tests/test_rma_account.py +++ b/rma_account/tests/test_rma_account.py @@ -3,8 +3,7 @@ from odoo import fields from odoo.fields import Date -from odoo.tests import common -from odoo.tests.common import Form +from odoo.tests import Form, common class TestRmaAccount(common.SingleTransactionCase): @@ -68,7 +67,7 @@ def setUpClass(cls): cls.product_1 = cls.product_obj.create( { "name": "Test Product 1", - "type": "product", + "is_storable": True, "list_price": 100.0, "rma_customer_operation_id": cls.cust_refund_op.id, "rma_supplier_operation_id": cls.sup_refund_op.id, @@ -77,7 +76,7 @@ def setUpClass(cls): cls.product_2 = cls.product_obj.create( { "name": "Test Product 2", - "type": "product", + "is_storable": True, "list_price": 150.0, "rma_customer_operation_id": cls.operation_1.id, "rma_supplier_operation_id": cls.sup_refund_op.id, diff --git a/rma_account/tests/test_rma_stock_account.py b/rma_account/tests/test_rma_stock_account.py index 428f96f22..039ad5fb3 100644 --- a/rma_account/tests/test_rma_stock_account.py +++ b/rma_account/tests/test_rma_stock_account.py @@ -1,7 +1,7 @@ # Copyright 2017-22 ForgeFlow S.L. # License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html) -from odoo.tests.common import Form +from odoo.tests import Form # pylint: disable=odoo-addons-relative-import from odoo.addons.rma.tests.test_rma import TestRma @@ -71,7 +71,7 @@ def _create_account(cls, acc_type, name, code, company, reconcile): "name": name, "code": code, "account_type": acc_type, - "company_id": company.id, + "company_ids": [(4, company.id)], "reconcile": reconcile, } ) diff --git a/rma_account/views/account_move_view.xml b/rma_account/views/account_move_view.xml index 491731f78..1c538794f 100644 --- a/rma_account/views/account_move_view.xml +++ b/rma_account/views/account_move_view.xml @@ -29,13 +29,13 @@ @@ -60,7 +60,7 @@ - + @@ -74,7 +74,7 @@ - rma.order.line [('type','=', 'customer')] {"search_default_to_refund":1} - tree,form + list,form @@ -16,7 +16,7 @@ rma.order.line [('type','=', 'supplier')] {"search_default_to_refund":1, "supplier":1} - tree,form + list,form diff --git a/rma_account/views/rma_operation_view.xml b/rma_account/views/rma_operation_view.xml index 922f52aa8..70f3bb06f 100644 --- a/rma_account/views/rma_operation_view.xml +++ b/rma_account/views/rma_operation_view.xml @@ -1,7 +1,7 @@ - rma.operation.tree + rma.operation.list rma.operation diff --git a/rma_account/views/rma_order_line_view.xml b/rma_account/views/rma_order_line_view.xml index eae0fad9f..e1d8b1935 100644 --- a/rma_account/views/rma_order_line_view.xml +++ b/rma_account/views/rma_order_line_view.xml @@ -34,7 +34,7 @@ string="Origin Inv" > - + + diff --git a/rma_account/views/rma_order_view.xml b/rma_account/views/rma_order_view.xml index 883ad6c05..669785189 100644 --- a/rma_account/views/rma_order_view.xml +++ b/rma_account/views/rma_order_view.xml @@ -29,7 +29,7 @@ - + diff --git a/rma_account/wizards/rma_add_account_move.xml b/rma_account/wizards/rma_add_account_move.xml index 74413fbba..a949d56da 100644 --- a/rma_account/wizards/rma_add_account_move.xml +++ b/rma_account/wizards/rma_add_account_move.xml @@ -14,7 +14,7 @@ name="line_ids" domain="[('move_id.partner_id', '=', partner_id)]" > - + - +
- +
Create Refund rma.refund - tree,form + list,form