mirror of
https://github.com/ForgeFlow/stock-rma.git
synced 2025-01-21 12:57:49 +02:00
[FIX] rma_account: try to auto-reconcile interim account
This commit is contained in:
@@ -325,7 +325,15 @@ class RmaOrderLine(models.Model):
|
|||||||
product_interim_account = product_accounts["stock_input"]
|
product_interim_account = product_accounts["stock_input"]
|
||||||
if product_interim_account.reconcile:
|
if product_interim_account.reconcile:
|
||||||
# Get the in and out moves
|
# Get the in and out moves
|
||||||
amls = rma.move_ids.mapped(
|
amls = self.env["account.move.line"].search(
|
||||||
|
[
|
||||||
|
("rma_line_id", "=", rma.id),
|
||||||
|
("account_id", "=", product_interim_account.id),
|
||||||
|
("parent_state", "=", "posted"),
|
||||||
|
("reconciled", "=", False),
|
||||||
|
]
|
||||||
|
)
|
||||||
|
amls |= rma.move_ids.mapped(
|
||||||
"stock_valuation_layer_ids.account_move_id.line_ids"
|
"stock_valuation_layer_ids.account_move_id.line_ids"
|
||||||
)
|
)
|
||||||
# Search for anglo-saxon lines linked to the product in the journal entry.
|
# Search for anglo-saxon lines linked to the product in the journal entry.
|
||||||
|
|||||||
Reference in New Issue
Block a user