mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
@@ -1158,10 +1158,11 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
"""
|
"""
|
||||||
if len(move_line_ids) < 1 or len(move_line_ids) + len(new_mv_line_dicts) < 2:
|
if len(move_line_ids) < 1 or len(move_line_ids) + len(new_mv_line_dicts) < 2:
|
||||||
raise UserError(_("A reconciliation must involve at least 2 move lines."))
|
raise UserError(_("A reconciliation must involve at least 2 move lines."))
|
||||||
|
AccountMoveLine = self.env["account.move.line"].with_context(
|
||||||
account_move_line = self.env["account.move.line"].browse(move_line_ids)
|
skip_account_move_synchronization=True
|
||||||
writeoff_lines = self.env["account.move.line"]
|
)
|
||||||
|
account_move_line = AccountMoveLine.browse(move_line_ids)
|
||||||
|
writeoff_lines = AccountMoveLine
|
||||||
# Create writeoff move lines
|
# Create writeoff move lines
|
||||||
if len(new_mv_line_dicts) > 0:
|
if len(new_mv_line_dicts) > 0:
|
||||||
company_currency = account_move_line[0].account_id.company_id.currency_id
|
company_currency = account_move_line[0].account_id.company_id.currency_id
|
||||||
|
|||||||
Reference in New Issue
Block a user