~zaber/openobject-addons/stable_5.0-extra-addons

« back to all changes in this revision

Viewing changes to account_chart_update/account_view.xml

  • Committer: Jordi Esteve
  • Date: 2010-03-26 18:56:18 UTC
  • mto: This revision was merged to the branch mainline in revision 4259.
  • Revision ID: jesteve@zikzakmedia.com-20100326185618-q5es9zthid7u0zm2
[ADD] New module account_chart_update: Update account chart from template:

Adds a wizard to update a company account chart from a template:
  * Generates the new accounts from the template and assigns them to the right company
  * Generates the new taxes and tax codes, changing account assignations
  * Generates the new fiscal positions, changing account and taxes assignations

Before creating the new accounts, taxes, tax codes and fiscal positions, the user can select
which ones must be created.

The user can also choose to update the existing accounts, taxes, tax codes and fiscal positions
from a template.

The problems occurred during the creation/updating of the account chart are shown in the last step.

It is useful when the account law has changed and you want to transfer the new accounts, taxes and
fiscal positions included in the account chart template to an existing company account chart.

Note: Due to the memory limitation of the osv_memory OpenERP objects, only a maximum number of 
objects can be created each time. If a lot of new accounts, taxes, tax codes or fiscal positions
must be created, the wizard should be run several times.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="utf-8"?>
 
2
<openerp>
 
3
    <data>
 
4
 
 
5
        <!--  Wizard for Multi Charts of Accounts -->
 
6
 
 
7
        <record id="view_update_multi_chart" model="ir.ui.view">
 
8
            <field name="name">Update Chart of Accounts from a Chart Template</field>
 
9
            <field name="model">wizard.update.charts.accounts</field>
 
10
            <field name="type">form</field>
 
11
            <field name="arch" type="xml">
 
12
                <form string="Update Chart of Accounts from a Chart Template">
 
13
                                        <group col="4" colspan="4" attrs="{'invisible':[('state','!=','one')]}">
 
14
                        <separator col="4" colspan="4" string="Generate Chart of Accounts from a Chart Template"/>
 
15
                        <label align="0.0" string="This will automatically updates your chart of accounts, taxes and fiscal positions according to the selected template" colspan="4"/>
 
16
                        <field name="company_id" on_change="onchange_company_id(company_id)"/>
 
17
                        <field name="code_digits"/>
 
18
                        <field name="chart_template_id"/>
 
19
                        <separator string="Existing records are updated? (by default only new ones are created)" colspan="4"/>
 
20
                        <field name="update_tax_code"/>
 
21
                        <field name="update_tax"/>
 
22
                        <field name="update_account"/>
 
23
                        <field name="update_fiscal_position"/>
 
24
                                        </group>
 
25
                                        <group col="4" colspan="4" attrs="{'invisible':[('state','!=','two')]}">
 
26
                        <separator colspan="4" string="Creation of account chart objects"/>
 
27
                        <field name="tax_code_ids" colspan="4" nolabel="1" mode="tree">
 
28
                            <tree string="Tax codes">
 
29
                                <field name="tax_code_id"/>
 
30
                            </tree>
 
31
                        </field>
 
32
                        <field name="tax_ids" colspan="4" nolabel="1" mode="tree">
 
33
                            <tree string="Taxes">
 
34
                                <field name="tax_id"/>
 
35
                            </tree>
 
36
                        </field>
 
37
                        <field name="account_ids" colspan="4" nolabel="1" mode="tree">
 
38
                            <tree string="Accounts">
 
39
                                <field name="account_id"/>
 
40
                            </tree>
 
41
                        </field>
 
42
                        <field name="fiscal_position_ids" colspan="4" nolabel="1" mode="tree">
 
43
                            <tree string="Fiscal positions">
 
44
                                <field name="fiscal_position_id"/>
 
45
                            </tree>
 
46
                        </field>
 
47
                                        </group>
 
48
                                        <group col="4" colspan="4" attrs="{'invisible':[('state','!=','done'),]}">
 
49
                        <separator colspan="4" string="Logs"/>
 
50
                        <field name="logs" colspan="4" nolabel="1"/>
 
51
                        <separator colspan="4" string="Creation of account chart objects"/>
 
52
                        <field name="new_tax_code"/>
 
53
                        <field name="new_tax"/>
 
54
                        <field name="new_account"/>
 
55
                        <field name="new_fp"/>
 
56
                                        </group>
 
57
                                        <group col="4" colspan="4" attrs="{'invisible':[('state','=','one'),]}">
 
58
                        <separator colspan="4" string="Update of account chart objects"/>
 
59
                        <field name="updated_tax_code"/>
 
60
                        <field name="updated_tax"/>
 
61
                        <field name="updated_account"/>
 
62
                        <field name="updated_fp"/>
 
63
                                        </group>
 
64
                    <separator string="" colspan="4"/>
 
65
                    <group col="7" colspan="4">
 
66
                        <field name="state"/>
 
67
                        <button icon="gtk-cancel" special="cancel" string="Cancel" states="one,two"/>
 
68
                        <button icon="gtk-go-forward" name="action_show" string="Next" type="object" states="one"/>
 
69
                        <button icon="gtk-go-back" name="action_one" string="Previous" type="object" states="two"/>
 
70
                        <button icon="gtk-ok" name="action_update" string="Create/Update" type="object" states="two"/>
 
71
                        <button icon="gtk-ok" special="cancel" string="Ok" type="object" states="done"/>
 
72
                    </group>
 
73
                </form>
 
74
            </field>
 
75
        </record>
 
76
 
 
77
        <record id="action_wizard_update_chart" model="ir.actions.act_window">
 
78
            <field name="name">Update Chart of Accounts from a Chart Template</field>
 
79
            <field name="type">ir.actions.act_window</field>
 
80
            <field name="res_model">wizard.update.charts.accounts</field>
 
81
            <field name="view_type">form</field>
 
82
            <field name="view_mode">form</field>
 
83
            <field name="target">new</field>
 
84
        </record>
 
85
 
 
86
        <menuitem parent="account.account_template_folder" action="action_wizard_update_chart" id="menu_wizard"/>
 
87
 
 
88
    </data>
 
89
</openerp>