diff --git a/rma_account_unreconciled/__manifest__.py b/rma_account_unreconciled/__manifest__.py index c64901a4..54564ab1 100644 --- a/rma_account_unreconciled/__manifest__.py +++ b/rma_account_unreconciled/__manifest__.py @@ -3,13 +3,13 @@ { "name": "RMA Account Unreconcile", - "version": "14.0.1.0.0", + "version": "16.0.1.0.0", "license": "AGPL-3", "category": "RMA", "summary": "Integrates RMA with Invoice Processing", "author": "ForgeFlow", "website": "https://github.com/ForgeFlow/stock-rma", - "depends": ["account_move_line_rma_order_line", "rma"], + "depends": ["account_move_line_rma_order_line", "rma", "account_reconcile_oca"], "data": [ "views/rma_line_view.xml", ], diff --git a/rma_account_unreconciled/models/rma_line.py b/rma_account_unreconciled/models/rma_line.py index 3e37d23f..d0b7ae59 100644 --- a/rma_account_unreconciled/models/rma_line.py +++ b/rma_account_unreconciled/models/rma_line.py @@ -84,8 +84,10 @@ class RmaOrderLine(models.Model): "active_model": "account.move.line", "active_ids": amls.ids, } - return { - "type": "ir.actions.client", - "tag": "manual_reconciliation_view", - "context": action_context, - } + action_def = self.env["ir.actions.act_window"]._for_xml_id( + "account_reconcile_oca.account_account_reconcile_act_window" + ) + action_def["context"] = action_context + action_def["domain"] = [("id", "in", amls.ids)] + action_def["context"]["default_account_move_lines"] = amls.ids + return action_def diff --git a/rma_account_unreconciled/readme/DESCRIPTION.rst b/rma_account_unreconciled/readme/DESCRIPTION.rst index 1378495d..98b3a5af 100644 --- a/rma_account_unreconciled/readme/DESCRIPTION.rst +++ b/rma_account_unreconciled/readme/DESCRIPTION.rst @@ -1,5 +1,5 @@ This module adds a new fields "Unreconciled" on RMA Order Lines, that allows to find Order's with unreconciled journal items related. -This module allows to reconcile those Orders in a single click. In accounting +**(Features pending of new version)** This module allows to reconcile those Orders in a single click. In accounting settings users will be able to set up a specific account for write-off. diff --git a/rma_account_unreconciled/tests/test_rma_account_unreconciled.py b/rma_account_unreconciled/tests/test_rma_account_unreconciled.py index 42ce79dd..948f3564 100644 --- a/rma_account_unreconciled/tests/test_rma_account_unreconciled.py +++ b/rma_account_unreconciled/tests/test_rma_account_unreconciled.py @@ -55,7 +55,7 @@ class TestRmaAccountUnreconciled(TestRma): self.assertFalse(rma_line.unreconciled) self.rma_customer_id.rma_line_ids.action_rma_to_approve() wizard = self.rma_make_picking.with_context( - { + **{ "active_ids": self.rma_customer_id.rma_line_ids.ids, "active_model": "rma.order.line", "picking_type": "incoming", @@ -66,14 +66,14 @@ class TestRmaAccountUnreconciled(TestRma): res = self.rma_customer_id.rma_line_ids.action_view_in_shipments() picking = self.env["stock.picking"].browse(res["res_id"]) picking.action_assign() - for mv in picking.move_lines: + for mv in picking.move_ids: mv.quantity_done = mv.product_uom_qty picking.button_validate() for rma_line in self.rma_customer_id.rma_line_ids: rma_line._compute_unreconciled() self.assertTrue(rma_line.unreconciled) make_refund = self.rma_refund_wiz.with_context( - { + **{ "customer": True, "active_ids": self.rma_customer_id.rma_line_ids.ids, "active_model": "rma.order.line", diff --git a/rma_account_unreconciled/views/rma_line_view.xml b/rma_account_unreconciled/views/rma_line_view.xml index 3ccc9fbd..eeec3851 100644 --- a/rma_account_unreconciled/views/rma_line_view.xml +++ b/rma_account_unreconciled/views/rma_line_view.xml @@ -1,54 +1,50 @@ - + + rma.order.line.view.form + rma.order.line + + +
+ + + +
+
+
- - rma.order.line.view.form - rma.order.line - - -
- - - -
+ + rma.order.line.search.view + rma.order.line + + + + - - - - rma.order.line.search.view - rma.order.line - - - - - - - - -
+ +