Skip to content

Commit

Permalink
porting l10n_it_account_tax_kind to 10.0
Browse files Browse the repository at this point in the history
ADD law_reference
  • Loading branch information
eLBati authored and SimoRubi committed Aug 7, 2019
1 parent 51d8271 commit 4bbfff2
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 84 deletions.
9 changes: 5 additions & 4 deletions l10n_it_account_tax_kind/README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
:target: http://www.gnu.org/licenses/agpl
:alt: License: AGPL-3
.. image:: https://img.shields.io/badge/licence-LGPL--3-blue.svg
:target: http://www.gnu.org/licenses/lgpl
:alt: License: LGPL-3

================
Account Tax Kind
Expand Down Expand Up @@ -32,7 +32,7 @@ open the tax to modify and set a Kind value

.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
:alt: Try me on Runbot
:target: https://runbot.odoo-community.org/runbot/122/8.0
:target: https://runbot.odoo-community.org/runbot/122/10.0

Bug Tracker
===========
Expand All @@ -54,6 +54,7 @@ Contributors
------------

* Apruzzese Francesco <f.apruzzese@apuliasoftware.it>
* Lorenzo Battistini <lorenzo.battistini@agilebg.com>

Do not contact contributors directly about support or help with technical issues.

Expand Down
6 changes: 1 addition & 5 deletions l10n_it_account_tax_kind/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Apulia Software s.r.l. (http://www.apuliasoftware.it)
# @author Francesco Apruzzese <f.apruzzese@apuliasoftware.it>
#
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

from . import model
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
# Copyright (C) 2017 Apulia Software s.r.l. (http://www.apuliasoftware.it)
# @author Francesco Apruzzese <f.apruzzese@apuliasoftware.it>
#
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

{
'name': 'Italian Localisation - Natura delle aliquote IVA',
'version': '8.0.1.0.0',
'version': '10.0.1.0.0',
'category': 'Localisation/Italy',
'author': "Odoo Community Association (OCA), Apulia Software s.r.l",
'website': 'https://odoo-community.org/',
'license': 'AGPL-3',
'website': 'https://www.odoo-italia.net/',
'license': 'LGPL-3',
'depends': [
'account',
'l10n_it_account',
],
'data': [
'view/account_tax_kind_view.xml',
Expand Down
6 changes: 1 addition & 5 deletions l10n_it_account_tax_kind/model/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Apulia Software s.r.l. (http://www.apuliasoftware.it)
# @author Francesco Apruzzese <f.apruzzese@apuliasoftware.it>
#
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

from . import account_tax_kind
from . import account
9 changes: 3 additions & 6 deletions l10n_it_account_tax_kind/model/account.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Apulia Software s.r.l. (http://www.apuliasoftware.it)
# @author Francesco Apruzzese <f.apruzzese@apuliasoftware.it>
#
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

from openerp import models, fields
from odoo import models, fields


class AccountTax(models.Model):

_inherit = 'account.tax'

kind_id = fields.Many2one('account.tax.kind', string="Kind")
law_reference = fields.Char('Law reference')
8 changes: 2 additions & 6 deletions l10n_it_account_tax_kind/model/account_tax_kind.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Apulia Software s.r.l. (http://www.apuliasoftware.it)
# @author Francesco Apruzzese <f.apruzzese@apuliasoftware.it>
#
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).

from openerp import api, models, fields
from odoo import api, models, fields


class AccountTaxKind(models.Model):
Expand Down
76 changes: 37 additions & 39 deletions l10n_it_account_tax_kind/view/account_tax_kind_view.xml
Original file line number Diff line number Diff line change
@@ -1,46 +1,44 @@
<?xml version="1.0" ?>
<openerp>
<data>
<odoo>

<record id="view_account_tax_kind_tree" model="ir.ui.view">
<field name="name">account.tax.kind.tree</field>
<field name="model">account.tax.kind</field>
<field name="arch" type="xml">
<tree string="Account Tax Kind">
<record id="view_account_tax_kind_tree" model="ir.ui.view">
<field name="name">account.tax.kind.tree</field>
<field name="model">account.tax.kind</field>
<field name="arch" type="xml">
<tree string="Account Tax Kind">
<field name="code"/>
<field name="name"/>
</tree>
</field>
</record>

<record id="view_account_tax_kind_form" model="ir.ui.view">
<field name="name">account.tax.kind.form</field>
<field name="model">account.tax.kind</field>
<field name="arch" type="xml">
<form string="Account Tax Kind">
<group>
<field name="code"/>
<field name="name"/>
</tree>
</field>
</record>

<record id="view_account_tax_kind_form" model="ir.ui.view">
<field name="name">account.tax.kind.form</field>
<field name="model">account.tax.kind</field>
<field name="arch" type="xml">
<form string="Account Tax Kind">
<group>
<field name="code"/>
<field name="name"/>
</group>
</form>
</field>
</record>
</group>
</form>
</field>
</record>

<record model="ir.actions.act_window" id="view_account_tax_kind_action">
<field name="name">Account Tax 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"/>
</record>
<record model="ir.actions.act_window" id="view_account_tax_kind_action">
<field name="name">Account Tax 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"/>
</record>

<menuitem id="account_tax_kind_menu"
parent="account.next_id_27"
name="Account Tax Kind"
action="view_account_tax_kind_action"
groups="account.group_account_manager"
sequence="40"/>
<menuitem id="account_tax_kind_menu"
parent="l10n_it_account.account_italian_localization"
name="Account Tax Kind"
action="view_account_tax_kind_action"
groups="account.group_account_manager"
sequence="40"/>

</data>
</openerp>
</odoo>
27 changes: 13 additions & 14 deletions l10n_it_account_tax_kind/view/account_tax_view.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<?xml version="1.0" ?>
<openerp>
<data>
<odoo>

<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="arch" type="xml">
<xpath expr="//field[@name='sequence']" position="after">
<field name="kind_id" />
</xpath>
</field>
</record>
<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="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')]}"></field>
</xpath>
</field>
</record>

</data>
</openerp>
</odoo>

0 comments on commit 4bbfff2

Please sign in to comment.