diff --git a/account_move_line_tax_editable/README.rst b/account_move_line_tax_editable/README.rst new file mode 100644 index 000000000..b0986704b --- /dev/null +++ b/account_move_line_tax_editable/README.rst @@ -0,0 +1,45 @@ +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 + +============================== +Account Move Line Tax Editable +============================== + +Allows to edit taxes on account move lines + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/92/11.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Contributors +------------ + +* Thomas Binsfeld +* Benjamin Willig + +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. diff --git a/account_move_line_tax_editable/__init__.py b/account_move_line_tax_editable/__init__.py new file mode 100644 index 000000000..0650744f6 --- /dev/null +++ b/account_move_line_tax_editable/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/account_move_line_tax_editable/__manifest__.py b/account_move_line_tax_editable/__manifest__.py new file mode 100644 index 000000000..eeea220cf --- /dev/null +++ b/account_move_line_tax_editable/__manifest__.py @@ -0,0 +1,19 @@ +# Copyright 2017 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +{ + 'name': 'Account Move Line Tax Editable', + 'summary': """ + Allows to edit taxes on non-posted account move lines""", + 'version': '11.0.1.0.0', + 'license': 'AGPL-3', + 'author': 'ACSONE SA/NV,Odoo Community Association (OCA)', + 'website': 'https://www.acsone.eu', + 'depends': [ + 'account', + ], + 'data': [ + 'views/account_move.xml', + 'views/account_move_line.xml', + ], +} diff --git a/account_move_line_tax_editable/i18n/de.po b/account_move_line_tax_editable/i18n/de.po new file mode 100644 index 000000000..af81589cc --- /dev/null +++ b/account_move_line_tax_editable/i18n/de.po @@ -0,0 +1,29 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_move_line_tax_editable +# +# Translators: +# Rudolf Schnapka , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-12-22 23:21+0000\n" +"PO-Revision-Date: 2017-12-22 23:21+0000\n" +"Last-Translator: Rudolf Schnapka , 2017\n" +"Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: de\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line_is_tax_editable +msgid "Is tax data editable?" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model,name:account_move_line_tax_editable.model_account_move_line +msgid "Journal Item" +msgstr "Journalposten" diff --git a/account_move_line_tax_editable/i18n/es_EC.po b/account_move_line_tax_editable/i18n/es_EC.po new file mode 100644 index 000000000..2e96053f7 --- /dev/null +++ b/account_move_line_tax_editable/i18n/es_EC.po @@ -0,0 +1,29 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_move_line_tax_editable +# +# Translators: +# Cristian Salamea , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-30 00:47+0000\n" +"PO-Revision-Date: 2017-05-30 00:47+0000\n" +"Last-Translator: Cristian Salamea , 2017\n" +"Language-Team: Spanish (Ecuador) (https://www.transifex.com/oca/teams/23907/es_EC/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: es_EC\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line_is_tax_editable +msgid "Is tax data editable?" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model,name:account_move_line_tax_editable.model_account_move_line +msgid "Journal Item" +msgstr "Detalle Contable" diff --git a/account_move_line_tax_editable/i18n/hr.po b/account_move_line_tax_editable/i18n/hr.po new file mode 100644 index 000000000..5711123a6 --- /dev/null +++ b/account_move_line_tax_editable/i18n/hr.po @@ -0,0 +1,29 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_move_line_tax_editable +# +# Translators: +# Bole , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-30 00:47+0000\n" +"PO-Revision-Date: 2017-05-30 00:47+0000\n" +"Last-Translator: Bole , 2017\n" +"Language-Team: Croatian (https://www.transifex.com/oca/teams/23907/hr/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: hr\n" +"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line_is_tax_editable +msgid "Is tax data editable?" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model,name:account_move_line_tax_editable.model_account_move_line +msgid "Journal Item" +msgstr "Stavka dnevnika" diff --git a/account_move_line_tax_editable/i18n/tr_TR.po b/account_move_line_tax_editable/i18n/tr_TR.po new file mode 100644 index 000000000..b08d51182 --- /dev/null +++ b/account_move_line_tax_editable/i18n/tr_TR.po @@ -0,0 +1,29 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_move_line_tax_editable +# +# Translators: +# Ediz Duman , 2017 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 10.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-05-30 00:47+0000\n" +"PO-Revision-Date: 2017-05-30 00:47+0000\n" +"Last-Translator: Ediz Duman , 2017\n" +"Language-Team: Turkish (Turkey) (https://www.transifex.com/oca/teams/23907/tr_TR/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: tr_TR\n" +"Plural-Forms: nplurals=1; plural=0;\n" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line_is_tax_editable +msgid "Is tax data editable?" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model,name:account_move_line_tax_editable.model_account_move_line +msgid "Journal Item" +msgstr "Yevmiye Öğe" diff --git a/account_move_line_tax_editable/models/__init__.py b/account_move_line_tax_editable/models/__init__.py new file mode 100644 index 000000000..8795b3bea --- /dev/null +++ b/account_move_line_tax_editable/models/__init__.py @@ -0,0 +1 @@ +from . import account_move_line diff --git a/account_move_line_tax_editable/models/account_move_line.py b/account_move_line_tax_editable/models/account_move_line.py new file mode 100644 index 000000000..dd6d328a8 --- /dev/null +++ b/account_move_line_tax_editable/models/account_move_line.py @@ -0,0 +1,23 @@ +# Copyright 2017 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from odoo import api, fields, models + + +class AccountMoveLine(models.Model): + + _inherit = 'account.move.line' + + is_tax_editable = fields.Boolean( + string="Is tax data editable?", compute='_compute_is_tax_editable') + + @api.multi + @api.depends('move_id.state') + def _compute_is_tax_editable(self): + for rec in self: + rec.is_tax_editable = rec._get_is_tax_editable() + + @api.multi + def _get_is_tax_editable(self): + self.ensure_one() + return self.move_id.state == 'draft' diff --git a/account_move_line_tax_editable/static/description/icon.png b/account_move_line_tax_editable/static/description/icon.png new file mode 100644 index 000000000..3a0328b51 Binary files /dev/null and b/account_move_line_tax_editable/static/description/icon.png differ diff --git a/account_move_line_tax_editable/views/account_move.xml b/account_move_line_tax_editable/views/account_move.xml new file mode 100644 index 000000000..072f8081e --- /dev/null +++ b/account_move_line_tax_editable/views/account_move.xml @@ -0,0 +1,21 @@ + + + + + + + account.move.form (in account_move_line_tax_editable) + account.move + + + + + + + + + + + diff --git a/account_move_line_tax_editable/views/account_move_line.xml b/account_move_line_tax_editable/views/account_move_line.xml new file mode 100644 index 000000000..8dc439f65 --- /dev/null +++ b/account_move_line_tax_editable/views/account_move_line.xml @@ -0,0 +1,26 @@ + + + + + + + account.move.line.form (in account_move_line_tax_editable) + account.move.line + + + + + + + 0 + {'readonly': [('is_tax_editable', '=', False)]} + + + 0 + {'readonly': [('is_tax_editable', '=', False)]} + + + + +