Merge pull request #178 from pedrobaeza/8.0-account_chart_update-imp

[IMP] account_chart_update: Whole refactoring + New API
This commit is contained in:
Pedro M. Baeza
2015-05-25 13:35:21 +02:00
8 changed files with 989 additions and 1546 deletions

View File

@@ -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

View File

@@ -749,3 +749,8 @@ msgstr ""
msgid "Tax code template"
msgstr ""
#. module: account_chart_update
#: field:account.tax.code,active:0
msgid "Active"
msgstr ""

View File

@@ -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"

View File

@@ -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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

View 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>

File diff suppressed because it is too large Load Diff

View File

@@ -20,12 +20,14 @@
</h3>
</group>
<group string="Chart of Accounts" attrs="{'invisible':[('state','!=','init')]}">
<field name="company_id" on_change="onchange_company_id(company_id)"
attrs="{'invisible':[('state','!=','init')]}" />
<field name="company_id"
attrs="{'invisible':[('state','!=','init')]}"
/>
<field name="code_digits" attrs="{'invisible':[('state','!=','init')]}" />
<field name="chart_template_id"
domain="[('visible', '=', True)]"
attrs="{'invisible': [('state','!=','init')], 'required': True}"/>
domain="[('visible', '=', True)]"
attrs="{'invisible': [('state','!=','init')], 'required': True}"
/>
<field name="lang" attrs="{'invisible':[('state','!=','init')]}" />
</group>
<group attrs="{'invisible':[('state','!=','init')]}">