mirror of
https://github.com/OCA/account-financial-tools.git
synced 2025-02-02 12:47:26 +02:00
Merge pull request #630 from feketemihai/11.0-mig-account_move_line_tax_editable
[11.0] [MIG] Migrate account_move_line_tax_editable
This commit is contained in:
45
account_move_line_tax_editable/README.rst
Normal file
45
account_move_line_tax_editable/README.rst
Normal file
@@ -0,0 +1,45 @@
|
||||
.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png
|
||||
:target: https://www.gnu.org/licenses/agpl
|
||||
:alt: License: AGPL-3
|
||||
|
||||
==============================
|
||||
Account Move Line Tax Editable
|
||||
==============================
|
||||
|
||||
Allows to edit taxes on account move lines
|
||||
|
||||
.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
|
||||
:alt: Try me on Runbot
|
||||
:target: https://runbot.odoo-community.org/runbot/92/11.0
|
||||
|
||||
Bug Tracker
|
||||
===========
|
||||
|
||||
Bugs are tracked on `GitHub Issues
|
||||
<https://github.com/OCA/account-financial-tools/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 <thomas.binsfeld@acsone.eu>
|
||||
* Benjamin Willig <benjamin.willig@acsone.eu>
|
||||
|
||||
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.
|
||||
1
account_move_line_tax_editable/__init__.py
Normal file
1
account_move_line_tax_editable/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import models
|
||||
19
account_move_line_tax_editable/__manifest__.py
Normal file
19
account_move_line_tax_editable/__manifest__.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Copyright 2017 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
{
|
||||
'name': 'Account Move Line Tax Editable',
|
||||
'summary': """
|
||||
Allows to edit taxes on non-posted account move lines""",
|
||||
'version': '11.0.1.0.0',
|
||||
'license': 'AGPL-3',
|
||||
'author': 'ACSONE SA/NV,Odoo Community Association (OCA)',
|
||||
'website': 'https://www.acsone.eu',
|
||||
'depends': [
|
||||
'account',
|
||||
],
|
||||
'data': [
|
||||
'views/account_move.xml',
|
||||
'views/account_move_line.xml',
|
||||
],
|
||||
}
|
||||
29
account_move_line_tax_editable/i18n/de.po
Normal file
29
account_move_line_tax_editable/i18n/de.po
Normal file
@@ -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 <rs@techno-flex.de>, 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 <rs@techno-flex.de>, 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"
|
||||
29
account_move_line_tax_editable/i18n/es_EC.po
Normal file
29
account_move_line_tax_editable/i18n/es_EC.po
Normal file
@@ -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 <ovnicraft@gmail.com>, 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 <ovnicraft@gmail.com>, 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"
|
||||
29
account_move_line_tax_editable/i18n/hr.po
Normal file
29
account_move_line_tax_editable/i18n/hr.po
Normal file
@@ -0,0 +1,29 @@
|
||||
# Translation of Odoo Server.
|
||||
# This file contains the translation of the following modules:
|
||||
# * account_move_line_tax_editable
|
||||
#
|
||||
# Translators:
|
||||
# Bole <bole@dajmi5.com>, 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 <bole@dajmi5.com>, 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"
|
||||
29
account_move_line_tax_editable/i18n/tr_TR.po
Normal file
29
account_move_line_tax_editable/i18n/tr_TR.po
Normal file
@@ -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 <neps1192@gmail.com>, 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 <neps1192@gmail.com>, 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"
|
||||
1
account_move_line_tax_editable/models/__init__.py
Normal file
1
account_move_line_tax_editable/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from . import account_move_line
|
||||
23
account_move_line_tax_editable/models/account_move_line.py
Normal file
23
account_move_line_tax_editable/models/account_move_line.py
Normal file
@@ -0,0 +1,23 @@
|
||||
# Copyright 2017 ACSONE SA/NV
|
||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||
|
||||
from odoo import api, fields, models
|
||||
|
||||
|
||||
class AccountMoveLine(models.Model):
|
||||
|
||||
_inherit = 'account.move.line'
|
||||
|
||||
is_tax_editable = fields.Boolean(
|
||||
string="Is tax data editable?", compute='_compute_is_tax_editable')
|
||||
|
||||
@api.multi
|
||||
@api.depends('move_id.state')
|
||||
def _compute_is_tax_editable(self):
|
||||
for rec in self:
|
||||
rec.is_tax_editable = rec._get_is_tax_editable()
|
||||
|
||||
@api.multi
|
||||
def _get_is_tax_editable(self):
|
||||
self.ensure_one()
|
||||
return self.move_id.state == 'draft'
|
||||
BIN
account_move_line_tax_editable/static/description/icon.png
Normal file
BIN
account_move_line_tax_editable/static/description/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.2 KiB |
21
account_move_line_tax_editable/views/account_move.xml
Normal file
21
account_move_line_tax_editable/views/account_move.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2017 ACSONE SA/NV
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="account_move_form_view">
|
||||
<field name="name">account.move.form (in account_move_line_tax_editable)</field>
|
||||
<field name="model">account.move</field>
|
||||
<field name="inherit_id" ref="account.view_move_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='line_ids']/tree/field[@name='name']" position="after">
|
||||
<field name="is_tax_editable" invisible="1"/>
|
||||
<field name="tax_line_id" attrs="{'readonly': [('is_tax_editable', '=', False)]}"/>
|
||||
<field name="tax_ids" attrs="{'readonly': [('is_tax_editable', '=', False)]}"
|
||||
widget="many2many_tags"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
26
account_move_line_tax_editable/views/account_move_line.xml
Normal file
26
account_move_line_tax_editable/views/account_move_line.xml
Normal file
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Copyright 2017 ACSONE SA/NV
|
||||
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -->
|
||||
|
||||
<odoo>
|
||||
|
||||
<record model="ir.ui.view" id="account_move_line_form_view">
|
||||
<field name="name">account.move.line.form (in account_move_line_tax_editable)</field>
|
||||
<field name="model">account.move.line</field>
|
||||
<field name="inherit_id" ref="account.view_move_line_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<field name="tax_line_id" position="before">
|
||||
<field name="is_tax_editable" invisible="1"/>
|
||||
</field>
|
||||
<field name="tax_line_id" position="attributes">
|
||||
<attribute name="readonly">0</attribute>
|
||||
<attribute name="attrs">{'readonly': [('is_tax_editable', '=', False)]}</attribute>
|
||||
</field>
|
||||
<field name="tax_ids" position="attributes">
|
||||
<attribute name="readonly">0</attribute>
|
||||
<attribute name="attrs">{'readonly': [('is_tax_editable', '=', False)]}</attribute>
|
||||
</field>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user