mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
[IMP] account_chart_update: Fix calculated field when showing inactives + add field to view
This commit is contained in:
@@ -70,6 +70,7 @@ Any problem found while updating will be shown on the last step.
|
||||
"demo": [],
|
||||
"data": [
|
||||
'wizard/wizard_chart_update_view.xml',
|
||||
'views/account_tax_code_view.xml',
|
||||
],
|
||||
"active": False,
|
||||
'installable': True
|
||||
|
||||
@@ -749,3 +749,8 @@ msgstr ""
|
||||
msgid "Tax code template"
|
||||
msgstr ""
|
||||
|
||||
#. module: account_chart_update
|
||||
#: field:account.tax.code,active:0
|
||||
msgid "Active"
|
||||
msgstr ""
|
||||
|
||||
|
||||
@@ -762,20 +762,8 @@ msgstr ""
|
||||
msgid "Tax code template"
|
||||
msgstr "Plantilla de código de impuesto"
|
||||
|
||||
#~ msgid "Fiscal position"
|
||||
#~ msgstr "Posición fiscal"
|
||||
#. module: account_chart_update
|
||||
#: field:account.tax.code,active:0
|
||||
msgid "Active"
|
||||
msgstr "Activo"
|
||||
|
||||
#~ msgid "Account"
|
||||
#~ msgstr "Cuenta"
|
||||
|
||||
#~ msgid "Tax"
|
||||
#~ msgstr "Impuesto"
|
||||
|
||||
#~ msgid "Tax code"
|
||||
#~ msgstr "Código de impuesto"
|
||||
|
||||
#, python-format
|
||||
#~ msgid "Tax mapping not found on the fiscal position instance: %s -> None.\n"
|
||||
#~ msgstr ""
|
||||
#~ "Mapeo de cuentas no encontrado en la instancia de posición fiscal: %s -> "
|
||||
#~ "Ninguno.\n"
|
||||
|
||||
@@ -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)
|
||||
|
||||
17
account_chart_update/views/account_tax_code_view.xml
Normal file
17
account_chart_update/views/account_tax_code_view.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data>
|
||||
|
||||
<record id="view_tax_code_form_active" model="ir.ui.view">
|
||||
<field name="name">account.tax.code.form.active</field>
|
||||
<field name="model">account.tax.code</field>
|
||||
<field name="inherit_id" ref="account.view_tax_code_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="company_id" position="after">
|
||||
<field name="active"/>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
Reference in New Issue
Block a user