[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:
parent
ef73f5ad50
commit
bc483a106f
55
account_chart_update/README.rst
Normal file
55
account_chart_update/README.rst
Normal file
@ -0,0 +1,55 @@
|
||||
Adds a wizard to update a company account chart from a chart template.
|
||||
======================================================================
|
||||
|
||||
This is a pretty useful tool to update Odoo installations after tax reforms
|
||||
on the official charts of accounts, or to apply fixes performed on the chart
|
||||
template.
|
||||
|
||||
The wizard:
|
||||
|
||||
* Allows the user to compare a chart and a template showing differences
|
||||
on accounts, taxes, tax codes and fiscal positions.
|
||||
* It may create the new account, taxes, tax codes and fiscal positions detected
|
||||
on the template.
|
||||
* It can also update (overwrite) the accounts, taxes, tax codes and fiscal
|
||||
positions that got modified on the template.
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
The wizard, accesible from *Accounting > Configuration > Accounts > Update
|
||||
chart of accounts*, lets the user select what kind of objects must
|
||||
be checked/updated, and whether old records must be checked for changes and
|
||||
updates.
|
||||
|
||||
It will display all the objects to be created / updated with some information
|
||||
about the detected differences, and allow the user to exclude records
|
||||
individually.
|
||||
|
||||
Credits
|
||||
=======
|
||||
|
||||
Contributors
|
||||
------------
|
||||
|
||||
* Jordi Esteve
|
||||
* Borja López Soilán
|
||||
* Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
|
||||
* Joaquín Gutierrez <joaquingpedrosa@gmail.com>
|
||||
* invitu
|
||||
* Stéphane Bidoul <stephane.bidoul@acsone.eu>
|
||||
|
||||
Maintainer
|
||||
----------
|
||||
|
||||
.. image:: https://odoo-community.org/logo.png
|
||||
:alt: Odoo Community Association
|
||||
:target: https://odoo-community.org
|
||||
|
||||
This module is maintained by the OCA.
|
||||
|
||||
OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.
|
||||
|
||||
To contribute to this module, please visit http://odoo-community.org.
|
@ -6,7 +6,6 @@
|
||||
# Copyright (c) 2010 Pexego Sistemas Informáticos S.L.(http://www.pexego.es)
|
||||
# Copyright (c) 2013 Joaquin Gutierrez (http://www.gutierrezweb.es)
|
||||
# Pedro Manuel Baeza <pedro.baeza@serviciosbaeza.com>
|
||||
# $Id$
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published
|
||||
# by the Free Software Foundation, either version 3 of the License, or
|
||||
@ -27,8 +26,12 @@
|
||||
{
|
||||
'name': "Detect changes and update the Account Chart from a template",
|
||||
'version': "1.2",
|
||||
'author': "Zikzakmedia SL,Odoo Community Association (OCA)",
|
||||
'website': "www.zikzakmedia.com",
|
||||
'author': "Zikzakmedia SL, "
|
||||
"Pexego, "
|
||||
"Serv. Tecnol. Avanzados - Pedro M. Baeza, "
|
||||
"ACSONE A/V, "
|
||||
"Odoo Community Association (OCA)",
|
||||
'website': "http://odoo-community.org",
|
||||
'depends': ["account"],
|
||||
'category': "Generic Modules/Accounting",
|
||||
'contributors': [
|
||||
@ -37,31 +40,6 @@
|
||||
'invitu',
|
||||
'Stéphane Bidoul',
|
||||
],
|
||||
'description': """
|
||||
Adds a wizard to update a company account chart from a chart template.
|
||||
======================================================================
|
||||
|
||||
This is a pretty useful tool to update OpenERP installations after tax reforms
|
||||
on the official charts of accounts, or to apply fixes performed on the chart
|
||||
template.
|
||||
|
||||
The wizard:
|
||||
|
||||
- Allows the user to compare a chart and a template showing differences
|
||||
on accounts, taxes, tax codes and fiscal positions.
|
||||
- It may create the new account, taxes, tax codes and fiscal positions detected
|
||||
on the template.
|
||||
- It can also update (overwrite) the accounts, taxes, tax codes and fiscal
|
||||
positions that got modified on the template.
|
||||
|
||||
The wizard lets the user select what kind of objects must be checked/updated,
|
||||
and whether old records must be checked for changes and updates.
|
||||
It will display all the accounts to be created / updated with some information
|
||||
about the detected differences, and allow the user to exclude records
|
||||
individually.
|
||||
|
||||
Any problem found while updating will be shown on the last step.
|
||||
""",
|
||||
'license': "AGPL-3",
|
||||
"depends": [
|
||||
"account",
|
||||
@ -70,6 +48,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
|
||||
|
@ -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)
|
||||
|
BIN
account_chart_update/static/description/icon.png
Normal file
BIN
account_chart_update/static/description/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
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>
|
File diff suppressed because it is too large
Load Diff
@ -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')]}">
|
||||
|
Loading…
Reference in New Issue
Block a user