Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
152 changes: 152 additions & 0 deletions account_ecotax_tax/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
=================================
Ecotax Management (with Odoo tax)
=================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:325b4d53ac93f3760030128a6c45ca9e12cef59c1998fc54a3044f230150da9a
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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--fiscal--rule-lightgray.png?logo=github
:target: https://github.com/OCA/account-fiscal-rule/tree/17.0/account_ecotax_tax
:alt: OCA/account-fiscal-rule
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/account-fiscal-rule-17-0/account-fiscal-rule-17-0-account_ecotax_tax
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/account-fiscal-rule&target_branch=17.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows to compute the ecotax amounts from Odoo tax
mechanism. The advantages compared to the base account_ecotax module is
that it allows to : - Manage ecotax amount as included or excluded from
the price of the product - Isolate the amount of the ecotax in a
specific accounting account (set on the tax)

Then the ecotax amounts are not considered as turnover, which could be
good or not depending on your country's legislation or accountant
preferences.

**Table of contents**

.. contents::
:local:

Usage
=====

1. Create a tax group named **"Ecotaxes"**. The sequence must be lower
than other tax groups.

- Set the **Preceding Subtotal** field to **"Without Ecotax"**.

2. Create two taxes named **"Fixed Ecotax"** and **"Weight-Based
Ecotax"**.

- Check the **Ecotax** checkbox.
- Set the correct Python code:

- For the fixed ecotax:

.. code:: python

result = quantity and product.fixed_ecotax * quantity or 0.0

- For the weight-based ecotax:

.. code:: python

result = quantity and product.weight_based_ecotax * quantity or 0.0

- Check the **Included in Base Amount** option.
- The sequence for Ecotax must be lower than the VAT tax.

3. For VAT taxes, check the **Base Affected by Previous Taxes?** option.
4. Add an ecotax classification via the menu **Accounting >
Configuration > Taxes > Ecotax Classification**.

- The ecotax classification can be either a fixed ecotax or a
weight-based ecotax.
- Ecotax classification information can be used for legal
declarations.
- For the fixed ecotax, the ecotax amount is used as a default
value, which can be overridden on the product.
- For the weight-based ecotax, define one ecotax by a coefficient
applied to the weight (depending on the product's materials).
- Set the appropriate tax in the **Sale Ecotax** field.

5. Assign one or more ecotax classifications to a product.

- The ecotax amount can also be manually overridden on the product.

Known issues / Roadmap
======================

Since an update in Odoo
https://github.com/odoo/odoo/commit/13e9833e0bc809a26843890363586f61a37d061c
the case with ecotax as tax included and another tax included does not
work anymore. The ecotax tax should only be used along with price
excluded tax, or be configured as price excluded itself.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/account-fiscal-rule/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/account-fiscal-rule/issues/new?body=module:%20account_ecotax_tax%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Akretion

Contributors
------------

- Mourad EL HADJ MIMOUNE <[email protected]>
- Florian da Costa <[email protected]>

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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.

.. |maintainer-mourad-ehm| image:: https://github.com/mourad-ehm.png?size=40px
:target: https://github.com/mourad-ehm
:alt: mourad-ehm
.. |maintainer-florian-dacosta| image:: https://github.com/florian-dacosta.png?size=40px
:target: https://github.com/florian-dacosta
:alt: florian-dacosta

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-mourad-ehm| |maintainer-florian-dacosta|

This module is part of the `OCA/account-fiscal-rule <https://github.com/OCA/account-fiscal-rule/tree/17.0/account_ecotax_tax>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions account_ecotax_tax/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
24 changes: 24 additions & 0 deletions account_ecotax_tax/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# © 2014-2023 Akretion (http://www.akretion.com)
# @author Mourad EL HADJ MIMOUNE <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Ecotax Management (with Odoo tax)",
"summary": "Use Odoo tax mechanism to compute the ecotaxes ",
"version": "17.0.1.0.1",
"author": "Akretion, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/account-fiscal-rule",
"category": "Localization/Account Taxes",
"license": "AGPL-3",
"maintainers": ["mourad-ehm", "florian-dacosta"],
"depends": [
"account_ecotax",
"account_tax_python",
],
"data": [
"views/account_ecotax_classification_view.xml",
"views/account_tax_view.xml",
"views/account_move_view.xml",
"report/invoice.xml",
],
"installable": True,
}
63 changes: 63 additions & 0 deletions account_ecotax_tax/i18n/account_ecotax_tax.pot
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_ecotax_tax
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.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_ecotax_tax
#: model:ir.model,name:account_ecotax_tax.model_account_ecotax_classification
msgid "Account Ecotax Classification"
msgstr ""

#. module: account_ecotax_tax
#: model:ir.model.fields,field_description:account_ecotax_tax.field_account_move_line__subtotal_ecotax
#: model:ir.model.fields,field_description:account_ecotax_tax.field_account_tax__is_ecotax
msgid "Ecotax"
msgstr ""

#. module: account_ecotax_tax
#: model:ir.model.fields,field_description:account_ecotax_tax.field_account_move_line__ecotax_amount_unit
msgid "Ecotax Unit"
msgstr ""

#. module: account_ecotax_tax
#: model_terms:ir.ui.view,arch_db:account_ecotax_tax.ecotax_classification_form
msgid "Ecotaxes"
msgstr ""

#. module: account_ecotax_tax
#: model:ir.model,name:account_ecotax_tax.model_account_move_line
msgid "Journal Item"
msgstr ""

#. module: account_ecotax_tax
#: model:ir.model.fields,field_description:account_ecotax_tax.field_account_ecotax_classification__purchase_ecotax_ids
msgid "Purchase EcoTax"
msgstr ""

#. module: account_ecotax_tax
#: model:ir.model.fields,field_description:account_ecotax_tax.field_account_ecotax_classification__sale_ecotax_ids
msgid "Sale EcoTax"
msgstr ""

#. module: account_ecotax_tax
#: model:ir.model,name:account_ecotax_tax.model_account_tax
msgid "Tax"
msgstr ""

#. module: account_ecotax_tax
#: model:ir.model.fields,help:account_ecotax_tax.field_account_tax__is_ecotax
msgid ""
"Warning : To include Ecotax in the VAT tax check this :\n"
"1: check \"included in base amount \"\n"
"2: The Ecotax sequence must be less then VAT tax (in sale and purchase)"
msgstr ""
71 changes: 71 additions & 0 deletions account_ecotax_tax/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * account_ecotax_tax
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2025-02-07 00:06+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\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 5.6.2\n"

#. module: account_ecotax_tax
#: model:ir.model,name:account_ecotax_tax.model_account_ecotax_classification
msgid "Account Ecotax Classification"
msgstr "Classificazione conto imposta ecologica"

#. module: account_ecotax_tax
#: model:ir.model.fields,field_description:account_ecotax_tax.field_account_move_line__subtotal_ecotax
#: model:ir.model.fields,field_description:account_ecotax_tax.field_account_tax__is_ecotax
msgid "Ecotax"
msgstr "Imposta ecologica"

#. module: account_ecotax_tax
#: model:ir.model.fields,field_description:account_ecotax_tax.field_account_move_line__ecotax_amount_unit
msgid "Ecotax Unit"
msgstr "Unità imposta ecologica"

#. module: account_ecotax_tax
#: model_terms:ir.ui.view,arch_db:account_ecotax_tax.ecotax_classification_form
msgid "Ecotaxes"
msgstr "Imposte ecologiche"

#. module: account_ecotax_tax
#: model:ir.model,name:account_ecotax_tax.model_account_move_line
msgid "Journal Item"
msgstr "Movimento contabile"

#. module: account_ecotax_tax
#: model:ir.model.fields,field_description:account_ecotax_tax.field_account_ecotax_classification__purchase_ecotax_ids
msgid "Purchase EcoTax"
msgstr "Imposta ecologica acquisti"

#. module: account_ecotax_tax
#: model:ir.model.fields,field_description:account_ecotax_tax.field_account_ecotax_classification__sale_ecotax_ids
msgid "Sale EcoTax"
msgstr "Imposta ecologica vendite"

#. module: account_ecotax_tax
#: model:ir.model,name:account_ecotax_tax.model_account_tax
msgid "Tax"
msgstr "Imposta"

#. module: account_ecotax_tax
#: model:ir.model.fields,help:account_ecotax_tax.field_account_tax__is_ecotax
msgid ""
"Warning : To include Ecotax in the VAT tax check this :\n"
"1: check \"included in base amount \"\n"
"2: The Ecotax sequence must be less then VAT tax (in sale and purchase)"
msgstr ""
"Attenzione: per includere l'imposta ecologica nell'imposta IVA, controllare "
"quanto segue:\n"
"1: seleziona \"incluso nell'importo base\"\n"
"2: la sequenza dell'imposta ecologica deve essere inferiore all'imposta IVA ("
"in vendita e acquisto)"
3 changes: 3 additions & 0 deletions account_ecotax_tax/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import account_ecotax_classification
from . import account_move_line
from . import account_tax
26 changes: 26 additions & 0 deletions account_ecotax_tax/models/account_ecotax_classification.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# © 2014-2023 Akretion (http://www.akretion.com)
# @author Mourad EL HADJ MIMOUNE <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

from odoo import fields, models


class AccountEcotaxClassification(models.Model):
_inherit = "account.ecotax.classification"

sale_ecotax_ids = fields.Many2many(
"account.tax",
"ecotax_classif_taxes_rel",
"ecotax_classif_id",
"tax_id",
string="Sale EcoTax",
domain=[("is_ecotax", "=", True), ("type_tax_use", "=", "sale")],
)
purchase_ecotax_ids = fields.Many2many(
"account.tax",
"ecotax_classif_purchase_taxes_rel",
"ecotax_classif_id",
"tax_id",
string="Purchase EcoTax",
domain=[("is_ecotax", "=", True), ("type_tax_use", "=", "purchase")],
)
Loading