Repository
OCA/account-fiscal-rule · module folder · Try on Runboat
Module version
1.0.0
Category
Accounting
Folder size
1.64 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/account-fiscal-rule
Last tracking update
2026-08-19 11:23:06
Authors
Akretion, Odoo Community Association (OCA), GRAP, La Louve
Maintainers
Akretion, Odoo Community Association (OCA), GRAP, La Louve
Committers
Weblate, OCA-git-bot, oca-ci, phucph
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None
Description
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.

![product template form](../static/description/product_template_form.png)

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)

Code Analysis

Views touched (8)
XML IDNameModelTypeStatus
view_account_product_fiscal_classification_form account.product.fiscal.classification form New
view_account_product_fiscal_classification_search account.product.fiscal.classification search New
view_account_product_fiscal_classification_tree account.product.fiscal.classification list New
view_account_product_fiscal_rule_tree account.product.fiscal.rule list New
view_product_template_form_account product.template form Inherits account.product_template_form_view
view_product_template_search product.template search Inherits product.product_template_search_view
view_product_template_tree_account product.template tree Inherits account.product_template_view_tree
view_wizard_change_fiscal_classification wizard.change.fiscal.classification form New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (4)

New fields (8)
  • active Boolean
    default=True help='If unchecked, it will allow you to hide the Fiscal Classification without removing it.'
  • company_id Many2one → res.company
    comodel_name='res.company' help='Specify a company if you want to define this Fiscal Classification only for specific company. Otherwise, this Fiscal Classification will be available for all companies.' string='Company'
  • description Text
  • name Char
    required=True
  • product_tmpl_ids One2many → product.template
    comodel_name='product.template' compute='_compute_product_tmpl_info' string='Products'
  • product_tmpl_qty Integer
    compute='_compute_product_tmpl_info' string='Products Quantity'
  • purchase_tax_ids Many2many → account.tax
    column1='fiscal_classification_id' column2='tax_id' comodel_name='account.tax' domain="[('type_tax_use', 'in', ['purchase', 'none'])]" relation='fiscal_classification_purchase_tax_rel' string='Purchase Taxes'
  • sale_tax_ids Many2many → account.tax
    column1='fiscal_classification_id' column2='tax_id' comodel_name='account.tax' domain="[('type_tax_use', 'in', ['sale', 'none'])]" relation='fiscal_classification_sale_tax_rel' string='Sale Taxes'
Public methods (2)
  • unlink(self)
  • write(self, vals)

New fields (6)
  • action Selection
    default='forbid' required=True selection=[('forbid', 'Forbid'), ('allow', 'Allow')]
  • category_ids Many2many → product.category
    comodel_name='product.category'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> string='Company'
  • fiscal_classification_ids Many2many → account.product.fiscal.classification
    comodel_name='account.product.fiscal.classification' relation='fiscal_rule_fiscal_classification_rel'
  • message Text
  • sequence Integer
    default=10
Public methods (1)
  • check_product_templates_integrity(self, templates)
    @api.model

New fields (3)
  • fiscal_classification_id Many2one → account.product.fiscal.classification
    comodel_name='account.product.fiscal.classification' help="Specify the combination of taxes for this product. This field is required. If you dont find the correct Fiscal Classification, Please create a new one or ask to your account manager if you don't have the access right." string='Fiscal Classification' tracking=True
  • supplier_taxes_id Many2many
    default=False
  • taxes_id Many2many
    default=False
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • get_view(self, view_id=None, view_type='form', **options)
    @api.model
    Set fiscal_classification_id required on all views. We don't set the field required by field definition to avoid incompatibility with other modules, errors on import, etc...
  • write(self, vals)

New fields (2)
  • new_fiscal_classification_id Many2one → account.product.fiscal.classification
    comodel_name='account.product.fiscal.classification' domain="[('id', '!=', old_fiscal_classification_id)]" required=True string='New Classification'
  • old_fiscal_classification_id Many2one → account.product.fiscal.classification
    comodel_name='account.product.fiscal.classification' default=_default_old_fiscal_classification_id readonly=True string='Old Classification'
Public methods (1)
  • button_change_fiscal_classification(self)

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…