account_reconciliation_widget: ability to edit ref

'ref' of account.move can now be customized in the reconciliation widget
'name' of account.move is displayed for information
This commit is contained in:
Alexis de Lattre
2022-08-01 17:42:02 +02:00
parent 2927fd9fee
commit 5875616665
7 changed files with 77 additions and 11 deletions

View File

@@ -222,7 +222,6 @@ class AccountBankStatementLine(models.Model):
aml_obj.with_context(check_move_validity=False).create(liquidity_aml_dict)
self.sequence = self.statement_id.line_ids.ids.index(self.id) + 1
self.move_id.ref = self._get_move_ref(self.statement_id.name)
counterpart_moves = counterpart_moves | self.move_id
# Complete dicts to create both counterpart move lines and write-offs
@@ -272,12 +271,6 @@ class AccountBankStatementLine(models.Model):
return counterpart_moves
def _get_move_ref(self, move_ref):
ref = move_ref or ""
if self.ref:
ref = move_ref + " - " + self.ref if move_ref else self.ref
return ref
def _prepare_move_line_for_currency(self, aml_dict, date):
self.ensure_one()
company_currency = self.journal_id.company_id.currency_id