Skip to content

Commit

Permalink
[FIX] account_ux: Si la factura tenía currency_id no queremos cambiar…
Browse files Browse the repository at this point in the history
…la si cambia el diario
  • Loading branch information
pablohmontenegro committed Jul 12, 2023
1 parent 2678dd7 commit b7a6ef4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions account_ux/models/account_move.py
Expand Up @@ -140,3 +140,8 @@ def _check_company_on_lines(self):
if any(line.account_id.company_id != self.company_id for line in self.line_ids):
raise UserError(_("There is almost one account in the journal entry of this move that belongs to a company that "
"is different to the company of the move (id: %s)" % (move.id)))

def _compute_currency_id(self):
""" Si la factura tenía currency_id no queremos cambiarla si cambia el diario """
invoices_with_currency_id = self.filtered(lambda x: x.currency_id)
return super(AccountMove, self - invoices_with_currency_id)._compute_currency_id()

0 comments on commit b7a6ef4

Please sign in to comment.