Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
164 commits
Select commit Hold shift + click to select a range
96d624a
[MERGE] merged useful tax logic modules from 5.0 branch (they are req…
rvalyi Jun 9, 2010
4cf9af7
[FIX] account_product_fiscal_classification: temporary workaround to …
rvalyi Jun 9, 2010
3f035fd
[FIX] account_product_fiscal_classification: fixed the way user avoid…
rvalyi Jul 6, 2010
9e3e921
changed fiscal_classification_id_change method in product.product and…
Jul 7, 2010
57f49ad
migrate module account_product_fiscal_classification to compatible wi…
Jul 22, 2010
39f9c1c
added folder security with access rules for objects in modules accoun…
Aug 2, 2010
c809b8a
Fixed account.invoice views from account_fiscal_position_rule module
Oct 17, 2012
af9b65a
[FIX] account_product_fiscal_classification: typically, service produ…
rvalyi Oct 1, 2010
eb8b280
account_fiscal_position_rule, account_fiscal_position_rule_sale refac…
renatonlima Nov 9, 2011
0008868
account_fiscal_position_rule modules and account_product_fiscal_class…
renatonlima Nov 10, 2011
3ee5443
account_product_fiscal_classification, add Update All Produtos Button…
renatonlima Nov 11, 2011
0f8eebd
[FIX] onchange methods in account_fiscal_position_rule_sale and accou…
renatonlima Nov 17, 2011
eb3880e
updated wizards from account_fiscal_position_rule and
renatonlima Nov 22, 2011
ae038e8
clean up account_product_fiscal_classification
Oct 17, 2012
453641b
[REF] Clean syntax
sebastienbeau Oct 26, 2012
57d3d98
[REF] Update copyright
sebastienbeau Oct 29, 2012
496a795
[MIGR] fixed tree view
rvalyi Dec 5, 2012
4ee115b
[MIGR] view fix for v7
rvalyi Dec 7, 2012
e51cb6f
Improved code format, changed views for migration to OpenERP 7.0 and …
renatonlima Jan 15, 2013
ed42e33
[MIGR] account_product_fiscal_classification module migration to Open…
renatonlima Feb 11, 2013
357aea1
[FIX] refactored onchange method and field definition
renatonlima Feb 11, 2013
db0bd54
product account tab view correction, for better reading
Aug 17, 2013
092b0dd
mark all addons as unported
gurneyalex Sep 2, 2014
938a880
[REF] rename module 1/2;
legalsylvain Sep 8, 2015
68c1121
[REF] renaming model;
legalsylvain Sep 8, 2015
8c72f6e
[REF] change function name according to the new objective of the func…
legalsylvain Sep 8, 2015
f781e26
[ADD] add demo data and change rules to manage and test multi company…
legalsylvain Sep 8, 2015
6b07f45
[REF]
legalsylvain Sep 8, 2015
cc9f962
[REF] move init function into 'post_init_hook' part. courtesy : @Stef…
legalsylvain Sep 8, 2015
8e5479f
[REF] use new API; Remove useless code, as the init function is now o…
legalsylvain Sep 8, 2015
c252dc2
[FIX] bad path for screenshots;
legalsylvain Sep 8, 2015
22f8b64
[FIX] flake8;
legalsylvain Sep 8, 2015
4d22909
[REF] improve comments about how classification_id field is set as re…
legalsylvain Sep 8, 2015
0a2f4c9
[ADD] pot file ; fr translation file ; set name field as translatable;
legalsylvain Sep 10, 2015
a2fd2fe
[MRG] add pt_BR.po file;
legalsylvain Sep 10, 2015
32e45f6
[ADD] code and description on account_product_fiscal_classification m…
legalsylvain Sep 21, 2015
c323be6
OCA Transbot updated translations from Transifex
oca-transbot Sep 26, 2015
438fc83
[FIX] invalid name fields taxes
renatonlima Nov 3, 2015
fcf9927
added fiscal classification template model
renatonlima Nov 4, 2015
2dab221
added action, menu and views to fiscal classification model
renatonlima Nov 4, 2015
56c2f87
added wizard fiscal classification model
renatonlima Nov 4, 2015
3de2746
added action, menu and views to fiscal classification wizard
renatonlima Nov 4, 2015
2a15448
added tests
renatonlima Nov 4, 2015
4e9cbdc
pep8
renatonlima Nov 4, 2015
8424709
change version
renatonlima Nov 5, 2015
e876df7
rename folders according OCA Guidelines
renatonlima Nov 5, 2015
609e055
magically turn testing on by renaming tests/tests.py to tests/test_cl…
mileo Nov 11, 2015
3c2ebe5
fixed wrong xml_id ref -> tests 1,2,3 and 4 pass. 5 and 6 fail.
rvalyi Nov 11, 2015
b618fd5
[FIX] Revert changing in user group and fix remaining tests
mileo Nov 11, 2015
ce6b294
[FIX] Pep8
mileo Nov 11, 2015
f891306
[MIG] Make modules uninstallable
rvalyi Nov 26, 2015
02967cd
Migration the views, menus, add depends and make module installable.
mbcosta Nov 26, 2015
511fe60
Migration demo datas an add license header.
mbcosta Nov 26, 2015
b635f3b
[MIG] Add attribute name to allow inherit the view.
mbcosta Dec 8, 2015
c15188a
OCA Transbot updated translations from Transifex
oca-transbot Apr 2, 2016
255d282
[FIX] remove en.po that was erroneously created by transbot
sbidoul Aug 15, 2016
c7e2fcd
OCA Transbot updated translations from Transifex
oca-transbot Sep 17, 2016
6b84e7d
[REF] OCA convention; (light header);
legalsylvain Apr 4, 2016
cdefbdb
[ADD] classification restriction by product category;
legalsylvain Apr 4, 2016
ced75ec
[FIX] set api.multi in a function; (bug if we changed classification …
legalsylvain Jul 23, 2016
941b638
[IMP] improve display;
legalsylvain Jul 23, 2016
1bca82d
[FIX] bug : it was not possible to delete a classification after mass…
legalsylvain Jul 23, 2016
388aaf2
OCA Transbot updated translations from Transifex
oca-transbot Oct 8, 2016
ca2f29e
[FIX] incorrect order when loading demo data
legalsylvain Oct 22, 2016
736d834
[ADD] author
legalsylvain Oct 22, 2016
0b0fa55
[FIX] remove invalid leaf in V9.0 on account.tax / account.tax.templa…
legalsylvain Nov 8, 2016
ed73dac
Change field Fiscal Position to be required. (#53)
mbcosta Oct 6, 2016
5ae88a8
OCA Transbot updated translations from Transifex
oca-transbot Nov 25, 2016
5eb0253
[MIG] Make modules uninstallable
rvalyi Dec 12, 2016
270e9f0
[MIG] Rename manifest files
rvalyi Dec 12, 2016
87a7c18
[MIGR] fix header files
renatonlima Dec 13, 2017
921a119
[MIGR] update module metadata
renatonlima Dec 13, 2017
2db0832
[MIGR] fix import
renatonlima Dec 13, 2017
8db7d83
[MIGR] product.template object
renatonlima Dec 13, 2017
b47a33c
[MIGR] product.category object
renatonlima Dec 13, 2017
a3a0e89
[MIGR] account.product.fiscal.classification.model object
renatonlima Dec 13, 2017
55b1024
[MIGR] account.product.fiscal.classification object
renatonlima Dec 13, 2017
8598e8b
[MIGR] security xml file
renatonlima Dec 13, 2017
529bed8
[MIGR] format xml files
renatonlima Dec 13, 2017
cd76b50
[MIGR] migrate yml files
renatonlima Dec 13, 2017
353710c
[MIGR] fix file headers
renatonlima Dec 13, 2017
f158706
added security rule to fiscal classification template
renatonlima Dec 14, 2017
67205c3
IMP category views
bealdav Feb 14, 2018
2543a65
FIX conflict revert
bealdav Feb 16, 2018
edbacc4
[FIX] remove useless tab moves, reducing diff during review
legalsylvain Mar 7, 2018
ab21fbe
OCA Transbot updated translations from Transifex
oca-transbot Mar 17, 2018
b99a871
remove obsolete .pot files [ci skip]
sbidoul Jun 15, 2018
0b24a8d
[UPD] Update account_product_fiscal_classification.pot
oca-travis Jun 22, 2018
a04ceb5
[FIX] account_product_fiscal_classification: RST syntax
pedrobaeza Sep 13, 2018
4528a5e
[MIG] 12.0
Mar 13, 2019
f4ba1b7
[MIG] finish to port account_product_fiscal_classification in V12
legalsylvain Jul 16, 2019
fb8b8a2
[UPD] Update account_product_fiscal_classification.pot
oca-travis Oct 14, 2019
02194a6
[UPD] README.rst
OCA-git-bot Oct 14, 2019
6fc3ccb
[ADD] icon.png
OCA-git-bot Oct 14, 2019
89b350b
Update translation files
oca-transbot Nov 19, 2019
c598eba
Translated using Weblate (Portuguese)
alvarorib Feb 22, 2020
a4f0e1a
FIX prd_classif: set taxes on all companies sharing classif
bealdav May 6, 2020
b2cbd0c
[UPD] Update account_product_fiscal_classification.pot
oca-travis May 8, 2020
6b0a413
[UPD] README.rst
OCA-git-bot May 8, 2020
bdf7ea8
account_product_fiscal_classification 12.0.1.1.0
OCA-git-bot May 8, 2020
3cae1b0
Update translation files
oca-transbot May 8, 2020
4f3b3c2
[FIX] account_product_fiscal_classification: fix duplicate XMLId
dreispt May 26, 2020
f1d3506
[UPD] Update account_product_fiscal_classification.pot
oca-travis Jun 18, 2020
6fdec85
account_product_fiscal_classification 12.0.1.2.0
OCA-git-bot Jun 18, 2020
5a2f7ba
Update translation files
oca-transbot Jun 18, 2020
5f28a3a
Translated using Weblate (Slovenian)
sysadminmatmoz Aug 7, 2020
9b47c9b
[FIX] allow to see products related to fiscal classification
legalsylvain Oct 7, 2020
fdd5f3a
account_product_fiscal_classification 12.0.1.3.0
OCA-git-bot Oct 19, 2020
35b6f10
IMP prd_fisc_classif: track change on product model
bealdav Oct 21, 2020
61a33e3
[UPD] Update account_product_fiscal_classification.pot
oca-travis Oct 21, 2020
0adb3b3
[UPD] README.rst
OCA-git-bot Oct 21, 2020
bec1ecd
Update translation files
oca-transbot Oct 21, 2020
646fc35
[REF] account_product_fiscal_classification: Black python code
Dec 2, 2020
ea55aec
[MIG] account_product_fiscal_classification: Migration to 13.0
Dec 2, 2020
afd287a
[IMP] account_product_fiscal_classification, account_product_fiscal_c…
Dec 3, 2020
8d29ed3
[MIG] account_product_fiscal_classification: Migration to 14.0
Dec 3, 2020
7e0b979
[UPD] Update account_product_fiscal_classification.pot
oca-travis Apr 18, 2021
f5b4ad7
[UPD] README.rst
OCA-git-bot Apr 18, 2021
87e26ab
[REF] adopting account_product_fiscal_classification and account_prod…
legalsylvain Aug 10, 2021
6024051
[UPD] README.rst
OCA-git-bot Aug 18, 2021
27055f0
[REF] account_product_fiscal_classification: pre-commit run fixes
dreispt Aug 2, 2022
24d4a1e
account_product_fiscal_classification 14.0.1.0.1
OCA-git-bot Aug 2, 2022
6ff13cd
[PORT] account_product_fiscal_classification: port module from 14.0 t…
legalsylvain Oct 10, 2022
1260f8a
[UPD] translation
legalsylvain Oct 19, 2022
9c8463e
[UPD] Update account_product_fiscal_classification.pot
Feb 10, 2023
9abf8b4
[UPD] README.rst
OCA-git-bot Feb 10, 2023
2e856f3
account_product_fiscal_classification 16.0.1.0.2
OCA-git-bot Feb 10, 2023
04adfa3
Translated using Weblate (Croatian)
badbole Feb 11, 2023
0b8d9ae
Translated using Weblate (Italian)
mymage Mar 23, 2023
2304446
Translated using Weblate (Slovenian)
sysadminmatmoz Apr 11, 2023
3a35181
account_product_fiscal_classification: add search view
alexis-via May 15, 2023
6f575a6
account_product_fiscal_classification: remove translate=True
alexis-via May 15, 2023
7c9a72f
Translated using Weblate (French)
sanrav May 31, 2023
a7794ff
Translated using Weblate (French (France) (fr_FR))
sanrav May 31, 2023
4a44d25
Translated using Weblate (French (France) (fr_FR))
sanrav Jun 1, 2023
f8b7737
Translated using Weblate (Italian)
mymage Jun 20, 2023
9776f9e
Translated using Weblate (Spanish)
Ivorra78 Jun 30, 2023
b5144aa
Translated using Weblate (Italian)
francesco-ooops Jul 17, 2023
1fde588
[UPD] README.rst
OCA-git-bot Sep 3, 2023
ecbac76
[UPD] Update account_product_fiscal_classification.pot
Sep 17, 2023
2812f37
oca-github-bot post-merge updates
OCA-git-bot Sep 17, 2023
2e6c9d6
Update translation files
weblate Sep 20, 2023
1313e1a
Translated using Weblate (Spanish)
Ivorra78 Sep 20, 2023
dc12ce8
Translated using Weblate (French)
Nov 2, 2023
06fd909
[REF] account_product_fiscal_classification: pre-commit
dreispt Nov 9, 2023
83670b4
[BOT] post-merge updates
OCA-git-bot Nov 9, 2023
f408085
[FIX] account_product_fiscal_classification: order by fiscal classifi…
legalsylvain Mar 21, 2022
c06dc7c
[BOT] post-merge updates
OCA-git-bot Nov 28, 2023
ae5a549
FIX fisc_prd_class: set product_tax_multicompany_default as incompati…
bealdav Dec 12, 2023
c601b41
[BOT] post-merge updates
OCA-git-bot Dec 14, 2023
1880162
[FIX] account_product_fiscal_classification : When the module is inst…
legalsylvain Feb 9, 2024
58458ac
Translated using Weblate (Swedish)
jakobkrabbe Feb 27, 2024
bceb3a6
Translated using Weblate (Italian)
mymage Apr 10, 2024
9981fbc
[UPD] Update account_product_fiscal_classification.pot
Jun 9, 2024
550b8ba
[BOT] post-merge updates
OCA-git-bot Jun 9, 2024
738bcf7
Update translation files
weblate Jun 9, 2024
9f8ab59
Translated using Weblate (Italian)
mymage Jun 15, 2024
e6fc74a
Translated using Weblate (Swedish)
jakobkrabbe Jun 18, 2024
a18b17b
[IMP] account_product_fiscal_classification :
bealdav Jun 12, 2024
41f6bfa
[UPD] Update account_product_fiscal_classification.pot
Jul 4, 2024
d0f58aa
[BOT] post-merge updates
OCA-git-bot Jul 4, 2024
be14e42
Update translation files
weblate Jul 4, 2024
983551a
[IMP] account_product_fiscal_classification: pre-commit auto fixes
Aug 4, 2025
0b3bbb8
[18.0][MIG] account_product_fiscal_classification: Migration to 18.0
Aug 4, 2025
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
162 changes: 162 additions & 0 deletions account_product_fiscal_classification/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
=======================================
Account Product - Fiscal Classification
=======================================

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

.. |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/18.0/account_product_fiscal_classification
: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-18-0/account-fiscal-rule-18-0-account_product_fiscal_classification
: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=18.0
:alt: Try me on Runboat

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

This module extends the Odoo Account module to introduce Fiscal
Classifications.

A fiscal classification is an association of purchase and sale taxes
that have to be set on your products.

|image1|

This new design provides the following improvments.

- It is more simple (less clicks quantity) to configure correctly a
product. (You only have to set a fiscal classification, instead of
setting one or many sale taxes, then click on purchase tab and set one
or many purchase taxes.)
- Prevent users to select incompatible purchase and sale taxes. French
Exemple: A product can not be configured with:

- Purchase Taxes: 5.5%
- Sale Taxes: 20%

- Optionaly, you can restrict the usage of some fiscal classifications
to some product categories. French Exemple : A product set in the
category "Beer and wine" can not have a sale tax 5,5%. (20% is
mandatory)

.. |image1| image:: https://raw.githubusercontent.com/OCA/account-fiscal-rule/18.0/account_product_fiscal_classification/static/description/product_template_form.png

**Table of contents**

.. contents::
:local:

Configuration
=============

- Go to "Accounting > Configuration > Accounting > Fiscal
Classifications".
- Create new classification, with correct purchase and sale taxes.

|image1|

**Note**

When installing the module, it will create fiscal classifications for
all the taxes combinations that exist in your database. If some are bad,
you can massively move the products for a bad classification to the good
one, using the button "Move products into another fiscal
classification".

**Optional settings**

Once the fiscal classifications are created, you can create rules to
avoid users to use some classifications that don't make sense for some
categories.

- Go to "Accounting > Configuration > Accounting > Fiscal Classification
Rules"
- Create new rules.

|image2|

Every time a new product is created, the rules that matches the product
setting will be checked **in the displayed order**.

- If one rule is set to 'Allow', the next rules are ignored.
- If one rule is set to 'Forbid', an error is raised.

|image3|

.. |image1| image:: https://raw.githubusercontent.com/OCA/account-fiscal-rule/18.0/account_product_fiscal_classification/static/description/fiscal_classification_form.png
.. |image2| image:: https://raw.githubusercontent.com/OCA/account-fiscal-rule/18.0/account_product_fiscal_classification/static/description/fiscal_classification_rule__wine.png
.. |image3| image:: https://raw.githubusercontent.com/OCA/account-fiscal-rule/18.0/account_product_fiscal_classification/static/description/fiscal_classification_rule__wine_warning.png

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_product_fiscal_classification%0Aversion:%2018.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
* GRAP
* La Louve

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

- Sylvain LE GAL (https://twitter.com/legalsylvain)

- Akretion

- Sébastien BEAU <[email protected]>
- Pierrick Brun <[email protected]>
- Renato Lima <[email protected]>

- Danimar RIBEIRO

- Phan Hong Phuc <[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-legalsylvain| image:: https://github.com/legalsylvain.png?size=40px
:target: https://github.com/legalsylvain
:alt: legalsylvain

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

|maintainer-legalsylvain|

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

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions account_product_fiscal_classification/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from . import models
from . import wizard

from .hooks import create_fiscal_classification_from_product_template
36 changes: 36 additions & 0 deletions account_product_fiscal_classification/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Copyright (C) 2014-Today GRAP (http://www.grap.coop)
# Copyright (C) 2016-Today La Louve (<http://www.lalouve.net/>)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).

{
"name": "Account Product - Fiscal Classification",
"summary": "Simplify taxes management for products",
"version": "18.0.1.0.0",
"category": "Accounting",
"author": "Akretion,GRAP,La Louve,Odoo Community Association (OCA)",
"maintainers": ["legalsylvain"],
"website": "https://github.com/OCA/account-fiscal-rule",
"license": "AGPL-3",
"depends": ["account", "account_usability"],
"excludes": ["product_tax_multicompany_default"],
"data": [
"security/ir_rule.xml",
"security/ir.model.access.csv",
"views/view_product_template.xml",
"wizard/view_wizard_change_fiscal_classification.xml",
"views/view_account_product_fiscal_classification.xml",
"views/view_account_product_fiscal_rule.xml",
],
"demo": [
"demo/res_company.xml",
"demo/res_users.xml",
"demo/account_tax.xml",
"demo/account_product_fiscal_classification.xml",
"demo/product_template.xml",
"demo/product_category.xml",
"demo/account_product_fiscal_rule.xml",
],
"post_init_hook": "create_fiscal_classification_from_product_template",
"installable": True,
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright (C) 2022-Today GRAP (http://www.grap.coop)
@author Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>
<!-- Fiscal Classification (company 1) -->
<record
id="fiscal_classification_A_company_1"
model="account.product.fiscal.classification"
>
<field name="name">Demo Fiscal Classification A (20%) (Your Company)</field>
<field name="company_id" ref="base.main_company" />
<field
name="purchase_tax_ids"
eval="[Command.set([ref('account_tax_purchase_20_company_1')])]"
/>
<field
name="sale_tax_ids"
eval="[Command.set([ref('account_tax_sale_20_company_1')])]"
/>
</record>

<record
id="fiscal_classification_B_company_1"
model="account.product.fiscal.classification"
>
<field name="name">Demo Fiscal Classification B (Your Company)</field>
<field name="company_id" ref="base.main_company" />
<field
name="sale_tax_ids"
eval="[Command.set([
ref('account_tax_sale_5_company_1'),
ref('account_tax_sale_20_company_1'),
])]"
/>
</record>

<!-- Fiscal Classification (company 2) -->
<record
id="fiscal_classification_C_company_2"
model="account.product.fiscal.classification"
>
<field name="name">Demo Fiscal Classification C (Company 2)</field>
<field
name="company_id"
ref="account_product_fiscal_classification.company_2"
/>
<field
name="purchase_tax_ids"
eval="[Command.set([ref('account_tax_purchase_7_company_2'), ref('account_tax_purchase_30_company_2')])]"
/>
<field
name="sale_tax_ids"
eval="[Command.set([ref('account_tax_sale_7_company_2'), ref('account_tax_sale_30_company_2')])]"
/>
</record>

<!-- Fiscal Classification (Global) -->
<record
id="fiscal_classification_D_global"
model="account.product.fiscal.classification"
>
<field name="name">Demo Fiscal Classification D (Global)</field>
<field name="company_id" eval="False" />
<field
name="purchase_tax_ids"
eval="[Command.set([ref('account_tax_purchase_20_company_1'), ref('account_tax_purchase_30_company_2')])]"
/>
<field
name="sale_tax_ids"
eval="[Command.set([ref('account_tax_sale_20_company_1'), ref('account_tax_sale_30_company_2')])]"
/>
</record>
</odoo>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright (C) 2022-Today GRAP (http://www.grap.coop)
@author Sylvain LE GAL (https://twitter.com/legalsylvain)
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>
<record id="rule_wine_1" model="account.product.fiscal.rule">
<field name="company_id" ref="base.main_company" />
<field name="category_ids" eval="[Command.set([ref('category_wine')])]" />
<field
name="fiscal_classification_ids"
eval="[Command.set([ref('fiscal_classification_A_company_1')])]"
/>
<field name="action">allow</field>
</record>

<record id="rule_wine_2" model="account.product.fiscal.rule">
<field name="company_id" ref="base.main_company" />
<field name="category_ids" eval="[Command.set([ref('category_wine')])]" />
<field name="action">forbid</field>
<field name="message">the alcohol is sold at 20%.</field>
</record>
</odoo>
89 changes: 89 additions & 0 deletions account_product_fiscal_classification/demo/account_tax.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright (C) 2014 -Today GRAP (http://www.grap.coop)
@author Sylvain LE GAL (https://twitter.com/legalsylvain
Copyright (C) 2019-Today Akretion (http://www.akretion.com)
@author Pierrick Brun <[email protected]>
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
-->
<odoo>
<record id="demo_account_tax_group" model="account.tax.group">
<field name="name">Demo Tax Group A</field>
</record>
<!-- Your Company Taxes -->
<record id="account_tax_purchase_20_company_1" model="account.tax">
<field name="name">Demo Purchase Tax 20% (Your Company)</field>
<field name="company_id" ref="base.main_company" />
<field name="type_tax_use">purchase</field>
<field name="amount">20</field>
<field name="tax_group_id" ref="demo_account_tax_group" />
<field name="country_id" ref="base.us" />
</record>

<record id="account_tax_sale_20_company_1" model="account.tax">
<field name="name">Demo Sale Tax 20% (Your Company)</field>
<field name="company_id" ref="base.main_company" />
<field name="type_tax_use">sale</field>
<field name="amount">20</field>
<field name="tax_group_id" ref="demo_account_tax_group" />
<field name="country_id" ref="base.us" />
</record>

<record id="account_tax_sale_5_company_1" model="account.tax">
<field name="name">Demo Sale Tax 5% (Your Company)</field>
<field name="company_id" ref="base.main_company" />
<field name="type_tax_use">sale</field>
<field name="amount">5</field>
<field name="tax_group_id" ref="demo_account_tax_group" />
<field name="country_id" ref="base.us" />
</record>

<!-- Company 2 Taxes -->
<record id="account_tax_purchase_7_company_2" model="account.tax">
<field name="name">Demo Purchase Tax 7% (Company 2)</field>
<field
name="company_id"
ref="account_product_fiscal_classification.company_2"
/>
<field name="type_tax_use">purchase</field>
<field name="amount">7</field>
<field name="tax_group_id" ref="demo_account_tax_group" />
<field name="country_id" ref="base.us" />
</record>

<record id="account_tax_purchase_30_company_2" model="account.tax">
<field name="name">Demo Purchase Tax 30% (Company 2)</field>
<field
name="company_id"
ref="account_product_fiscal_classification.company_2"
/>
<field name="type_tax_use">purchase</field>
<field name="amount">30</field>
<field name="tax_group_id" ref="demo_account_tax_group" />
<field name="country_id" ref="base.us" />
</record>

<record id="account_tax_sale_7_company_2" model="account.tax">
<field name="name">Demo Sale Tax 7% (Company 2)</field>
<field
name="company_id"
ref="account_product_fiscal_classification.company_2"
/>
<field name="type_tax_use">sale</field>
<field name="amount">7</field>
<field name="tax_group_id" ref="demo_account_tax_group" />
<field name="country_id" ref="base.us" />
</record>

<record id="account_tax_sale_30_company_2" model="account.tax">
<field name="name">Demo Sale Tax 30% (Company 2)</field>
<field
name="company_id"
ref="account_product_fiscal_classification.company_2"
/>
<field name="type_tax_use">sale</field>
<field name="amount">30</field>
<field name="tax_group_id" ref="demo_account_tax_group" />
<field name="country_id" ref="base.us" />
</record>
</odoo>
Loading