Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] l10n_ar_ux: search currenct by afip code
- Loading branch information
Showing
2 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)]) |