mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[FIX] account_reconciliation_widget: set statement name to move ref
This commit is contained in:
@@ -222,6 +222,7 @@ class AccountBankStatementLine(models.Model):
|
|||||||
aml_obj.with_context(check_move_validity=False).create(liquidity_aml_dict)
|
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.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
|
counterpart_moves = counterpart_moves | self.move_id
|
||||||
|
|
||||||
# Complete dicts to create both counterpart move lines and write-offs
|
# Complete dicts to create both counterpart move lines and write-offs
|
||||||
@@ -271,6 +272,12 @@ class AccountBankStatementLine(models.Model):
|
|||||||
|
|
||||||
return counterpart_moves
|
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):
|
def _prepare_move_line_for_currency(self, aml_dict, date):
|
||||||
self.ensure_one()
|
self.ensure_one()
|
||||||
company_currency = self.journal_id.company_id.currency_id
|
company_currency = self.journal_id.company_id.currency_id
|
||||||
|
|||||||
Reference in New Issue
Block a user