Skip to content

Commit

Permalink
[MIG] l10n_it_account_tax_kind: Migration to 14.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jado95 committed Dec 11, 2020
1 parent de56111 commit 9b09b46
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 17 deletions.
1 change: 1 addition & 0 deletions l10n_it_account_tax_kind/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# @author Francesco Apruzzese <[email protected]>
# Copyright 2017 Alex Comba - Agile Business Group
# Copyright 2018 Lorenzo Battistini <https://github.com/eLBati>
# Copyright 2020 Gianmarco Conte <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
Expand Down
2 changes: 0 additions & 2 deletions l10n_it_account_tax_kind/model/account_tax_kind.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@


class AccountTaxKind(models.Model):

_name = "account.tax.kind"
_description = "Tax exemption kind"

code = fields.Char(string="Code", size=4, required=True)
name = fields.Char(string="Name", required=True)

@api.multi
def name_get(self):
res = []
for tax_kind in self:
Expand Down
14 changes: 6 additions & 8 deletions l10n_it_account_tax_kind/view/account_tax_kind_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<field name="model">account.tax.kind</field>
<field name="arch" type="xml">
<tree string="Tax Exemption Kind">
<field name="code" />
<field name="name" />
<field name="code"/>
<field name="name"/>
</tree>
</field>
</record>
Expand All @@ -18,8 +18,8 @@
<field name="arch" type="xml">
<form string="Tax Exemption Kind">
<group>
<field name="code" />
<field name="name" />
<field name="code"/>
<field name="name"/>
</group>
</form>
</field>
Expand All @@ -29,9 +29,8 @@
<field name="name">Tax Exemption Kind</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">account.tax.kind</field>
<field name="view_type">form</field>
<field name="view_mode">tree,form</field>
<field name="view_id" ref="view_account_tax_kind_tree" />
<field name="view_id" ref="view_account_tax_kind_tree"/>
</record>

<menuitem
Expand All @@ -40,7 +39,6 @@
name="Tax Exemption Kind"
action="view_account_tax_kind_action"
groups="account.group_account_manager"
sequence="40"
/>
sequence="40"/>

</odoo>
11 changes: 4 additions & 7 deletions l10n_it_account_tax_kind/view/account_tax_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,11 @@
<record id="view_tax_form_account_tax_kind" model="ir.ui.view">
<field name="name">account.tax.form.account.tax.kind</field>
<field name="model">account.tax</field>
<field name="inherit_id" ref="account.view_tax_form" />
<field name="inherit_id" ref="account.view_tax_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='tag_ids']" position="after">
<field name="kind_id" />
<field
name="law_reference"
attrs="{'required': [('kind_id', '!=', False),('type_tax_use', '!=', 'purchase')], 'invisible': ['|',('kind_id', '=', False),('type_tax_use', '=', 'purchase')]}"
/>
<xpath expr="//field[@name='tax_group_id']" position="after">
<field name="kind_id"/>
<field name="law_reference" attrs="{'required': [('kind_id', '!=', False),('type_tax_use', '!=', 'purchase')], 'invisible': ['|',('kind_id', '=', False),('type_tax_use', '=', 'purchase')]}"/>
</xpath>
</field>
</record>
Expand Down

0 comments on commit 9b09b46

Please sign in to comment.