forked from OCA/l10n-italy
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] Depends for display_name compute field [ADD] Readme file [ADD] Italian translation
- Loading branch information
Showing
11 changed files
with
316 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg | ||
:target: http://www.gnu.org/licenses/agpl | ||
:alt: License: AGPL-3 | ||
|
||
================ | ||
Account Tax Kind | ||
================ | ||
|
||
This module extends the functionality of account tax. | ||
|
||
With this module is possibile to set a kind of tax for every account tax you need. | ||
|
||
|
||
Configuration | ||
============= | ||
|
||
To configure this module, you need to go to | ||
|
||
Invoicing -> Configuration -> Taxes -> Account Tax Kind | ||
|
||
and create a new kind of tax or modify existing one | ||
|
||
|
||
Usage | ||
===== | ||
|
||
To use this module, you need to: | ||
|
||
#. Go to Invoicing -> Configuration -> Taxes -> Taxes | ||
|
||
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 | ||
|
||
Bug Tracker | ||
=========== | ||
|
||
Bugs are tracked on `GitHub Issues | ||
<https://github.com/OCA/l10n-italy/issues>`_. In case of trouble, please | ||
check there if your issue has already been reported. If you spotted it first, | ||
help us smash it by providing detailed and welcomed feedback. | ||
|
||
Credits | ||
======= | ||
|
||
Images | ||
------ | ||
|
||
* Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_. | ||
|
||
Contributors | ||
------------ | ||
|
||
* Apruzzese Francesco <f.apruzzese@apuliasoftware.it> | ||
|
||
Do not contact contributors directly about support or help with technical issues. | ||
|
||
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 https://odoo-community.org. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# -*- 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). | ||
|
||
from . import model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# -*- 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). | ||
|
||
{ | ||
'name': 'Italian Localisation - Natura delle aliquote IVA', | ||
'version': '8.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', | ||
'depends': [ | ||
'account', | ||
], | ||
'data': [ | ||
'view/account_tax_kind_view.xml', | ||
'view/account_tax_view.xml', | ||
'data/account.tax.kind.csv', | ||
'security/ir.model.access.csv', | ||
], | ||
'installable': True | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
id,code,name | ||
n1,N1,Escluse ex art. 15 | ||
n2,N2,Non soggette | ||
n3,N3,Non imponibili | ||
n4,N4,Esenti | ||
n5,N5,Regime del margine / IVA non esposta in fattura | ||
n6,N6,Inversione contabile | ||
n7,N7,IVA assolta in altro stato UE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Translation of Odoo Server. | ||
# This file contains the translation of the following modules: | ||
# * l10n_it_account_tax_kind | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 8.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2017-09-19 07:49+0000\n" | ||
"PO-Revision-Date: 2017-09-19 07:49+0000\n" | ||
"Last-Translator: <>\n" | ||
"Language-Team: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: l10n_it_account_tax_kind | ||
#: view:account.tax.kind:l10n_it_account_tax_kind.view_account_tax_kind_form | ||
#: view:account.tax.kind:l10n_it_account_tax_kind.view_account_tax_kind_tree | ||
#: model:ir.actions.act_window,name:l10n_it_account_tax_kind.view_account_tax_kind_action | ||
#: model:ir.ui.menu,name:l10n_it_account_tax_kind.account_tax_kind_menu | ||
msgid "Account Tax Kind" | ||
msgstr "Natura Tasse" | ||
|
||
#. module: l10n_it_account_tax_kind | ||
#: field:account.tax.kind,code:0 | ||
msgid "Code" | ||
msgstr "Codice" | ||
|
||
#. module: l10n_it_account_tax_kind | ||
#: field:account.tax.kind,create_uid:0 | ||
msgid "Created by" | ||
msgstr "Creato da" | ||
|
||
#. module: l10n_it_account_tax_kind | ||
#: field:account.tax.kind,create_date:0 | ||
msgid "Created on" | ||
msgstr "Creato il" | ||
|
||
#. module: l10n_it_account_tax_kind | ||
#: field:account.tax.kind,id:0 | ||
msgid "ID" | ||
msgstr "ID" | ||
|
||
#. module: l10n_it_account_tax_kind | ||
#: field:account.tax,kind_id:0 | ||
msgid "Kind" | ||
msgstr "Natura" | ||
|
||
#. module: l10n_it_account_tax_kind | ||
#: field:account.tax.kind,__last_update:0 | ||
msgid "Last Modified on" | ||
msgstr "Ultima modifica il" | ||
|
||
#. module: l10n_it_account_tax_kind | ||
#: field:account.tax.kind,write_uid:0 | ||
msgid "Last Updated by" | ||
msgstr "Ultimo aggiornamento da" | ||
|
||
#. module: l10n_it_account_tax_kind | ||
#: field:account.tax.kind,write_date:0 | ||
msgid "Last Updated on" | ||
msgstr "Ultimo aggiornamento il" | ||
|
||
#. module: l10n_it_account_tax_kind | ||
#: field:account.tax.kind,display_name:0 | ||
#: field:account.tax.kind,name:0 | ||
msgid "Name" | ||
msgstr "Nome" | ||
|
||
#. module: l10n_it_account_tax_kind | ||
#: model:ir.model,name:l10n_it_account_tax_kind.model_account_tax | ||
msgid "Tax" | ||
msgstr "Imposta" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# -*- 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). | ||
|
||
from . import account_tax_kind | ||
from . import account |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# -*- 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). | ||
|
||
from openerp import models, fields | ||
|
||
|
||
class AccountTax(models.Model): | ||
|
||
_inherit = 'account.tax' | ||
|
||
kind_id = fields.Many2one('account.tax.kind', string="Kind") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# -*- 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). | ||
|
||
from openerp import api, models, fields | ||
|
||
|
||
class AccountTaxKind(models.Model): | ||
|
||
_name = 'account.tax.kind' | ||
_rec_name = 'display_name' | ||
|
||
code = fields.Char(string='Code', size=3, required=True) | ||
name = fields.Char(string='Name', required=True) | ||
display_name = fields.Char(string='Name', compute='_compute_display_name') | ||
|
||
@api.depends('code', 'name') | ||
@api.multi | ||
def _compute_display_name(self): | ||
for record in self: | ||
record.display_name = u'[%s] %s' % (record.code, record.name) | ||
|
||
@api.model | ||
def name_search(self, name, args=None, operator='ilike', limit=100): | ||
if not args: | ||
args = [] | ||
if name: | ||
records = self.search([ | ||
'|', ('name', operator, name), ('code', operator, name) | ||
] + args, limit=limit) | ||
else: | ||
records = self.search(args, limit=limit) | ||
return records.name_get() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink" | ||
"access_account_tax_kind_user","account_tax_kind user","model_account_tax_kind",,1,0,0,0 | ||
"access_account_tax_kind_manager","account_tax_kind manager","model_account_tax_kind","account.group_account_invoice",1,1,1,1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0" ?> | ||
<openerp> | ||
<data> | ||
|
||
<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"/> | ||
</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> | ||
|
||
<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"/> | ||
|
||
</data> | ||
</openerp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" ?> | ||
<openerp> | ||
<data> | ||
|
||
<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> | ||
|
||
</data> | ||
</openerp> |