From f31aed7171e83514dfc79181cfe55b018d203ee3 Mon Sep 17 00:00:00 2001 From: Benjamin Willig Date: Wed, 17 May 2017 16:30:51 +0200 Subject: [PATCH 01/18] [10.0][ADD] Module to allow account move line taxes edition --- account_move_line_tax_editable/README.rst | 41 ++++++++++++++++++ account_move_line_tax_editable/__init__.py | 0 .../__manifest__.py | 22 ++++++++++ .../static/description/icon.png | Bin 0 -> 9455 bytes .../views/account_move.xml | 21 +++++++++ .../views/account_move_line.xml | 23 ++++++++++ 6 files changed, 107 insertions(+) create mode 100644 account_move_line_tax_editable/README.rst create mode 100644 account_move_line_tax_editable/__init__.py create mode 100644 account_move_line_tax_editable/__manifest__.py create mode 100644 account_move_line_tax_editable/static/description/icon.png create mode 100644 account_move_line_tax_editable/views/account_move.xml create mode 100644 account_move_line_tax_editable/views/account_move_line.xml diff --git a/account_move_line_tax_editable/README.rst b/account_move_line_tax_editable/README.rst new file mode 100644 index 000000000..70a74b9ed --- /dev/null +++ b/account_move_line_tax_editable/README.rst @@ -0,0 +1,41 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +============================== +Account Move Line Tax Editable +============================== + +Allows to edit taxes on account move lines + +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..e69de29bb diff --git a/account_move_line_tax_editable/__manifest__.py b/account_move_line_tax_editable/__manifest__.py new file mode 100644 index 000000000..5b1603e7f --- /dev/null +++ b/account_move_line_tax_editable/__manifest__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# 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 account move lines""", + 'version': '10.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', + ], + 'demo': [ + ], +} 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 0000000000000000000000000000000000000000..3a0328b516c4980e8e44cdb63fd945757ddd132d GIT binary patch literal 9455 zcmW++2RxMjAAjx~&dlBk9S+%}OXg)AGE&Cb*&}d0jUxM@u(PQx^-s)697TX`ehR4?GS^qbkof1cslKgkU)h65qZ9Oc=ml_0temigYLJfnz{IDzUf>bGs4N!v3=Z3jMq&A#7%rM5eQ#dc?k~! zVpnB`o+K7|Al`Q_U;eD$B zfJtP*jH`siUq~{KE)`jP2|#TUEFGRryE2`i0**z#*^6~AI|YzIWy$Cu#CSLW3q=GA z6`?GZymC;dCPk~rBS%eCb`5OLr;RUZ;D`}um=H)BfVIq%7VhiMr)_#G0N#zrNH|__ zc+blN2UAB0=617@>_u;MPHN;P;N#YoE=)R#i$k_`UAA>WWCcEVMh~L_ zj--gtp&|K1#58Yz*AHCTMziU1Jzt_jG0I@qAOHsk$2}yTmVkBp_eHuY$A9)>P6o~I z%aQ?!(GqeQ-Y+b0I(m9pwgi(IIZZzsbMv+9w{PFtd_<_(LA~0H(xz{=FhLB@(1&qHA5EJw1>>=%q2f&^X>IQ{!GJ4e9U z&KlB)z(84HmNgm2hg2C0>WM{E(DdPr+EeU_N@57;PC2&DmGFW_9kP&%?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2W_xQhD{YuR3t< z{6yxu=4~JkeA;|(J6_nv#>Nvs&FuLA&PW^he@t(UwFFE8)|a!R{`E`K`i^ZnyE4$k z;(749Ix|oi$c3QbEJ3b~D_kQsPz~fIUKym($a_7dJ?o+40*OLl^{=&oq$<#Q(yyrp z{J-FAniyAw9tPbe&IhQ|a`DqFTVQGQ&Gq3!C2==4x{6EJwiPZ8zub-iXoUtkJiG{} zPaR&}_fn8_z~(=;5lD-aPWD3z8PZS@AaUiomF!G8I}Mf>e~0g#BelA-5#`cj;O5>N Xviia!U7SGha1wx#SCgwmn*{w2TRX*I literal 0 HcmV?d00001 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..104ab95e2 --- /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..110de0f61 --- /dev/null +++ b/account_move_line_tax_editable/views/account_move_line.xml @@ -0,0 +1,23 @@ + + + + + + + + account.move.line.form (in account_move_line_tax_editable) + account.move.line + + + + 0 + + + 0 + + + + + + From 28ec8fef54bdc4bb300b1946c8957b457e8cbf3f Mon Sep 17 00:00:00 2001 From: Benjamin Willig Date: Mon, 29 May 2017 12:54:56 +0200 Subject: [PATCH 02/18] [IMP] Taxes data should not be editable if linked move is not in draft --- account_move_line_tax_editable/__init__.py | 1 + .../__manifest__.py | 2 +- account_move_line_tax_editable/i18n/de.po | 29 +++++++++++++++++++ account_move_line_tax_editable/i18n/es_EC.po | 29 +++++++++++++++++++ account_move_line_tax_editable/i18n/hr.po | 29 +++++++++++++++++++ account_move_line_tax_editable/i18n/tr_TR.po | 29 +++++++++++++++++++ .../models/__init__.py | 1 + .../models/account_move_line.py | 24 +++++++++++++++ .../views/account_move.xml | 6 ++-- .../views/account_move_line.xml | 5 ++++ 10 files changed, 152 insertions(+), 3 deletions(-) create mode 100644 account_move_line_tax_editable/i18n/de.po create mode 100644 account_move_line_tax_editable/i18n/es_EC.po create mode 100644 account_move_line_tax_editable/i18n/hr.po create mode 100644 account_move_line_tax_editable/i18n/tr_TR.po create mode 100644 account_move_line_tax_editable/models/__init__.py create mode 100644 account_move_line_tax_editable/models/account_move_line.py diff --git a/account_move_line_tax_editable/__init__.py b/account_move_line_tax_editable/__init__.py index e69de29bb..0650744f6 100644 --- a/account_move_line_tax_editable/__init__.py +++ 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 index 5b1603e7f..217050c8a 100644 --- a/account_move_line_tax_editable/__manifest__.py +++ b/account_move_line_tax_editable/__manifest__.py @@ -5,7 +5,7 @@ { 'name': 'Account Move Line Tax Editable', 'summary': """ - Allows to edit taxes on account move lines""", + Allows to edit taxes on non-posted account move lines""", 'version': '10.0.1.0.0', 'license': 'AGPL-3', 'author': 'ACSONE SA/NV,Odoo Community Association (OCA)', 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..551ce637a --- /dev/null +++ b/account_move_line_tax_editable/models/account_move_line.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# 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/views/account_move.xml b/account_move_line_tax_editable/views/account_move.xml index 104ab95e2..a430cb2d0 100644 --- a/account_move_line_tax_editable/views/account_move.xml +++ b/account_move_line_tax_editable/views/account_move.xml @@ -11,8 +11,10 @@ - - + + + diff --git a/account_move_line_tax_editable/views/account_move_line.xml b/account_move_line_tax_editable/views/account_move_line.xml index 110de0f61..30e556488 100644 --- a/account_move_line_tax_editable/views/account_move_line.xml +++ b/account_move_line_tax_editable/views/account_move_line.xml @@ -10,11 +10,16 @@ account.move.line + + + 0 + {'readonly': [('is_tax_editable', '=', False)]} 0 + {'readonly': [('is_tax_editable', '=', False)]} From 9b5a36a0134a9f794d1da333e4fedcdf02fe5cf2 Mon Sep 17 00:00:00 2001 From: Fekete Mihai Date: Mon, 12 Mar 2018 13:53:49 +0200 Subject: [PATCH 03/18] Migrate account_move_line_tax_ediatble to 11.0 Update __manifest__.py --- account_move_line_tax_editable/README.rst | 10 +++++-- .../__manifest__.py | 5 +--- .../i18n/account_move_line_tax_editable.pot | 25 ++++++++++++++++ account_move_line_tax_editable/i18n/de.po | 4 +-- account_move_line_tax_editable/i18n/es_EC.po | 7 +++-- account_move_line_tax_editable/i18n/fr.po | 29 +++++++++++++++++++ account_move_line_tax_editable/i18n/hr.po | 7 +++-- account_move_line_tax_editable/i18n/tr_TR.po | 7 +++-- .../models/account_move_line.py | 1 - .../views/account_move.xml | 2 -- .../views/account_move_line.xml | 2 -- 11 files changed, 76 insertions(+), 23 deletions(-) create mode 100644 account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot create mode 100644 account_move_line_tax_editable/i18n/fr.po diff --git a/account_move_line_tax_editable/README.rst b/account_move_line_tax_editable/README.rst index 70a74b9ed..b0986704b 100644 --- a/account_move_line_tax_editable/README.rst +++ b/account_move_line_tax_editable/README.rst @@ -1,5 +1,5 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl :alt: License: AGPL-3 ============================== @@ -8,11 +8,15 @@ 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 +`_. 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. diff --git a/account_move_line_tax_editable/__manifest__.py b/account_move_line_tax_editable/__manifest__.py index 217050c8a..eeea220cf 100644 --- a/account_move_line_tax_editable/__manifest__.py +++ b/account_move_line_tax_editable/__manifest__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). @@ -6,7 +5,7 @@ 'name': 'Account Move Line Tax Editable', 'summary': """ Allows to edit taxes on non-posted account move lines""", - 'version': '10.0.1.0.0', + 'version': '11.0.1.0.0', 'license': 'AGPL-3', 'author': 'ACSONE SA/NV,Odoo Community Association (OCA)', 'website': 'https://www.acsone.eu', @@ -17,6 +16,4 @@ 'views/account_move.xml', 'views/account_move_line.xml', ], - 'demo': [ - ], } diff --git a/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot b/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot new file mode 100644 index 000000000..a8d486b31 --- /dev/null +++ b/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot @@ -0,0 +1,25 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_move_line_tax_editable +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \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: 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 "" + diff --git a/account_move_line_tax_editable/i18n/de.po b/account_move_line_tax_editable/i18n/de.po index af81589cc..ee462501f 100644 --- a/account_move_line_tax_editable/i18n/de.po +++ b/account_move_line_tax_editable/i18n/de.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_move_line_tax_editable -# +# # Translators: # Rudolf Schnapka , 2017 msgid "" @@ -12,10 +12,10 @@ msgstr "" "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" +"Language: 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 diff --git a/account_move_line_tax_editable/i18n/es_EC.po b/account_move_line_tax_editable/i18n/es_EC.po index 2e96053f7..1bb13470a 100644 --- a/account_move_line_tax_editable/i18n/es_EC.po +++ b/account_move_line_tax_editable/i18n/es_EC.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_move_line_tax_editable -# +# # Translators: # Cristian Salamea , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "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" +"Language-Team: Spanish (Ecuador) (https://www.transifex.com/oca/teams/23907/" +"es_EC/)\n" +"Language: 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 diff --git a/account_move_line_tax_editable/i18n/fr.po b/account_move_line_tax_editable/i18n/fr.po new file mode 100644 index 000000000..6ac4879ad --- /dev/null +++ b/account_move_line_tax_editable/i18n/fr.po @@ -0,0 +1,29 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_move_line_tax_editable +# +# Translators: +# Quentin THEURET , 2018 +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 11.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-04-14 02:39+0000\n" +"PO-Revision-Date: 2018-04-14 02:39+0000\n" +"Last-Translator: Quentin THEURET , 2018\n" +"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n" +"Language: fr\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \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 "Les données de la taxe sont-elles éditables ?" + +#. module: account_move_line_tax_editable +#: model:ir.model,name:account_move_line_tax_editable.model_account_move_line +msgid "Journal Item" +msgstr "Écriture comptable" diff --git a/account_move_line_tax_editable/i18n/hr.po b/account_move_line_tax_editable/i18n/hr.po index 5711123a6..ca712e870 100644 --- a/account_move_line_tax_editable/i18n/hr.po +++ b/account_move_line_tax_editable/i18n/hr.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_move_line_tax_editable -# +# # Translators: # Bole , 2017 msgid "" @@ -12,11 +12,12 @@ msgstr "" "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" +"Language: 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" +"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 diff --git a/account_move_line_tax_editable/i18n/tr_TR.po b/account_move_line_tax_editable/i18n/tr_TR.po index b08d51182..8b8cfb2d8 100644 --- a/account_move_line_tax_editable/i18n/tr_TR.po +++ b/account_move_line_tax_editable/i18n/tr_TR.po @@ -1,7 +1,7 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: # * account_move_line_tax_editable -# +# # Translators: # Ediz Duman , 2017 msgid "" @@ -11,11 +11,12 @@ msgstr "" "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" +"Language-Team: Turkish (Turkey) (https://www.transifex.com/oca/teams/23907/" +"tr_TR/)\n" +"Language: 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 diff --git a/account_move_line_tax_editable/models/account_move_line.py b/account_move_line_tax_editable/models/account_move_line.py index 551ce637a..dd6d328a8 100644 --- a/account_move_line_tax_editable/models/account_move_line.py +++ b/account_move_line_tax_editable/models/account_move_line.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2017 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). diff --git a/account_move_line_tax_editable/views/account_move.xml b/account_move_line_tax_editable/views/account_move.xml index a430cb2d0..072f8081e 100644 --- a/account_move_line_tax_editable/views/account_move.xml +++ b/account_move_line_tax_editable/views/account_move.xml @@ -3,7 +3,6 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> - account.move.form (in account_move_line_tax_editable) @@ -19,5 +18,4 @@ - diff --git a/account_move_line_tax_editable/views/account_move_line.xml b/account_move_line_tax_editable/views/account_move_line.xml index 30e556488..8dc439f65 100644 --- a/account_move_line_tax_editable/views/account_move_line.xml +++ b/account_move_line_tax_editable/views/account_move_line.xml @@ -3,7 +3,6 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). --> - account.move.line.form (in account_move_line_tax_editable) @@ -24,5 +23,4 @@ - From 3ccd0df3bb56e369bb3417549a82c307e3852992 Mon Sep 17 00:00:00 2001 From: Rudolf Schnapka Date: Thu, 11 Oct 2018 11:22:30 +0000 Subject: [PATCH 04/18] Translated using Weblate (German) Currently translated at 100,0% (2 of 2 strings) Translation: account-financial-tools-11.0/account-financial-tools-11.0-account_move_line_tax_editable Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-11-0/account-financial-tools-11-0-account_move_line_tax_editable/de/ --- account_move_line_tax_editable/i18n/de.po | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/account_move_line_tax_editable/i18n/de.po b/account_move_line_tax_editable/i18n/de.po index ee462501f..b1b47415a 100644 --- a/account_move_line_tax_editable/i18n/de.po +++ b/account_move_line_tax_editable/i18n/de.po @@ -9,19 +9,20 @@ 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" +"PO-Revision-Date: 2018-10-11 11:22+0000\n" +"Last-Translator: Rudolf Schnapka \n" "Language-Team: German (https://www.transifex.com/oca/teams/23907/de/)\n" "Language: de\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: nplurals=2; plural=(n != 1);\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 3.1.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 "" +msgstr "Sind Steuerdaten änderbar?" #. module: account_move_line_tax_editable #: model:ir.model,name:account_move_line_tax_editable.model_account_move_line From 6ad16fdcd3784606b248aeacabf482d9a9073cbe Mon Sep 17 00:00:00 2001 From: ernesto Date: Thu, 25 Apr 2019 10:57:45 -0400 Subject: [PATCH 05/18] [MIG] account_move_line_tax_editable: Migration to 12.0 --- account_move_line_tax_editable/README.rst | 67 ++- .../__manifest__.py | 4 +- .../i18n/account_move_line_tax_editable.pot | 4 +- account_move_line_tax_editable/i18n/de.po | 2 +- account_move_line_tax_editable/i18n/es_EC.po | 2 +- account_move_line_tax_editable/i18n/fr.po | 2 +- account_move_line_tax_editable/i18n/hr.po | 2 +- account_move_line_tax_editable/i18n/tr_TR.po | 2 +- .../models/account_move_line.py | 7 +- .../readme/CONTRIBUTORS.rst | 6 + .../readme/DESCRIPTION.rst | 1 + .../static/description/index.html | 424 ++++++++++++++++++ .../tests/__init__.py | 1 + .../test_account_move_line_tax_editable.py | 57 +++ .../views/account_move.xml | 2 +- .../views/account_move_line.xml | 2 +- 16 files changed, 551 insertions(+), 34 deletions(-) create mode 100644 account_move_line_tax_editable/readme/CONTRIBUTORS.rst create mode 100644 account_move_line_tax_editable/readme/DESCRIPTION.rst create mode 100644 account_move_line_tax_editable/static/description/index.html create mode 100644 account_move_line_tax_editable/tests/__init__.py create mode 100644 account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py diff --git a/account_move_line_tax_editable/README.rst b/account_move_line_tax_editable/README.rst index b0986704b..fc544edd0 100644 --- a/account_move_line_tax_editable/README.rst +++ b/account_move_line_tax_editable/README.rst @@ -1,45 +1,78 @@ -.. 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 ============================== +.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github + :target: https://github.com/OCA/account-financial-tools/tree/12.0/account_move_line_tax_editable + :alt: OCA/account-financial-tools +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_move_line_tax_editable + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png + :target: https://runbot.odoo-community.org/runbot/92/12.0 + :alt: Try me on Runbot + +|badge1| |badge2| |badge3| |badge4| |badge5| + 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 +**Table of contents** + +.. contents:: + :local: 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. +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 `_. + +Do not contact contributors directly about support or help with technical issues. Credits ======= +Authors +~~~~~~~ + +* ACSONE SA/NV + Contributors ------------- +~~~~~~~~~~~~ * Thomas Binsfeld * Benjamin Willig -Maintainer ----------- +* `Tecnativa `_: + + * Ernesto Tejeda + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. .. 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 module is part of the `OCA/account-financial-tools `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_move_line_tax_editable/__manifest__.py b/account_move_line_tax_editable/__manifest__.py index eeea220cf..5816763f7 100644 --- a/account_move_line_tax_editable/__manifest__.py +++ b/account_move_line_tax_editable/__manifest__.py @@ -5,10 +5,10 @@ 'name': 'Account Move Line Tax Editable', 'summary': """ Allows to edit taxes on non-posted account move lines""", - 'version': '11.0.1.0.0', + 'version': '12.0.1.0.0', 'license': 'AGPL-3', 'author': 'ACSONE SA/NV,Odoo Community Association (OCA)', - 'website': 'https://www.acsone.eu', + 'website': 'https://github.com/OCA/account-financial-tools', 'depends': [ 'account', ], diff --git a/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot b/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot index a8d486b31..0aecf7441 100644 --- a/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot +++ b/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 11.0\n" +"Project-Id-Version: Odoo Server 12.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: <>\n" "Language-Team: \n" @@ -14,7 +14,7 @@ msgstr "" "Plural-Forms: \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 +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__is_tax_editable msgid "Is tax data editable?" msgstr "" diff --git a/account_move_line_tax_editable/i18n/de.po b/account_move_line_tax_editable/i18n/de.po index b1b47415a..c6e857442 100644 --- a/account_move_line_tax_editable/i18n/de.po +++ b/account_move_line_tax_editable/i18n/de.po @@ -20,7 +20,7 @@ msgstr "" "X-Generator: Weblate 3.1.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 +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__is_tax_editable msgid "Is tax data editable?" msgstr "Sind Steuerdaten änderbar?" diff --git a/account_move_line_tax_editable/i18n/es_EC.po b/account_move_line_tax_editable/i18n/es_EC.po index 1bb13470a..0a9154d97 100644 --- a/account_move_line_tax_editable/i18n/es_EC.po +++ b/account_move_line_tax_editable/i18n/es_EC.po @@ -20,7 +20,7 @@ msgstr "" "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 +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__is_tax_editable msgid "Is tax data editable?" msgstr "" diff --git a/account_move_line_tax_editable/i18n/fr.po b/account_move_line_tax_editable/i18n/fr.po index 6ac4879ad..6c6a9b2f0 100644 --- a/account_move_line_tax_editable/i18n/fr.po +++ b/account_move_line_tax_editable/i18n/fr.po @@ -19,7 +19,7 @@ msgstr "" "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 +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__is_tax_editable msgid "Is tax data editable?" msgstr "Les données de la taxe sont-elles éditables ?" diff --git a/account_move_line_tax_editable/i18n/hr.po b/account_move_line_tax_editable/i18n/hr.po index ca712e870..9e4212686 100644 --- a/account_move_line_tax_editable/i18n/hr.po +++ b/account_move_line_tax_editable/i18n/hr.po @@ -20,7 +20,7 @@ msgstr "" "%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 +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__is_tax_editable msgid "Is tax data editable?" msgstr "" diff --git a/account_move_line_tax_editable/i18n/tr_TR.po b/account_move_line_tax_editable/i18n/tr_TR.po index 8b8cfb2d8..70fe5266a 100644 --- a/account_move_line_tax_editable/i18n/tr_TR.po +++ b/account_move_line_tax_editable/i18n/tr_TR.po @@ -20,7 +20,7 @@ msgstr "" "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 +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__is_tax_editable msgid "Is tax data editable?" msgstr "" diff --git a/account_move_line_tax_editable/models/account_move_line.py b/account_move_line_tax_editable/models/account_move_line.py index dd6d328a8..fe3d1fc76 100644 --- a/account_move_line_tax_editable/models/account_move_line.py +++ b/account_move_line_tax_editable/models/account_move_line.py @@ -15,9 +15,4 @@ class AccountMoveLine(models.Model): @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' + rec.is_tax_editable = (rec.move_id.state == 'draft') diff --git a/account_move_line_tax_editable/readme/CONTRIBUTORS.rst b/account_move_line_tax_editable/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..444ee578a --- /dev/null +++ b/account_move_line_tax_editable/readme/CONTRIBUTORS.rst @@ -0,0 +1,6 @@ +* Thomas Binsfeld +* Benjamin Willig + +* `Tecnativa `_: + + * Ernesto Tejeda diff --git a/account_move_line_tax_editable/readme/DESCRIPTION.rst b/account_move_line_tax_editable/readme/DESCRIPTION.rst new file mode 100644 index 000000000..a79682833 --- /dev/null +++ b/account_move_line_tax_editable/readme/DESCRIPTION.rst @@ -0,0 +1 @@ +Allows to edit taxes on account move lines diff --git a/account_move_line_tax_editable/static/description/index.html b/account_move_line_tax_editable/static/description/index.html new file mode 100644 index 000000000..b18679516 --- /dev/null +++ b/account_move_line_tax_editable/static/description/index.html @@ -0,0 +1,424 @@ + + + + + + +Account Move Line Tax Editable + + + +
+

Account Move Line Tax Editable

+ + +

Beta License: AGPL-3 OCA/account-financial-tools Translate me on Weblate Try me on Runbot

+

Allows to edit taxes on account move lines

+

Table of contents

+ +
+

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.

+

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

+
+
+

Credits

+
+

Authors

+
    +
  • ACSONE SA/NV
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+Odoo Community Association +

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.

+

This module is part of the OCA/account-financial-tools project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/account_move_line_tax_editable/tests/__init__.py b/account_move_line_tax_editable/tests/__init__.py new file mode 100644 index 000000000..8c4b6ecb9 --- /dev/null +++ b/account_move_line_tax_editable/tests/__init__.py @@ -0,0 +1 @@ +from . import test_account_move_line_tax_editable diff --git a/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py b/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py new file mode 100644 index 000000000..fc58339f0 --- /dev/null +++ b/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py @@ -0,0 +1,57 @@ +# Copyright 2019 Tecnativa - Ernesto Tejeda +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields +import odoo.tests.common as common + + +class TestAccountMoveLineTaxEditable(common.SavepointCase): + + @classmethod + def setUpClass(cls): + super(TestAccountMoveLineTaxEditable, cls).setUpClass() + + acc_obj = cls.env['account.account'] + account100 = acc_obj.create({ + 'code': '100', + 'name': 'Account 100', + 'user_type_id': cls.env.ref( + 'account.data_account_type_receivable').id, + 'reconcile': True + }) + account300 = acc_obj.create({ + 'code': '300', + 'name': 'Account 300', + 'user_type_id': cls.env.ref( + 'account.data_account_type_other_income').id + }) + + journal = cls.env['account.journal'].create({ + 'name': 'Test journal', + 'type': 'sale', + 'code': 'TEST', + }) + move_vals = { + 'journal_id': journal.id, + 'name': 'move test', + 'date': fields.Date.today(), + 'line_ids': [ + (0, 0, { + 'name': 'move test', + 'debit': 0.0, + 'credit': 1000.0, + 'account_id': account300.id}), + (0, 0, { + 'name': 'move test', + 'debit': 1000.0, + 'credit': 0.0, + 'account_id': account100.id}) + ]} + cls.move = cls.env['account.move'].create(move_vals) + + def test_compute_is_tax_editable(self): + self.assertEqual(self.move.line_ids.mapped('is_tax_editable'), + [True, True]) + self.move.post() + self.assertEqual(self.move.line_ids.mapped('is_tax_editable'), + [False, False]) diff --git a/account_move_line_tax_editable/views/account_move.xml b/account_move_line_tax_editable/views/account_move.xml index 072f8081e..53971b811 100644 --- a/account_move_line_tax_editable/views/account_move.xml +++ b/account_move_line_tax_editable/views/account_move.xml @@ -4,7 +4,7 @@ - + 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 index 8dc439f65..a4c04681e 100644 --- a/account_move_line_tax_editable/views/account_move_line.xml +++ b/account_move_line_tax_editable/views/account_move_line.xml @@ -4,7 +4,7 @@ - + account.move.line.form (in account_move_line_tax_editable) account.move.line From 87984b0dbbc8e3ce2aa470e0e3684b5c8bbb4b46 Mon Sep 17 00:00:00 2001 From: Pedro Castro Silva Date: Wed, 14 Aug 2019 16:11:08 +0000 Subject: [PATCH 06/18] Added translation using Weblate (Portuguese) --- account_move_line_tax_editable/i18n/pt.po | 27 +++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 account_move_line_tax_editable/i18n/pt.po diff --git a/account_move_line_tax_editable/i18n/pt.po b/account_move_line_tax_editable/i18n/pt.po new file mode 100644 index 000000000..88b70fb19 --- /dev/null +++ b/account_move_line_tax_editable/i18n/pt.po @@ -0,0 +1,27 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_move_line_tax_editable +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 12.0\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2019-08-14 18:44+0000\n" +"Last-Translator: Pedro Castro Silva \n" +"Language-Team: none\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: nplurals=2; plural=n > 1;\n" +"X-Generator: Weblate 3.7.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 "Os dados de impostos são editáveis?" + +#. module: account_move_line_tax_editable +#: model:ir.model,name:account_move_line_tax_editable.model_account_move_line +msgid "Journal Item" +msgstr "Item do Diário" From 2a06faabdb8964ddb23378675e5f22dc89358180 Mon Sep 17 00:00:00 2001 From: mreficent Date: Thu, 30 Jan 2020 18:23:55 +0100 Subject: [PATCH 07/18] [IMP] account_move_line_tax_editable: black, isort --- .../__manifest__.py | 21 ++--- .../models/account_move_line.py | 9 +- .../test_account_move_line_tax_editable.py | 92 ++++++++++--------- 3 files changed, 64 insertions(+), 58 deletions(-) diff --git a/account_move_line_tax_editable/__manifest__.py b/account_move_line_tax_editable/__manifest__.py index 5816763f7..c5a925e7f 100644 --- a/account_move_line_tax_editable/__manifest__.py +++ b/account_move_line_tax_editable/__manifest__.py @@ -2,18 +2,13 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { - 'name': 'Account Move Line Tax Editable', - 'summary': """ + "name": "Account Move Line Tax Editable", + "summary": """ Allows to edit taxes on non-posted account move lines""", - 'version': '12.0.1.0.0', - 'license': 'AGPL-3', - 'author': 'ACSONE SA/NV,Odoo Community Association (OCA)', - 'website': 'https://github.com/OCA/account-financial-tools', - 'depends': [ - 'account', - ], - 'data': [ - 'views/account_move.xml', - 'views/account_move_line.xml', - ], + "version": "12.0.1.0.0", + "license": "AGPL-3", + "author": "ACSONE SA/NV,Odoo Community Association (OCA)", + "website": "https://github.com/OCA/account-financial-tools", + "depends": ["account"], + "data": ["views/account_move.xml", "views/account_move_line.xml"], } diff --git a/account_move_line_tax_editable/models/account_move_line.py b/account_move_line_tax_editable/models/account_move_line.py index fe3d1fc76..f026f570b 100644 --- a/account_move_line_tax_editable/models/account_move_line.py +++ b/account_move_line_tax_editable/models/account_move_line.py @@ -6,13 +6,14 @@ from odoo import api, fields, models class AccountMoveLine(models.Model): - _inherit = 'account.move.line' + _inherit = "account.move.line" is_tax_editable = fields.Boolean( - string="Is tax data editable?", compute='_compute_is_tax_editable') + string="Is tax data editable?", compute="_compute_is_tax_editable" + ) @api.multi - @api.depends('move_id.state') + @api.depends("move_id.state") def _compute_is_tax_editable(self): for rec in self: - rec.is_tax_editable = (rec.move_id.state == 'draft') + rec.is_tax_editable = rec.move_id.state == "draft" diff --git a/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py b/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py index fc58339f0..5be4161b0 100644 --- a/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py +++ b/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py @@ -1,57 +1,67 @@ # Copyright 2019 Tecnativa - Ernesto Tejeda # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -from odoo import fields import odoo.tests.common as common +from odoo import fields class TestAccountMoveLineTaxEditable(common.SavepointCase): - @classmethod def setUpClass(cls): super(TestAccountMoveLineTaxEditable, cls).setUpClass() - acc_obj = cls.env['account.account'] - account100 = acc_obj.create({ - 'code': '100', - 'name': 'Account 100', - 'user_type_id': cls.env.ref( - 'account.data_account_type_receivable').id, - 'reconcile': True - }) - account300 = acc_obj.create({ - 'code': '300', - 'name': 'Account 300', - 'user_type_id': cls.env.ref( - 'account.data_account_type_other_income').id - }) + acc_obj = cls.env["account.account"] + account100 = acc_obj.create( + { + "code": "100", + "name": "Account 100", + "user_type_id": cls.env.ref("account.data_account_type_receivable").id, + "reconcile": True, + } + ) + account300 = acc_obj.create( + { + "code": "300", + "name": "Account 300", + "user_type_id": cls.env.ref( + "account.data_account_type_other_income" + ).id, + } + ) - journal = cls.env['account.journal'].create({ - 'name': 'Test journal', - 'type': 'sale', - 'code': 'TEST', - }) + journal = cls.env["account.journal"].create( + {"name": "Test journal", "type": "sale", "code": "TEST"} + ) move_vals = { - 'journal_id': journal.id, - 'name': 'move test', - 'date': fields.Date.today(), - 'line_ids': [ - (0, 0, { - 'name': 'move test', - 'debit': 0.0, - 'credit': 1000.0, - 'account_id': account300.id}), - (0, 0, { - 'name': 'move test', - 'debit': 1000.0, - 'credit': 0.0, - 'account_id': account100.id}) - ]} - cls.move = cls.env['account.move'].create(move_vals) + "journal_id": journal.id, + "name": "move test", + "date": fields.Date.today(), + "line_ids": [ + ( + 0, + 0, + { + "name": "move test", + "debit": 0.0, + "credit": 1000.0, + "account_id": account300.id, + }, + ), + ( + 0, + 0, + { + "name": "move test", + "debit": 1000.0, + "credit": 0.0, + "account_id": account100.id, + }, + ), + ], + } + cls.move = cls.env["account.move"].create(move_vals) def test_compute_is_tax_editable(self): - self.assertEqual(self.move.line_ids.mapped('is_tax_editable'), - [True, True]) + self.assertEqual(self.move.line_ids.mapped("is_tax_editable"), [True, True]) self.move.post() - self.assertEqual(self.move.line_ids.mapped('is_tax_editable'), - [False, False]) + self.assertEqual(self.move.line_ids.mapped("is_tax_editable"), [False, False]) From e2056d8e2c7e8cd44de5762196ca9686097993aa Mon Sep 17 00:00:00 2001 From: mreficent Date: Thu, 30 Jan 2020 18:58:17 +0100 Subject: [PATCH 08/18] [MIG] account_move_line_tax_editable: Migration to 13.0 --- account_move_line_tax_editable/README.rst | 12 ++++----- .../__manifest__.py | 7 +++-- .../i18n/account_move_line_tax_editable.pot | 7 +++-- .../models/account_move_line.py | 1 - .../readme/DESCRIPTION.rst | 2 +- .../static/description/index.html | 8 +++--- .../views/account_move.xml | 26 ++++++++++++------- .../views/account_move_line.xml | 21 ++++++++------- 8 files changed, 45 insertions(+), 39 deletions(-) diff --git a/account_move_line_tax_editable/README.rst b/account_move_line_tax_editable/README.rst index fc544edd0..679e7cbb1 100644 --- a/account_move_line_tax_editable/README.rst +++ b/account_move_line_tax_editable/README.rst @@ -14,18 +14,18 @@ Account Move Line Tax Editable :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github - :target: https://github.com/OCA/account-financial-tools/tree/12.0/account_move_line_tax_editable + :target: https://github.com/OCA/account-financial-tools/tree/13.0/account_move_line_tax_editable :alt: OCA/account-financial-tools .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/account-financial-tools-12-0/account-financial-tools-12-0-account_move_line_tax_editable + :target: https://translation.odoo-community.org/projects/account-financial-tools-13-0/account-financial-tools-13-0-account_move_line_tax_editable :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/92/12.0 + :target: https://runbot.odoo-community.org/runbot/92/13.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| -Allows to edit taxes on account move lines +Allows to edit taxes on account move lines. **Table of contents** @@ -38,7 +38,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -73,6 +73,6 @@ 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. -This module is part of the `OCA/account-financial-tools `_ project on GitHub. +This module is part of the `OCA/account-financial-tools `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_move_line_tax_editable/__manifest__.py b/account_move_line_tax_editable/__manifest__.py index c5a925e7f..4383bf9a0 100644 --- a/account_move_line_tax_editable/__manifest__.py +++ b/account_move_line_tax_editable/__manifest__.py @@ -3,11 +3,10 @@ { "name": "Account Move Line Tax Editable", - "summary": """ - Allows to edit taxes on non-posted account move lines""", - "version": "12.0.1.0.0", + "summary": "Allows to edit taxes on non-posted account move lines", + "version": "13.0.1.0.0", "license": "AGPL-3", - "author": "ACSONE SA/NV,Odoo Community Association (OCA)", + "author": "ACSONE SA/NV, Odoo Community Association (OCA)", "website": "https://github.com/OCA/account-financial-tools", "depends": ["account"], "data": ["views/account_move.xml", "views/account_move_line.xml"], diff --git a/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot b/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot index 0aecf7441..7067346f5 100644 --- a/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot +++ b/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot @@ -1,12 +1,12 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * account_move_line_tax_editable +# * account_move_line_tax_editable # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 12.0\n" +"Project-Id-Version: Odoo Server 13.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: <>\n" +"Last-Translator: \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" @@ -22,4 +22,3 @@ msgstr "" #: model:ir.model,name:account_move_line_tax_editable.model_account_move_line msgid "Journal Item" msgstr "" - diff --git a/account_move_line_tax_editable/models/account_move_line.py b/account_move_line_tax_editable/models/account_move_line.py index f026f570b..25372fd54 100644 --- a/account_move_line_tax_editable/models/account_move_line.py +++ b/account_move_line_tax_editable/models/account_move_line.py @@ -12,7 +12,6 @@ class AccountMoveLine(models.Model): 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: diff --git a/account_move_line_tax_editable/readme/DESCRIPTION.rst b/account_move_line_tax_editable/readme/DESCRIPTION.rst index a79682833..d4228b83f 100644 --- a/account_move_line_tax_editable/readme/DESCRIPTION.rst +++ b/account_move_line_tax_editable/readme/DESCRIPTION.rst @@ -1 +1 @@ -Allows to edit taxes on account move lines +Allows to edit taxes on account move lines. diff --git a/account_move_line_tax_editable/static/description/index.html b/account_move_line_tax_editable/static/description/index.html index b18679516..1e0bd071e 100644 --- a/account_move_line_tax_editable/static/description/index.html +++ b/account_move_line_tax_editable/static/description/index.html @@ -367,8 +367,8 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/account-financial-tools Translate me on Weblate Try me on Runbot

-

Allows to edit taxes on account move lines

+

Beta License: AGPL-3 OCA/account-financial-tools Translate me on Weblate Try me on Runbot

+

Allows to edit taxes on account move lines.

Table of contents

    @@ -386,7 +386,7 @@ ul.auto-toc {

    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.

    +feedback.

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

@@ -415,7 +415,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

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.

-

This module is part of the OCA/account-financial-tools project on GitHub.

+

This module is part of the OCA/account-financial-tools project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/account_move_line_tax_editable/views/account_move.xml b/account_move_line_tax_editable/views/account_move.xml index 53971b811..0bdc3c66a 100644 --- a/account_move_line_tax_editable/views/account_move.xml +++ b/account_move_line_tax_editable/views/account_move.xml @@ -1,21 +1,27 @@ - + - - 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 index a4c04681e..c9e45f6c5 100644 --- a/account_move_line_tax_editable/views/account_move_line.xml +++ b/account_move_line_tax_editable/views/account_move_line.xml @@ -1,26 +1,29 @@ - + - - - account.move.line.form (in account_move_line_tax_editable) + account.move.line.form (in account_move_line_tax_editable) account.move.line - + - + 0 - {'readonly': [('is_tax_editable', '=', False)]} + {'readonly': [('is_tax_editable', '=', False)]} 0 - {'readonly': [('is_tax_editable', '=', False)]} + {'readonly': [('is_tax_editable', '=', False)]} - From ec273115f5459761f9fe301feb7b9706f7b7ee54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Villarreal=20Ortega?= Date: Tue, 3 Nov 2020 11:10:55 +0100 Subject: [PATCH 09/18] [FIX] account_move_line_tax_editable: * [FIX] Do not hide Originator Tax * [IMP] Add optional hide option to Originator Tax * [FIX] Drop tax_ids field from Journal Item page, as it is already displayed. --- account_move_line_tax_editable/views/account_move.xml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/account_move_line_tax_editable/views/account_move.xml b/account_move_line_tax_editable/views/account_move.xml index 0bdc3c66a..2d4fcb9a2 100644 --- a/account_move_line_tax_editable/views/account_move.xml +++ b/account_move_line_tax_editable/views/account_move.xml @@ -14,12 +14,8 @@ - From 75b8214f182f5f231f942d84cdc14d9ea924def6 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Tue, 3 Nov 2020 12:15:01 +0000 Subject: [PATCH 10/18] account_move_line_tax_editable 13.0.1.1.0 --- account_move_line_tax_editable/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_move_line_tax_editable/__manifest__.py b/account_move_line_tax_editable/__manifest__.py index 4383bf9a0..3c28e9a9d 100644 --- a/account_move_line_tax_editable/__manifest__.py +++ b/account_move_line_tax_editable/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Account Move Line Tax Editable", "summary": "Allows to edit taxes on non-posted account move lines", - "version": "13.0.1.0.0", + "version": "13.0.1.1.0", "license": "AGPL-3", "author": "ACSONE SA/NV, Odoo Community Association (OCA)", "website": "https://github.com/OCA/account-financial-tools", From e3d4cf80331e2da320d53b85c811dc3d5564d5be Mon Sep 17 00:00:00 2001 From: Zar21 Date: Tue, 9 Mar 2021 17:29:52 +0100 Subject: [PATCH 11/18] [MIG] account_move_line_tax_editable: Migration to 14.0 --- account_move_line_tax_editable/README.rst | 10 +++++----- account_move_line_tax_editable/__manifest__.py | 2 +- .../i18n/account_move_line_tax_editable.pot | 17 ++++++++++++++++- .../static/description/index.html | 6 +++--- .../test_account_move_line_tax_editable.py | 2 +- 5 files changed, 26 insertions(+), 11 deletions(-) diff --git a/account_move_line_tax_editable/README.rst b/account_move_line_tax_editable/README.rst index 679e7cbb1..7f0c40958 100644 --- a/account_move_line_tax_editable/README.rst +++ b/account_move_line_tax_editable/README.rst @@ -14,13 +14,13 @@ Account Move Line Tax Editable :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github - :target: https://github.com/OCA/account-financial-tools/tree/13.0/account_move_line_tax_editable + :target: https://github.com/OCA/account-financial-tools/tree/14.0/account_move_line_tax_editable :alt: OCA/account-financial-tools .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/account-financial-tools-13-0/account-financial-tools-13-0-account_move_line_tax_editable + :target: https://translation.odoo-community.org/projects/account-financial-tools-14-0/account-financial-tools-14-0-account_move_line_tax_editable :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/92/13.0 + :target: https://runbot.odoo-community.org/runbot/92/14.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -38,7 +38,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -73,6 +73,6 @@ 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. -This module is part of the `OCA/account-financial-tools `_ project on GitHub. +This module is part of the `OCA/account-financial-tools `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_move_line_tax_editable/__manifest__.py b/account_move_line_tax_editable/__manifest__.py index 3c28e9a9d..371efd67a 100644 --- a/account_move_line_tax_editable/__manifest__.py +++ b/account_move_line_tax_editable/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Account Move Line Tax Editable", "summary": "Allows to edit taxes on non-posted account move lines", - "version": "13.0.1.1.0", + "version": "14.0.1.1.0", "license": "AGPL-3", "author": "ACSONE SA/NV, Odoo Community Association (OCA)", "website": "https://github.com/OCA/account-financial-tools", diff --git a/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot b/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot index 7067346f5..bb61ce82e 100644 --- a/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot +++ b/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 13.0\n" +"Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -13,6 +13,16 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__display_name +msgid "Display Name" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__id +msgid "ID" +msgstr "" + #. 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?" @@ -22,3 +32,8 @@ msgstr "" #: model:ir.model,name:account_move_line_tax_editable.model_account_move_line msgid "Journal Item" msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line____last_update +msgid "Last Modified on" +msgstr "" diff --git a/account_move_line_tax_editable/static/description/index.html b/account_move_line_tax_editable/static/description/index.html index 1e0bd071e..c6029720a 100644 --- a/account_move_line_tax_editable/static/description/index.html +++ b/account_move_line_tax_editable/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/account-financial-tools Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/account-financial-tools Translate me on Weblate Try me on Runbot

Allows to edit taxes on account move lines.

Table of contents

@@ -386,7 +386,7 @@ ul.auto-toc {

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.

+feedback.

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

@@ -415,7 +415,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

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.

-

This module is part of the OCA/account-financial-tools project on GitHub.

+

This module is part of the OCA/account-financial-tools project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

diff --git a/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py b/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py index 5be4161b0..55556fc6b 100644 --- a/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py +++ b/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py @@ -63,5 +63,5 @@ class TestAccountMoveLineTaxEditable(common.SavepointCase): def test_compute_is_tax_editable(self): self.assertEqual(self.move.line_ids.mapped("is_tax_editable"), [True, True]) - self.move.post() + self.move.action_post() self.assertEqual(self.move.line_ids.mapped("is_tax_editable"), [False, False]) From e16e3ad1b2194648fe13d2c9030acfde93446318 Mon Sep 17 00:00:00 2001 From: mariadforgeflow Date: Tue, 1 Mar 2022 09:01:56 +0100 Subject: [PATCH 12/18] [FIX] account_move_line_tax_editable: make tax field actually editable --- .../i18n/account_move_line_tax_editable.pot | 10 +++++ account_move_line_tax_editable/i18n/es.po | 39 +++++++++++++++++++ .../models/account_move_line.py | 29 ++++++++++++++ .../test_account_move_line_tax_editable.py | 26 ++++++++++++- 4 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 account_move_line_tax_editable/i18n/es.po diff --git a/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot b/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot index bb61ce82e..3f7dda795 100644 --- a/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot +++ b/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot @@ -23,6 +23,11 @@ msgstr "" msgid "ID" msgstr "" +#. module: account_move_line_tax_editable +#: model:ir.model.fields,help:account_move_line_tax_editable.field_account_move_line__tax_line_id +msgid "Indicates that this journal item is a tax line" +msgstr "" + #. 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?" @@ -37,3 +42,8 @@ msgstr "" #: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line____last_update msgid "Last Modified on" msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__tax_line_id +msgid "Originator Tax" +msgstr "" diff --git a/account_move_line_tax_editable/i18n/es.po b/account_move_line_tax_editable/i18n/es.po new file mode 100644 index 000000000..bb61ce82e --- /dev/null +++ b/account_move_line_tax_editable/i18n/es.po @@ -0,0 +1,39 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# * account_move_line_tax_editable +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 14.0\n" +"Report-Msgid-Bugs-To: \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: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__display_name +msgid "Display Name" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__id +msgid "ID" +msgstr "" + +#. 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 "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line____last_update +msgid "Last Modified on" +msgstr "" diff --git a/account_move_line_tax_editable/models/account_move_line.py b/account_move_line_tax_editable/models/account_move_line.py index 25372fd54..27f4c57a8 100644 --- a/account_move_line_tax_editable/models/account_move_line.py +++ b/account_move_line_tax_editable/models/account_move_line.py @@ -12,7 +12,36 @@ class AccountMoveLine(models.Model): string="Is tax data editable?", compute="_compute_is_tax_editable" ) + tax_line_id = fields.Many2one(inverse="_inverse_tax_line_id") + @api.depends("move_id.state") def _compute_is_tax_editable(self): for rec in self: rec.is_tax_editable = rec.move_id.state == "draft" + + def _inverse_tax_line_id(self): + for rec in self: + repartition_type = rec.tax_repartition_line_id.repartition_type or "tax" + factor_percent = rec.tax_repartition_line_id.factor_percent or 100 + has_account = bool(rec.tax_repartition_line_id.account_id) + if rec.move_id.move_type in ("out_refund", "in_refund"): + repartition_lines = rec.tax_line_id.refund_repartition_line_ids + else: + repartition_lines = rec.tax_line_id.invoice_repartition_line_ids + lines = repartition_lines.filtered( + lambda rl: rl.repartition_type == repartition_type + and rl.factor_percent == factor_percent + ) + if len(lines) > 1: + lines = ( + lines.filtered( + lambda rl: rl.repartition_type == "base" + or has_account is bool(rl.account_id) + )[:1] + or lines[:1] + ) + elif not lines: + lines = repartition_lines.filtered( + lambda rl: rl.repartition_type == repartition_type + )[:1] + rec.tax_repartition_line_id = lines diff --git a/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py b/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py index 55556fc6b..bfafdbf0d 100644 --- a/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py +++ b/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py @@ -41,7 +41,7 @@ class TestAccountMoveLineTaxEditable(common.SavepointCase): 0, 0, { - "name": "move test", + "name": "move test line 1", "debit": 0.0, "credit": 1000.0, "account_id": account300.id, @@ -51,7 +51,7 @@ class TestAccountMoveLineTaxEditable(common.SavepointCase): 0, 0, { - "name": "move test", + "name": "move test line 2", "debit": 1000.0, "credit": 0.0, "account_id": account100.id, @@ -60,8 +60,30 @@ class TestAccountMoveLineTaxEditable(common.SavepointCase): ], } cls.move = cls.env["account.move"].create(move_vals) + cls.tax15 = cls.env["account.tax"].create( + { + "name": "Test tax 15", + "amount": 15, + } + ) def test_compute_is_tax_editable(self): self.assertEqual(self.move.line_ids.mapped("is_tax_editable"), [True, True]) self.move.action_post() self.assertEqual(self.move.line_ids.mapped("is_tax_editable"), [False, False]) + + def test_tax_edited(self): + line1 = self.move.line_ids[0] + line1.tax_line_id = self.tax15.id + line2 = self.move.line_ids[1] + self.move.action_post() + self.assertEqual(line1.tax_line_id.id, self.tax15.id) + self.assertEqual(line2.tax_line_id.id, False) + self.assertEqual(line1.tax_repartition_line_id.tax_id.id, self.tax15.id) + + def test_tax_not_edited(self): + """In this case we set the tax_repartition_line_id field, simulating that the + move came from an invoice with tax applied. Thus, tax_line_id should be computed""" + line1 = self.move.line_ids[1] + line1.tax_repartition_line_id = self.tax15.invoice_repartition_line_ids[1] + self.assertEqual(line1.tax_line_id.id, self.tax15.id) From 2becbc26ee061bd7dc0eefeefedf837bc069fc69 Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Fri, 6 May 2022 10:32:09 +0000 Subject: [PATCH 13/18] account_move_line_tax_editable 14.0.2.0.0 --- .../__manifest__.py | 2 +- account_move_line_tax_editable/i18n/de.po | 25 +++++++++++++++++ account_move_line_tax_editable/i18n/es_EC.po | 25 +++++++++++++++++ account_move_line_tax_editable/i18n/fr.po | 25 +++++++++++++++++ account_move_line_tax_editable/i18n/hr.po | 25 +++++++++++++++++ account_move_line_tax_editable/i18n/pt.po | 27 ++++++++++++++++++- account_move_line_tax_editable/i18n/tr_TR.po | 25 +++++++++++++++++ 7 files changed, 152 insertions(+), 2 deletions(-) diff --git a/account_move_line_tax_editable/__manifest__.py b/account_move_line_tax_editable/__manifest__.py index 371efd67a..7dba3fcab 100644 --- a/account_move_line_tax_editable/__manifest__.py +++ b/account_move_line_tax_editable/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Account Move Line Tax Editable", "summary": "Allows to edit taxes on non-posted account move lines", - "version": "14.0.1.1.0", + "version": "14.0.2.0.0", "license": "AGPL-3", "author": "ACSONE SA/NV, Odoo Community Association (OCA)", "website": "https://github.com/OCA/account-financial-tools", diff --git a/account_move_line_tax_editable/i18n/de.po b/account_move_line_tax_editable/i18n/de.po index c6e857442..4bcf225ec 100644 --- a/account_move_line_tax_editable/i18n/de.po +++ b/account_move_line_tax_editable/i18n/de.po @@ -19,6 +19,21 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Generator: Weblate 3.1.1\n" +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__display_name +msgid "Display Name" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__id +msgid "ID" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,help:account_move_line_tax_editable.field_account_move_line__tax_line_id +msgid "Indicates that this journal item is a tax line" +msgstr "" + #. 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?" @@ -28,3 +43,13 @@ msgstr "Sind Steuerdaten änderbar?" #: model:ir.model,name:account_move_line_tax_editable.model_account_move_line msgid "Journal Item" msgstr "Journalposten" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line____last_update +msgid "Last Modified on" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__tax_line_id +msgid "Originator Tax" +msgstr "" diff --git a/account_move_line_tax_editable/i18n/es_EC.po b/account_move_line_tax_editable/i18n/es_EC.po index 0a9154d97..d62377f54 100644 --- a/account_move_line_tax_editable/i18n/es_EC.po +++ b/account_move_line_tax_editable/i18n/es_EC.po @@ -19,6 +19,21 @@ msgstr "" "Content-Transfer-Encoding: \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__display_name +msgid "Display Name" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__id +msgid "ID" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,help:account_move_line_tax_editable.field_account_move_line__tax_line_id +msgid "Indicates that this journal item is a tax line" +msgstr "" + #. 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?" @@ -28,3 +43,13 @@ msgstr "" #: model:ir.model,name:account_move_line_tax_editable.model_account_move_line msgid "Journal Item" msgstr "Detalle Contable" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line____last_update +msgid "Last Modified on" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__tax_line_id +msgid "Originator Tax" +msgstr "" diff --git a/account_move_line_tax_editable/i18n/fr.po b/account_move_line_tax_editable/i18n/fr.po index 6c6a9b2f0..db89ccfd3 100644 --- a/account_move_line_tax_editable/i18n/fr.po +++ b/account_move_line_tax_editable/i18n/fr.po @@ -18,6 +18,21 @@ msgstr "" "Content-Transfer-Encoding: \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__display_name +msgid "Display Name" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__id +msgid "ID" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,help:account_move_line_tax_editable.field_account_move_line__tax_line_id +msgid "Indicates that this journal item is a tax line" +msgstr "" + #. 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?" @@ -27,3 +42,13 @@ msgstr "Les données de la taxe sont-elles éditables ?" #: model:ir.model,name:account_move_line_tax_editable.model_account_move_line msgid "Journal Item" msgstr "Écriture comptable" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line____last_update +msgid "Last Modified on" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__tax_line_id +msgid "Originator Tax" +msgstr "" diff --git a/account_move_line_tax_editable/i18n/hr.po b/account_move_line_tax_editable/i18n/hr.po index 9e4212686..8a893d61f 100644 --- a/account_move_line_tax_editable/i18n/hr.po +++ b/account_move_line_tax_editable/i18n/hr.po @@ -19,6 +19,21 @@ msgstr "" "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__display_name +msgid "Display Name" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__id +msgid "ID" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,help:account_move_line_tax_editable.field_account_move_line__tax_line_id +msgid "Indicates that this journal item is a tax line" +msgstr "" + #. 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?" @@ -28,3 +43,13 @@ msgstr "" #: model:ir.model,name:account_move_line_tax_editable.model_account_move_line msgid "Journal Item" msgstr "Stavka dnevnika" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line____last_update +msgid "Last Modified on" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__tax_line_id +msgid "Originator Tax" +msgstr "" diff --git a/account_move_line_tax_editable/i18n/pt.po b/account_move_line_tax_editable/i18n/pt.po index 88b70fb19..1b823da37 100644 --- a/account_move_line_tax_editable/i18n/pt.po +++ b/account_move_line_tax_editable/i18n/pt.po @@ -1,6 +1,6 @@ # Translation of Odoo Server. # This file contains the translation of the following modules: -# * account_move_line_tax_editable +# * account_move_line_tax_editable # msgid "" msgstr "" @@ -16,6 +16,21 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 3.7.1\n" +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__display_name +msgid "Display Name" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__id +msgid "ID" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,help:account_move_line_tax_editable.field_account_move_line__tax_line_id +msgid "Indicates that this journal item is a tax line" +msgstr "" + #. 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?" @@ -25,3 +40,13 @@ msgstr "Os dados de impostos são editáveis?" #: model:ir.model,name:account_move_line_tax_editable.model_account_move_line msgid "Journal Item" msgstr "Item do Diário" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line____last_update +msgid "Last Modified on" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__tax_line_id +msgid "Originator Tax" +msgstr "" diff --git a/account_move_line_tax_editable/i18n/tr_TR.po b/account_move_line_tax_editable/i18n/tr_TR.po index 70fe5266a..6077d052d 100644 --- a/account_move_line_tax_editable/i18n/tr_TR.po +++ b/account_move_line_tax_editable/i18n/tr_TR.po @@ -19,6 +19,21 @@ msgstr "" "Content-Transfer-Encoding: \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__display_name +msgid "Display Name" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__id +msgid "ID" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,help:account_move_line_tax_editable.field_account_move_line__tax_line_id +msgid "Indicates that this journal item is a tax line" +msgstr "" + #. 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?" @@ -28,3 +43,13 @@ msgstr "" #: model:ir.model,name:account_move_line_tax_editable.model_account_move_line msgid "Journal Item" msgstr "Yevmiye Öğe" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line____last_update +msgid "Last Modified on" +msgstr "" + +#. module: account_move_line_tax_editable +#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__tax_line_id +msgid "Originator Tax" +msgstr "" From 215edd2b53fee6b9828888d8cf4e57e4b6f2ab38 Mon Sep 17 00:00:00 2001 From: manu Date: Fri, 6 May 2022 13:58:12 +0200 Subject: [PATCH 14/18] [MIG]account_move_line_tax_editable: Migration to 15.0 --- account_move_line_tax_editable/README.rst | 14 +++++++++----- account_move_line_tax_editable/__manifest__.py | 2 +- .../i18n/account_move_line_tax_editable.pot | 17 +---------------- .../readme/CONTRIBUTORS.rst | 4 ++++ .../static/description/index.html | 10 +++++++--- 5 files changed, 22 insertions(+), 25 deletions(-) diff --git a/account_move_line_tax_editable/README.rst b/account_move_line_tax_editable/README.rst index 7f0c40958..0ada4d5a4 100644 --- a/account_move_line_tax_editable/README.rst +++ b/account_move_line_tax_editable/README.rst @@ -14,13 +14,13 @@ Account Move Line Tax Editable :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html :alt: License: AGPL-3 .. |badge3| image:: https://img.shields.io/badge/github-OCA%2Faccount--financial--tools-lightgray.png?logo=github - :target: https://github.com/OCA/account-financial-tools/tree/14.0/account_move_line_tax_editable + :target: https://github.com/OCA/account-financial-tools/tree/15.0/account_move_line_tax_editable :alt: OCA/account-financial-tools .. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png - :target: https://translation.odoo-community.org/projects/account-financial-tools-14-0/account-financial-tools-14-0-account_move_line_tax_editable + :target: https://translation.odoo-community.org/projects/account-financial-tools-15-0/account-financial-tools-15-0-account_move_line_tax_editable :alt: Translate me on Weblate .. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png - :target: https://runbot.odoo-community.org/runbot/92/14.0 + :target: https://runbot.odoo-community.org/runbot/92/15.0 :alt: Try me on Runbot |badge1| |badge2| |badge3| |badge4| |badge5| @@ -38,7 +38,7 @@ 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 `_. +`feedback `_. Do not contact contributors directly about support or help with technical issues. @@ -60,6 +60,10 @@ Contributors * Ernesto Tejeda +* `Sygel `_: + + * Manuel Regidor + Maintainers ~~~~~~~~~~~ @@ -73,6 +77,6 @@ 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. -This module is part of the `OCA/account-financial-tools `_ project on GitHub. +This module is part of the `OCA/account-financial-tools `_ project on GitHub. You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/account_move_line_tax_editable/__manifest__.py b/account_move_line_tax_editable/__manifest__.py index 7dba3fcab..96cf8b3f8 100644 --- a/account_move_line_tax_editable/__manifest__.py +++ b/account_move_line_tax_editable/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Account Move Line Tax Editable", "summary": "Allows to edit taxes on non-posted account move lines", - "version": "14.0.2.0.0", + "version": "15.0.1.0.0", "license": "AGPL-3", "author": "ACSONE SA/NV, Odoo Community Association (OCA)", "website": "https://github.com/OCA/account-financial-tools", diff --git a/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot b/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot index 3f7dda795..0982ee920 100644 --- a/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot +++ b/account_move_line_tax_editable/i18n/account_move_line_tax_editable.pot @@ -4,7 +4,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Odoo Server 14.0\n" +"Project-Id-Version: Odoo Server 15.0\n" "Report-Msgid-Bugs-To: \n" "Last-Translator: \n" "Language-Team: \n" @@ -13,16 +13,6 @@ msgstr "" "Content-Transfer-Encoding: \n" "Plural-Forms: \n" -#. module: account_move_line_tax_editable -#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__display_name -msgid "Display Name" -msgstr "" - -#. module: account_move_line_tax_editable -#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__id -msgid "ID" -msgstr "" - #. module: account_move_line_tax_editable #: model:ir.model.fields,help:account_move_line_tax_editable.field_account_move_line__tax_line_id msgid "Indicates that this journal item is a tax line" @@ -38,11 +28,6 @@ msgstr "" msgid "Journal Item" msgstr "" -#. module: account_move_line_tax_editable -#: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line____last_update -msgid "Last Modified on" -msgstr "" - #. module: account_move_line_tax_editable #: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__tax_line_id msgid "Originator Tax" diff --git a/account_move_line_tax_editable/readme/CONTRIBUTORS.rst b/account_move_line_tax_editable/readme/CONTRIBUTORS.rst index 444ee578a..5b1100177 100644 --- a/account_move_line_tax_editable/readme/CONTRIBUTORS.rst +++ b/account_move_line_tax_editable/readme/CONTRIBUTORS.rst @@ -4,3 +4,7 @@ * `Tecnativa `_: * Ernesto Tejeda + +* `Sygel `_: + + * Manuel Regidor diff --git a/account_move_line_tax_editable/static/description/index.html b/account_move_line_tax_editable/static/description/index.html index c6029720a..b378f830f 100644 --- a/account_move_line_tax_editable/static/description/index.html +++ b/account_move_line_tax_editable/static/description/index.html @@ -367,7 +367,7 @@ ul.auto-toc { !! This file is generated by oca-gen-addon-readme !! !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! --> -

Beta License: AGPL-3 OCA/account-financial-tools Translate me on Weblate Try me on Runbot

+

Beta License: AGPL-3 OCA/account-financial-tools Translate me on Weblate Try me on Runbot

Allows to edit taxes on account move lines.

Table of contents

@@ -386,7 +386,7 @@ ul.auto-toc {

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.

+feedback.

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

@@ -406,6 +406,10 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
  • Ernesto Tejeda
  • +
  • Sygel:
      +
    • Manuel Regidor
    • +
    +
  • @@ -415,7 +419,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome

    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.

    -

    This module is part of the OCA/account-financial-tools project on GitHub.

    +

    This module is part of the OCA/account-financial-tools project on GitHub.

    You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

    From ecd9603b73b2dbbd27caddb92464b09f479c44fc Mon Sep 17 00:00:00 2001 From: OCA-git-bot Date: Fri, 13 May 2022 13:42:37 +0000 Subject: [PATCH 15/18] account_move_line_tax_editable 15.0.1.0.1 --- account_move_line_tax_editable/__manifest__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/account_move_line_tax_editable/__manifest__.py b/account_move_line_tax_editable/__manifest__.py index 96cf8b3f8..eceffe222 100644 --- a/account_move_line_tax_editable/__manifest__.py +++ b/account_move_line_tax_editable/__manifest__.py @@ -4,7 +4,7 @@ { "name": "Account Move Line Tax Editable", "summary": "Allows to edit taxes on non-posted account move lines", - "version": "15.0.1.0.0", + "version": "15.0.1.0.1", "license": "AGPL-3", "author": "ACSONE SA/NV, Odoo Community Association (OCA)", "website": "https://github.com/OCA/account-financial-tools", From 5f1b40d971ba1445225f6e6bef8963907cf9f1f0 Mon Sep 17 00:00:00 2001 From: "Luis D. Lafaurie" Date: Tue, 4 Oct 2022 15:15:46 +0000 Subject: [PATCH 16/18] Translated using Weblate (Spanish) Currently translated at 60.0% (3 of 5 strings) Translation: account-financial-tools-15.0/account-financial-tools-15.0-account_move_line_tax_editable Translate-URL: https://translation.odoo-community.org/projects/account-financial-tools-15-0/account-financial-tools-15-0-account_move_line_tax_editable/es/ --- account_move_line_tax_editable/i18n/es.po | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/account_move_line_tax_editable/i18n/es.po b/account_move_line_tax_editable/i18n/es.po index bb61ce82e..f8985b6a8 100644 --- a/account_move_line_tax_editable/i18n/es.po +++ b/account_move_line_tax_editable/i18n/es.po @@ -6,12 +6,15 @@ msgid "" msgstr "" "Project-Id-Version: Odoo Server 14.0\n" "Report-Msgid-Bugs-To: \n" -"Last-Translator: \n" +"PO-Revision-Date: 2022-10-04 17:36+0000\n" +"Last-Translator: Luis D. Lafaurie \n" "Language-Team: \n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: \n" -"Plural-Forms: \n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.3.2\n" #. module: account_move_line_tax_editable #: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__display_name @@ -21,7 +24,7 @@ msgstr "" #. module: account_move_line_tax_editable #: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line__id msgid "ID" -msgstr "" +msgstr "Identificació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 @@ -31,9 +34,9 @@ msgstr "" #. module: account_move_line_tax_editable #: model:ir.model,name:account_move_line_tax_editable.model_account_move_line msgid "Journal Item" -msgstr "" +msgstr "Apunte contable" #. module: account_move_line_tax_editable #: model:ir.model.fields,field_description:account_move_line_tax_editable.field_account_move_line____last_update msgid "Last Modified on" -msgstr "" +msgstr "Modificado el" From 6479b58d2c66230f6528c062c4751fba3b0604d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Mart=C3=ADnez?= Date: Tue, 11 Oct 2022 15:26:40 +0200 Subject: [PATCH 17/18] [FIX] account_move_line_tax_editable: Fix tests --- .../tests/test_account_move_line_tax_editable.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py b/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py index bfafdbf0d..0d8a97326 100644 --- a/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py +++ b/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py @@ -5,10 +5,10 @@ import odoo.tests.common as common from odoo import fields -class TestAccountMoveLineTaxEditable(common.SavepointCase): +class TestAccountMoveLineTaxEditable(common.TransactionCase): @classmethod def setUpClass(cls): - super(TestAccountMoveLineTaxEditable, cls).setUpClass() + super().setUpClass() acc_obj = cls.env["account.account"] account100 = acc_obj.create( From 580a8d21c7b2a23549f37cf8ab4c183deebabf79 Mon Sep 17 00:00:00 2001 From: "Luis J. Salvatierra" Date: Mon, 28 Nov 2022 15:56:32 +0100 Subject: [PATCH 18/18] [MIG] account_move_line_tax_editable: Migration to 16.0 Update account_move_line_tax_editable/i18n/es.po Co-authored-by: Yadier-Tecnativa <129773077+Yadier-Tecnativa@users.noreply.github.com> --- .../__manifest__.py | 4 +- account_move_line_tax_editable/i18n/es.po | 2 +- .../readme/CONTRIBUTORS.rst | 4 + .../test_account_move_line_tax_editable.py | 157 ++++++++++-------- .../views/account_move.xml | 27 ++- .../views/account_move_line.xml | 29 ---- .../addons/account_move_line_tax_editable | 1 + setup/account_move_line_tax_editable/setup.py | 6 + 8 files changed, 121 insertions(+), 109 deletions(-) delete mode 100644 account_move_line_tax_editable/views/account_move_line.xml create mode 120000 setup/account_move_line_tax_editable/odoo/addons/account_move_line_tax_editable create mode 100644 setup/account_move_line_tax_editable/setup.py diff --git a/account_move_line_tax_editable/__manifest__.py b/account_move_line_tax_editable/__manifest__.py index eceffe222..991d516b1 100644 --- a/account_move_line_tax_editable/__manifest__.py +++ b/account_move_line_tax_editable/__manifest__.py @@ -4,10 +4,10 @@ { "name": "Account Move Line Tax Editable", "summary": "Allows to edit taxes on non-posted account move lines", - "version": "15.0.1.0.1", + "version": "16.0.1.0.0", "license": "AGPL-3", "author": "ACSONE SA/NV, Odoo Community Association (OCA)", "website": "https://github.com/OCA/account-financial-tools", "depends": ["account"], - "data": ["views/account_move.xml", "views/account_move_line.xml"], + "data": ["views/account_move.xml"], } diff --git a/account_move_line_tax_editable/i18n/es.po b/account_move_line_tax_editable/i18n/es.po index f8985b6a8..110b221a1 100644 --- a/account_move_line_tax_editable/i18n/es.po +++ b/account_move_line_tax_editable/i18n/es.po @@ -29,7 +29,7 @@ msgstr "Identificació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 "" +msgstr "¿Los datos fiscales son editables?" #. module: account_move_line_tax_editable #: model:ir.model,name:account_move_line_tax_editable.model_account_move_line diff --git a/account_move_line_tax_editable/readme/CONTRIBUTORS.rst b/account_move_line_tax_editable/readme/CONTRIBUTORS.rst index 5b1100177..9478ec3f2 100644 --- a/account_move_line_tax_editable/readme/CONTRIBUTORS.rst +++ b/account_move_line_tax_editable/readme/CONTRIBUTORS.rst @@ -8,3 +8,7 @@ * `Sygel `_: * Manuel Regidor + +* `Factor Libre `_: + + * Luis J. Salvatierra diff --git a/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py b/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py index 0d8a97326..199c57bb3 100644 --- a/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py +++ b/account_move_line_tax_editable/tests/test_account_move_line_tax_editable.py @@ -1,89 +1,104 @@ # Copyright 2019 Tecnativa - Ernesto Tejeda # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -import odoo.tests.common as common from odoo import fields +from odoo.tests import tagged + +from odoo.addons.account.tests.common import AccountTestInvoicingCommon -class TestAccountMoveLineTaxEditable(common.TransactionCase): +@tagged("post_install", "-at_install") +class TestAccountMoveLineTaxEditable(AccountTestInvoicingCommon): @classmethod - def setUpClass(cls): - super().setUpClass() - - acc_obj = cls.env["account.account"] - account100 = acc_obj.create( - { - "code": "100", - "name": "Account 100", - "user_type_id": cls.env.ref("account.data_account_type_receivable").id, - "reconcile": True, - } + def setUpClass(cls, chart_template_ref=None): + super().setUpClass(chart_template_ref=chart_template_ref) + refund_repartitions = cls.company_data[ + "default_tax_sale" + ].refund_repartition_line_ids + tax_repartition_line = refund_repartitions.filtered( + lambda line: line.repartition_type == "tax" ) - account300 = acc_obj.create( + cls.account_revenue = cls.company_data["default_account_revenue"] + cls.account_expense = cls.company_data["default_account_expense"] + cls.account_tax_sale = cls.company_data["default_account_tax_sale"] + cls.tax_sale = cls.company_data["default_tax_sale"] + cls.tax_sale_copy = cls.tax_sale.copy() + cls.test_move = cls.env["account.move"].create( { - "code": "300", - "name": "Account 300", - "user_type_id": cls.env.ref( - "account.data_account_type_other_income" - ).id, - } - ) - - journal = cls.env["account.journal"].create( - {"name": "Test journal", "type": "sale", "code": "TEST"} - ) - move_vals = { - "journal_id": journal.id, - "name": "move test", - "date": fields.Date.today(), - "line_ids": [ - ( - 0, - 0, - { - "name": "move test line 1", - "debit": 0.0, - "credit": 1000.0, - "account_id": account300.id, - }, - ), - ( - 0, - 0, - { - "name": "move test line 2", - "debit": 1000.0, - "credit": 0.0, - "account_id": account100.id, - }, - ), - ], - } - cls.move = cls.env["account.move"].create(move_vals) - cls.tax15 = cls.env["account.tax"].create( - { - "name": "Test tax 15", - "amount": 15, + "move_type": "entry", + "date": fields.Date.from_string("2016-01-01"), + "line_ids": [ + ( + 0, + None, + { + "name": "revenue line 1", + "account_id": cls.account_revenue.id, + "debit": 500.0, + "credit": 0.0, + }, + ), + ( + 0, + None, + { + "name": "revenue line 2", + "account_id": cls.account_revenue.id, + "debit": 1000.0, + "credit": 0.0, + "tax_ids": [(6, 0, cls.tax_sale.ids)], + }, + ), + ( + 0, + None, + { + "name": "tax line", + "account_id": cls.account_tax_sale.id, + "debit": 150.0, + "credit": 0.0, + "tax_repartition_line_id": tax_repartition_line.id, + }, + ), + ( + 0, + None, + { + "name": "counterpart line", + "account_id": cls.account_expense.id, + "debit": 0.0, + "credit": 1650.0, + }, + ), + ], } ) def test_compute_is_tax_editable(self): - self.assertEqual(self.move.line_ids.mapped("is_tax_editable"), [True, True]) - self.move.action_post() - self.assertEqual(self.move.line_ids.mapped("is_tax_editable"), [False, False]) + self.assertTrue(all(self.test_move.line_ids.mapped("is_tax_editable"))) + self.test_move.action_post() + self.assertFalse(any(self.test_move.line_ids.mapped("is_tax_editable"))) def test_tax_edited(self): - line1 = self.move.line_ids[0] - line1.tax_line_id = self.tax15.id - line2 = self.move.line_ids[1] - self.move.action_post() - self.assertEqual(line1.tax_line_id.id, self.tax15.id) - self.assertEqual(line2.tax_line_id.id, False) - self.assertEqual(line1.tax_repartition_line_id.tax_id.id, self.tax15.id) + tax_line = self.test_move.line_ids.filtered( + lambda x: x.account_id == self.account_tax_sale + ) + self.assertEqual(tax_line.tax_repartition_line_id.tax_id, self.tax_sale) + self.assertEqual(tax_line.tax_line_id, self.tax_sale) + tax_line.tax_line_id = self.tax_sale_copy.id + self.test_move.action_post() + self.assertEqual(tax_line.tax_line_id.id, self.tax_sale_copy.id) + self.assertEqual( + tax_line.tax_repartition_line_id.tax_id.id, self.tax_sale_copy.id + ) def test_tax_not_edited(self): """In this case we set the tax_repartition_line_id field, simulating that the move came from an invoice with tax applied. Thus, tax_line_id should be computed""" - line1 = self.move.line_ids[1] - line1.tax_repartition_line_id = self.tax15.invoice_repartition_line_ids[1] - self.assertEqual(line1.tax_line_id.id, self.tax15.id) + tax_line = self.test_move.line_ids.filtered( + lambda x: x.account_id == self.account_tax_sale + ) + tax_line.tax_line_id = self.tax_sale_copy.id + tax_line.tax_repartition_line_id = ( + self.tax_sale_copy.invoice_repartition_line_ids[1] + ) + self.assertEqual(tax_line.tax_line_id.id, self.tax_sale_copy.id) diff --git a/account_move_line_tax_editable/views/account_move.xml b/account_move_line_tax_editable/views/account_move.xml index 2d4fcb9a2..b42b05372 100644 --- a/account_move_line_tax_editable/views/account_move.xml +++ b/account_move_line_tax_editable/views/account_move.xml @@ -1,5 +1,6 @@ @@ -8,14 +9,28 @@ - + + 0 + {'readonly': [('is_tax_editable', '=', False)]} + hide + + + diff --git a/account_move_line_tax_editable/views/account_move_line.xml b/account_move_line_tax_editable/views/account_move_line.xml deleted file mode 100644 index c9e45f6c5..000000000 --- a/account_move_line_tax_editable/views/account_move_line.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - 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)]} - - - - diff --git a/setup/account_move_line_tax_editable/odoo/addons/account_move_line_tax_editable b/setup/account_move_line_tax_editable/odoo/addons/account_move_line_tax_editable new file mode 120000 index 000000000..528a49c6b --- /dev/null +++ b/setup/account_move_line_tax_editable/odoo/addons/account_move_line_tax_editable @@ -0,0 +1 @@ +../../../../account_move_line_tax_editable \ No newline at end of file diff --git a/setup/account_move_line_tax_editable/setup.py b/setup/account_move_line_tax_editable/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/account_move_line_tax_editable/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)