diff --git a/rma_account/__manifest__.py b/rma_account/__manifest__.py
index 05b4e858..796f2ec9 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 1b6f0fab..6c66a012 100644
--- a/rma_account/models/rma_order.py
+++ b/rma_account/models/rma_order.py
@@ -97,23 +97,23 @@ class RmaOrder(models.Model):
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 b659cae5..89d9a891 100644
--- a/rma_account/models/rma_order_line.py
+++ b/rma_account/models/rma_order_line.py
@@ -281,27 +281,27 @@ class RmaOrderLine(models.Model):
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 f9ee4fea..21a621af 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 @@ class TestAccountMoveLineRmaOrderLine(common.TransactionCase):
"name": name,
"code": code,
"account_type": acc_type,
- "company_id": company.id,
+ "company_ids": [(4, company.id)],
"reconcile": reconcile,
}
)
@@ -110,7 +110,7 @@ class TestAccountMoveLineRmaOrderLine(common.TransactionCase):
{
"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 bfc33bb2..57bb23ff 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 @@ class TestRmaAccount(common.SingleTransactionCase):
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 @@ class TestRmaAccount(common.SingleTransactionCase):
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 428f96f2..039ad5fb 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 @@ class TestRmaStockAccount(TestRma):
"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 491731f7..1c538794 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 922f52aa..70f3bb06 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 eae0fad9..e1d8b193 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 883ad6c0..66978518 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 74413fbb..a949d56d 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)]"
>
-
+
-
+