diff --git a/rma_account/models/account_move.py b/rma_account/models/account_move.py index e28f89a3..361abdd8 100644 --- a/rma_account/models/account_move.py +++ b/rma_account/models/account_move.py @@ -234,8 +234,15 @@ class AccountMoveLine(models.Model): and bool(l.move_id.reversed_entry_id) == is_line_reversing ) qty_refunded = sum( +<<<<<<< HEAD x.product_uom_id._compute_quantity(x.quantity, x.product_id.uom_id) for x in posted_invoice_lines +======= + [ + x.product_uom_id._compute_quantity(x.quantity, x.product_id.uom_id) + for x in posted_invoice_lines + ] +>>>>>>> 614c98c ([FIX] include anglo-saxon price unit calculation in refunds.) ) product = self.product_id.with_company(self.company_id).with_context( is_returned=is_line_reversing diff --git a/rma_account/models/stock_move.py b/rma_account/models/stock_move.py index 610c97e4..1eb1ef02 100644 --- a/rma_account/models/stock_move.py +++ b/rma_account/models/stock_move.py @@ -20,4 +20,11 @@ class StockMove(models.Model): != self.product_id.categ_id.property_stock_valuation_account_id.id ): line[2]["rma_line_id"] = self.rma_line_id.id + + def _account_entry_move(self, qty, description, svl_id, cost): + res = super(StockMove, self)._account_entry_move(qty, description, svl_id, cost) + if self.company_id.anglo_saxon_accounting: + # Eventually reconcile together the invoice and valuation accounting + # entries on the stock interim accounts + self.rma_line_id._stock_account_anglo_saxon_reconcile_valuation() return res diff --git a/rma_account_unreconciled/tests/test_rma_account_unreconciled.py b/rma_account_unreconciled/tests/test_rma_account_unreconciled.py index 9d1a43b4..db403af3 100644 --- a/rma_account_unreconciled/tests/test_rma_account_unreconciled.py +++ b/rma_account_unreconciled/tests/test_rma_account_unreconciled.py @@ -54,8 +54,13 @@ class TestRmaAccountUnreconciled(TestRma): rma_line.action_rma_approve() self.assertFalse(rma_line.unreconciled) self.rma_customer_id.rma_line_ids.action_rma_to_approve() +<<<<<<< HEAD wizard = self.rma_make_pickingwith_context( **{ +======= + wizard = self.rma_make_picking.with_context( + { +>>>>>>> 614c98c ([FIX] include anglo-saxon price unit calculation in refunds.) "active_ids": self.rma_customer_id.rma_line_ids.ids, "active_model": "rma.order.line", "picking_type": "incoming", @@ -73,7 +78,11 @@ class TestRmaAccountUnreconciled(TestRma): rma_line._compute_unreconciled() self.assertTrue(rma_line.unreconciled) make_refund = self.rma_refund_wiz.with_context( +<<<<<<< HEAD **{ +======= + { +>>>>>>> 614c98c ([FIX] include anglo-saxon price unit calculation in refunds.) "customer": True, "active_ids": self.rma_customer_id.rma_line_ids.ids, "active_model": "rma.order.line",