mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[IMP] account_chart_update: Whole refactoring
* Fix calculated field when showing inactives + add field to view * Migrated to new API. * Provided hooks for detecting changes and for adding update/create values. * Purge dead error detection code (not applying). * Use global mapping dictionaries stored on class instead of passing arguments down to top and viceversa. * Number fields computed by a function field instead of being computed by hand. * Use recordsets as indexes instead of ids to avoid repetitive browses. * Re-enable local cache variables * README + authors
This commit is contained in:
committed by
Luis J. Salvatierra
parent
ef73f5ad50
commit
bc483a106f
@@ -25,3 +25,13 @@ class AccountTaxCode(models.Model):
|
||||
_inherit = 'account.tax.code'
|
||||
|
||||
active = fields.Boolean('Active', default=True)
|
||||
|
||||
def _sum(self, cr, uid, ids, name, args, context, where='',
|
||||
where_params=()):
|
||||
try:
|
||||
return super(AccountTaxCode, self)._sum(
|
||||
cr, uid, ids, name, args, context, where=where,
|
||||
where_params=where_params)
|
||||
except:
|
||||
cr.rollback()
|
||||
return dict.fromkeys(ids, 0.0)
|
||||
|
||||
Reference in New Issue
Block a user