2020-03-14 11:47:13 +01:00
|
|
|
<?xml version="1.0" encoding="utf-8" ?>
|
2019-03-15 21:25:19 +01:00
|
|
|
<!-- Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
|
2016-05-25 14:05:38 +02:00
|
|
|
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
|
|
|
<odoo>
|
2020-03-14 11:47:13 +01:00
|
|
|
<record id="view_update_multi_chart" model="ir.ui.view">
|
|
|
|
<field name="name">Update Chart of Accounts from a Chart Template</field>
|
|
|
|
<field name="model">wizard.update.charts.accounts</field>
|
|
|
|
<field name="arch" type="xml">
|
|
|
|
<form>
|
|
|
|
<header>
|
|
|
|
<field
|
|
|
|
name="state"
|
|
|
|
select="2"
|
|
|
|
widget="statusbar"
|
|
|
|
statusbar_visible="init,ready,done"
|
|
|
|
statusbar_colors='{"ready":"blue","done":"blue"}'
|
|
|
|
/>
|
|
|
|
</header>
|
|
|
|
<group attrs="{'invisible':[('state','!=','init')]}">
|
|
|
|
<h3>
|
|
|
|
<p>
|
|
|
|
<center>
|
2019-03-15 21:25:19 +01:00
|
|
|
This wizard will update your accounts, taxes and
|
|
|
|
fiscal positions according to the selected chart
|
|
|
|
template
|
|
|
|
</center>
|
2020-03-14 11:47:13 +01:00
|
|
|
</p>
|
|
|
|
</h3>
|
|
|
|
</group>
|
|
|
|
<group
|
|
|
|
string="Chart of Accounts"
|
|
|
|
attrs="{'invisible':[('state','!=','init')]}"
|
|
|
|
>
|
|
|
|
<field
|
|
|
|
name="company_id"
|
|
|
|
attrs="{'invisible':[('state','!=','init')]}"
|
|
|
|
/>
|
|
|
|
<field name="code_digits" invisible="1" />
|
|
|
|
<field
|
|
|
|
name="chart_template_id"
|
|
|
|
domain="[('visible', '=', True)]"
|
|
|
|
attrs="{'invisible': [('state','!=','init')], 'required': True}"
|
|
|
|
/>
|
|
|
|
<field name="lang" attrs="{'invisible':[('state','!=','init')]}" />
|
|
|
|
</group>
|
|
|
|
<notebook attrs="{'invisible':[('state','!=','init')]}">
|
|
|
|
<page string="General options" name="page_general_options">
|
|
|
|
<group>
|
|
|
|
<group string="Update records?">
|
|
|
|
<field name="update_tax" />
|
|
|
|
<field name="update_account" />
|
|
|
|
<field name="update_fiscal_position" />
|
|
|
|
</group>
|
|
|
|
<group
|
|
|
|
string="Other options"
|
|
|
|
attrs="{'invisible':[('state','!=','init')]}"
|
|
|
|
>
|
|
|
|
<field name="continue_on_errors" />
|
|
|
|
<field name="recreate_xml_ids" />
|
|
|
|
</group>
|
2018-09-22 03:28:30 +02:00
|
|
|
</group>
|
2020-03-14 11:47:13 +01:00
|
|
|
<group>
|
|
|
|
<h5>
|
|
|
|
<p>
|
2019-03-15 21:25:19 +01:00
|
|
|
If you leave these options set, the wizard will
|
|
|
|
not just create new records, but also update
|
|
|
|
records with changes (i.e. different tax amount)
|
|
|
|
</p>
|
2020-03-14 11:47:13 +01:00
|
|
|
<p>
|
2019-03-15 21:25:19 +01:00
|
|
|
Note: Only the changed fields are updated.
|
|
|
|
</p>
|
2020-03-14 11:47:13 +01:00
|
|
|
</h5>
|
|
|
|
</group>
|
|
|
|
</page>
|
|
|
|
<page
|
|
|
|
string="Field options"
|
|
|
|
attrs="{'invisible': [
|
2019-03-15 21:25:19 +01:00
|
|
|
('update_tax', '=', False),
|
|
|
|
('update_account', '=', False),
|
|
|
|
('update_fiscal_position', '=', False),
|
|
|
|
]}"
|
2020-03-14 11:47:13 +01:00
|
|
|
>
|
|
|
|
<h3>
|
|
|
|
<p>
|
2019-03-15 21:25:19 +01:00
|
|
|
Here you can select the fields you want to check if
|
|
|
|
they have been updated in the templates.
|
|
|
|
</p>
|
2020-03-14 11:47:13 +01:00
|
|
|
</h3>
|
|
|
|
<notebook>
|
|
|
|
<page
|
|
|
|
string="Taxes"
|
|
|
|
name="page_fields_taxes"
|
|
|
|
attrs="{'invisible': [('update_tax', '=', False)]}"
|
|
|
|
>
|
2020-09-15 12:32:42 +02:00
|
|
|
<group>
|
|
|
|
<field
|
|
|
|
name="update_tax_repartition_line_account"
|
|
|
|
attrs="{'invisible':[('update_tax', '=', False)]}"
|
|
|
|
/>
|
|
|
|
<field
|
|
|
|
name="update_tax_repartition_line_tags"
|
|
|
|
attrs="{'invisible':[('update_tax', '=', False)]}"
|
|
|
|
/>
|
|
|
|
</group>
|
2020-03-14 11:47:13 +01:00
|
|
|
<field
|
|
|
|
name="tax_field_ids"
|
|
|
|
widget="many2many_checkboxes"
|
|
|
|
context="{'account_chart_update': True}"
|
|
|
|
/>
|
|
|
|
</page>
|
|
|
|
<page
|
|
|
|
string="Accounts"
|
|
|
|
name="page_fields_accounts"
|
|
|
|
attrs="{'invisible': [('update_account', '=', False)]}"
|
|
|
|
>
|
|
|
|
<field
|
|
|
|
name="account_field_ids"
|
|
|
|
widget="many2many_checkboxes"
|
|
|
|
context="{'account_chart_update': True}"
|
|
|
|
/>
|
|
|
|
</page>
|
|
|
|
<page
|
|
|
|
string="Fiscal positions"
|
|
|
|
name="page_fields_fps"
|
|
|
|
attrs="{'invisible': [('update_fiscal_position', '=', False)]}"
|
|
|
|
>
|
|
|
|
<field
|
|
|
|
name="fp_field_ids"
|
|
|
|
widget="many2many_checkboxes"
|
|
|
|
context="{'account_chart_update': True}"
|
|
|
|
/>
|
|
|
|
</page>
|
|
|
|
</notebook>
|
|
|
|
</page>
|
|
|
|
<page
|
|
|
|
string="Matching"
|
|
|
|
attrs="{'invisible': [
|
2019-03-15 21:25:19 +01:00
|
|
|
('update_tax', '=', False),
|
|
|
|
('update_account', '=', False),
|
|
|
|
('update_fiscal_position', '=', False),
|
|
|
|
]}"
|
2020-03-14 11:47:13 +01:00
|
|
|
>
|
|
|
|
<h3>
|
|
|
|
<p>Here you can set the matching order.</p>
|
|
|
|
</h3>
|
|
|
|
<notebook>
|
|
|
|
<page
|
|
|
|
string="Taxes"
|
|
|
|
name="page_matching_taxes"
|
|
|
|
attrs="{'invisible': [('update_tax', '=', False)]}"
|
|
|
|
>
|
|
|
|
<field name="tax_matching_ids">
|
|
|
|
<tree
|
|
|
|
create="false"
|
|
|
|
edit="false"
|
|
|
|
default_order="sequence"
|
|
|
|
>
|
|
|
|
<field name="sequence" widget="handle" />
|
|
|
|
<field name="matching_value" />
|
|
|
|
</tree>
|
|
|
|
<form>
|
|
|
|
<field name="matching_value" readonly="1" />
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</page>
|
|
|
|
<page
|
|
|
|
string="Accounts"
|
|
|
|
name="page_matching_accounts"
|
|
|
|
attrs="{'invisible': [('update_account', '=', False)]}"
|
|
|
|
>
|
|
|
|
<field name="account_matching_ids">
|
|
|
|
<tree
|
|
|
|
create="false"
|
|
|
|
edit="false"
|
|
|
|
default_order="sequence"
|
|
|
|
>
|
|
|
|
<field name="sequence" widget="handle" />
|
|
|
|
<field name="matching_value" />
|
|
|
|
</tree>
|
|
|
|
<form>
|
|
|
|
<field name="matching_value" readonly="1" />
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</page>
|
|
|
|
<page
|
|
|
|
string="Fiscal positions"
|
|
|
|
name="page_matching_fps"
|
|
|
|
attrs="{'invisible': [('update_fiscal_position', '=', False)]}"
|
|
|
|
>
|
|
|
|
<field name="fp_matching_ids">
|
|
|
|
<tree
|
|
|
|
create="false"
|
|
|
|
edit="false"
|
|
|
|
default_order="sequence"
|
|
|
|
>
|
|
|
|
<field name="sequence" widget="handle" />
|
|
|
|
<field name="matching_value" />
|
|
|
|
</tree>
|
|
|
|
<form>
|
|
|
|
<field name="matching_value" readonly="1" />
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</page>
|
|
|
|
</notebook>
|
|
|
|
</page>
|
|
|
|
</notebook>
|
|
|
|
<group
|
|
|
|
attrs="{'invisible':[('state','!=','ready'),]}"
|
|
|
|
string="Records to create/update"
|
2019-01-29 18:07:29 +01:00
|
|
|
>
|
2020-03-14 11:47:13 +01:00
|
|
|
<notebook colspan="4">
|
|
|
|
<page
|
|
|
|
string="Taxes"
|
|
|
|
attrs="{'invisible': [('update_tax', '=', False)]}"
|
2019-01-29 18:07:29 +01:00
|
|
|
>
|
2020-03-14 11:47:13 +01:00
|
|
|
<field name="tax_ids" nolabel="1">
|
|
|
|
<tree string="Taxes" colors="red:type=='updated'">
|
|
|
|
<field name="tax_id" />
|
|
|
|
<field name="update_tax_id" />
|
|
|
|
<field name="type_tax_use" />
|
|
|
|
<field name="notes" />
|
|
|
|
<field name="type" />
|
2019-01-29 18:07:29 +01:00
|
|
|
</tree>
|
2021-03-08 17:25:04 +01:00
|
|
|
<form>
|
|
|
|
<group col="2">
|
|
|
|
<group>
|
|
|
|
<field
|
|
|
|
name="recreate_xml_ids"
|
|
|
|
invisible="1"
|
|
|
|
/>
|
|
|
|
<field name="tax_id" />
|
|
|
|
<field
|
|
|
|
name="type"
|
|
|
|
attrs="{'readonly': [('recreate_xml_ids','=', False)]}"
|
|
|
|
/>
|
|
|
|
<field name="notes" />
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<field name="update_chart_wizard_id" />
|
|
|
|
<field name="type_tax_use" />
|
|
|
|
<field name="update_tax_id" />
|
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
</form>
|
2019-01-29 18:07:29 +01:00
|
|
|
</field>
|
|
|
|
</page>
|
2020-03-14 11:47:13 +01:00
|
|
|
<page
|
|
|
|
string="Accounts"
|
|
|
|
attrs="{'invisible': [('update_account', '=', False)]}"
|
2019-01-29 18:07:29 +01:00
|
|
|
>
|
2020-03-14 11:47:13 +01:00
|
|
|
<field name="account_ids" nolabel="1">
|
|
|
|
<tree string="Accounts" colors="red:type=='updated'">
|
|
|
|
<field name="account_id" />
|
|
|
|
<field name="update_account_id" />
|
|
|
|
<field name="notes" />
|
|
|
|
<field name="type" />
|
2019-01-29 18:07:29 +01:00
|
|
|
</tree>
|
2021-03-08 17:25:04 +01:00
|
|
|
<form>
|
|
|
|
<group col="2">
|
|
|
|
<group>
|
|
|
|
<field
|
|
|
|
name="recreate_xml_ids"
|
|
|
|
invisible="1"
|
|
|
|
/>
|
|
|
|
<field name="account_id" />
|
|
|
|
<field
|
|
|
|
name="type"
|
|
|
|
attrs="{'readonly': [('recreate_xml_ids','=', False)]}"
|
|
|
|
/>
|
|
|
|
<field name="notes" />
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<field name="update_chart_wizard_id" />
|
|
|
|
<field name="update_account_id" />
|
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
</form>
|
2019-01-29 18:07:29 +01:00
|
|
|
</field>
|
|
|
|
</page>
|
2020-03-14 11:47:13 +01:00
|
|
|
<page
|
|
|
|
string="Fiscal positions"
|
|
|
|
attrs="{'invisible': [('update_fiscal_position', '=', False)]}"
|
2019-01-29 18:07:29 +01:00
|
|
|
>
|
2020-03-14 11:47:13 +01:00
|
|
|
<field name="fiscal_position_ids" nolabel="1">
|
|
|
|
<tree
|
|
|
|
string="Fiscal positions"
|
|
|
|
colors="red:type=='updated'"
|
|
|
|
>
|
|
|
|
<field name="fiscal_position_id" />
|
|
|
|
<field name="update_fiscal_position_id" />
|
|
|
|
<field name="notes" />
|
|
|
|
<field name="type" />
|
2019-01-29 18:07:29 +01:00
|
|
|
</tree>
|
2021-03-08 17:25:04 +01:00
|
|
|
<form>
|
|
|
|
<group col="2">
|
|
|
|
<group>
|
|
|
|
<field
|
|
|
|
name="recreate_xml_ids"
|
|
|
|
invisible="1"
|
|
|
|
/>
|
|
|
|
<field name="fiscal_position_id" />
|
|
|
|
<field
|
|
|
|
name="type"
|
|
|
|
attrs="{'readonly': [('recreate_xml_ids','=', False)]}"
|
|
|
|
/>
|
|
|
|
<field name="notes" />
|
|
|
|
</group>
|
|
|
|
<group>
|
|
|
|
<field name="update_chart_wizard_id" />
|
|
|
|
<field name="update_fiscal_position_id" />
|
|
|
|
</group>
|
|
|
|
</group>
|
|
|
|
</form>
|
2019-01-29 18:07:29 +01:00
|
|
|
</field>
|
|
|
|
</page>
|
|
|
|
</notebook>
|
2016-05-25 14:05:38 +02:00
|
|
|
</group>
|
2020-03-14 11:47:13 +01:00
|
|
|
<group
|
|
|
|
col="4"
|
|
|
|
colspan="4"
|
|
|
|
attrs="{'invisible':[('state','!=','done'),]}"
|
|
|
|
>
|
|
|
|
<separator colspan="4" string="Log" />
|
|
|
|
<field name="log" colspan="4" nolabel="1" />
|
|
|
|
<group colspan="4">
|
|
|
|
<separator colspan="4" string="Summary of created objects" />
|
|
|
|
<field name="new_taxes" />
|
|
|
|
<field name="new_accounts" />
|
|
|
|
<field name="new_fps" />
|
|
|
|
</group>
|
|
|
|
<group colspan="4">
|
|
|
|
<separator colspan="4" string="Summary of updated objects" />
|
|
|
|
<field name="updated_taxes" />
|
|
|
|
<field name="deleted_taxes" />
|
|
|
|
<field name="updated_accounts" />
|
|
|
|
<field name="updated_fps" />
|
|
|
|
</group>
|
2016-05-25 14:05:38 +02:00
|
|
|
</group>
|
2020-03-14 11:47:13 +01:00
|
|
|
<footer>
|
|
|
|
<span states="init">
|
|
|
|
<button
|
|
|
|
name="action_find_records"
|
|
|
|
string="Next"
|
|
|
|
class="oe_highlight"
|
|
|
|
type="object"
|
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
<span states="ready">
|
|
|
|
<button name="action_init" string="Previous" type="object" />
|
|
|
|
<button
|
|
|
|
name="action_update_records"
|
|
|
|
string="Create/Update"
|
|
|
|
type="object"
|
|
|
|
class="oe_highlight"
|
|
|
|
/>
|
|
|
|
</span>
|
|
|
|
<span states="init,ready"> or </span>
|
|
|
|
<button special="cancel" string="Close" class="oe_link" />
|
|
|
|
</footer>
|
|
|
|
</form>
|
|
|
|
</field>
|
|
|
|
</record>
|
|
|
|
<record id="action_wizard_update_chart" model="ir.actions.act_window">
|
|
|
|
<field name="name">Update chart of accounts</field>
|
|
|
|
<field name="type">ir.actions.act_window</field>
|
|
|
|
<field name="res_model">wizard.update.charts.accounts</field>
|
|
|
|
<field name="view_mode">form</field>
|
|
|
|
<field name="target">new</field>
|
|
|
|
</record>
|
2016-05-25 14:05:38 +02:00
|
|
|
</odoo>
|