Skip to content

Commit

Permalink
[IMP] l10n_ar_ux: search currenct by afip code
Browse files Browse the repository at this point in the history
x-original commit: 16a3044

closes #691

Signed-off-by: pablohmontenegro <pam@adhoc.com.ar>
  • Loading branch information
zaoral committed Apr 14, 2023
1 parent 6b0a0b4 commit 5c0ca93
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions l10n_ar_ux/models/__init__.py
Expand Up @@ -10,6 +10,7 @@
from . import account_tax
from . import afip_padron
from . import res_company
from . import res_currency
from . import res_partner
from . import account_payment
from . import res_config_settings
Expand Down
11 changes: 11 additions & 0 deletions l10n_ar_ux/models/res_currency.py
@@ -0,0 +1,11 @@
from odoo import models, api


class ResCurrency(models.Model):
_inherit = 'res.currency'

@api.model
def _search_by_name(self, currency_name):
""" This method was original defined in ingadhoc/enterprise-extensions/account_balance_import.
We overwrited completely in order to add the logic of AFIP Code """
return self.search(["|", ("name", "=", currency_name), ("l10n_ar_afip_code", "=", currency_name)])

0 comments on commit 5c0ca93

Please sign in to comment.