Skip to main content
Pending validationOdoo 20.0Community and Enterprise

How fiscaldoo applies the legal rules in force on each date

What is it for?​

The law changes over time: VAT rates, limits, deadlines and tables have a date from which they apply. fiscaldoo does not keep these values inside the program. It stores each one as a legal rule, with the value, the start date (Valid from), the end date (Valid until, empty if it has not ended yet) and the Legal reference it comes from.

When the program needs a legal value, it uses the rule in force on the date of the operation, not today's. A 2024 document is still calculated with 2024 law, even if it is corrected or viewed today.

Example, read from the demo list: the reduced VAT rate in Madeira has two rules.

TerritoryValueValid fromValid untilLegal reference
Madeira5 %01/04/201230/09/2024Lei n.º 14-A/2012, de 30 de março
Madeira4 %01/10/2024(no end)DLR n.º 6/2024/M, de 29 de julho, art. 21.º

An operation in Madeira on 30/09/2024 uses 5 %; one on 01/10/2024 uses 4 %. For the same rate, the Mainland has 6 % and the Azores 4 %, each in its own rule (Territory field).

When to use it?​

  • To check which legal value fiscaldoo uses on a date (for example, when in doubt about a rate or a deadline).
  • To create a company version when the law lets the company improve on a limit (see “Company versions”).
  • Do not use these screens to change a national legal value: national values come with fiscaldoo updates, loaded by whoever maintains the national legal data.

Where to find it?​

Except for the Administrator, all only with developer mode active:

  • Accounting › Configure › Plan and legal rules › Legal rules: opens with the In force filter, which shows only the rules that apply today. To see those that have already ended (for example, Madeira's 5 % reduced rate) or those that have not started yet, remove the filter. To know which value applies on a date, compare it with Valid from and Valid until. In the demo, the list opens with 763 rules.
  • Accounting › Configure › Plan and legal rules › Legal rule history: all the rules, including archived ones.
  • Accounting › Configure › Plan and legal rules › Company versions against the law: the company versions that currently contradict the law.

Before you start​

  • Viewing: the Administrator opens the three screens without developer mode; with it active, the Fiscal officer can too, and the Auditor opens Legal rules and Legal rule history. The Accountant and Invoicing do not see these menus (see the box at the top).
  • Creating a company version or closing a rule: Certified Accountant / Fiscal Manager, Fiscal officer or Administrator. The Accountant is refused (see “Common problems”).

How it works​

What you read in a rule​

  • Scope: the area (for example VAT, Payroll, SAF-T, IES, Assets).
  • Key: the internal name of the value (for example RATE_RED, the reduced VAT rate). Keys are in English because they are read by the program.
  • Company: empty on a national rule; filled in on a company version.
  • Territory: Mainland, Azores or Madeira, when the law differs in each.
  • Valid from / Valid until, Legal reference and Source URL.
  • Value (text), Value (number) or Value (JSON): the value of the rule. In the Value (JSON) of a national rule its nature may appear: ABSOLUTE means mandatory; RELATIVE_FAVOURABLE means a limit the company can improve on.

A rule in force is not rewritten​

  • For the same key, company, territory and date there are never two rules in force.
  • On a rule whose start date has already passed, you can only change Valid until and archive it. For a new value, close the old rule in Valid until and create a new rule with the new start date. That is how the history stays right for older operations.
  • An active rule cannot be deleted: archive it first. The refusal says: “… is/are active — archive first (deactivate the record) before deleting. …”

Company versions​

A rule with the Company filled in only applies to that company and, on the dates it is in force, replaces the national rule. What the company can do depends on the nature of the national rule:

NatureWhat the company can doExample from the demo
MandatoryNothing: there are no company versionsVAT rates (RATE_NOR, RATE_RED, RATE_INT)
Maximum or minimum limitOnly improve on the limit, never exceed itInvoice issue deadline (INVOICE_ISSUANCE_DEADLINE_BUSINESS_DAYS): legal maximum of 5 working days (CIVA art. 36, paragraph 1, point a)); the company can use 3, not 10
FreeChoose its own valueRules with no declared nature

The check is made on saving. If the law changes later and a company version starts contradicting it, that version appears in Company versions against the law. While it contradicts the law, the program ignores that version and uses the legal value. In the demo the list is empty: “No company version contradicts the law.”

Pending validation by a certified accountant: the nature (mandatory, limit or free) given to each national rule and the values loaded for each territory.

Important notes​

  • The date that counts is the date of the operation. Correcting an old document today does not move it to today's law.
  • Developer mode does not change permissions. A profile that cannot create rules still cannot, even when it sees the menu.

Common problems​

“… is/are already in force (validity started on …). The scope, key, company or value of a rule already in force cannot be changed…”​

  • Cause: you tried to change the value (or the scope, key, company, territory or start) of a rule that has already started. The full message: “… on a rule already in force only the end date and archiving can be changed.”
  • What to do: if the rule is a version for your company (Company filled in), fill in Valid until on the current rule and create a new rule with the new start date. If it is a national rule (Company empty), do not close it or create another: national values come with fiscaldoo updates. The Certified Accountant / Fiscal Manager and the Fiscal officer can close a national rule, and that affects every company in the database.

“A rule already in force exists for “IVA / …” in that period…”​

  • Symptom: “A rule already in force exists for “IVA / CASH_VAT_MAX_MONTHS_UNPAID” in that period (from 01/10/2013 to no end, ref. DL 71/2013, anexo, art. 2.º n.º 3 a)). There can never be two rules in force for the same key, company, territory and date — adjust the dates or archive the previous rule.”
  • What to do: close the previous rule in Valid until before creating the new one, or correct the dates.

“… is a mandatory legal rule that no company can change…”​

  • Symptom: when creating a company version of the standard VAT rate: ““RATE_NOR” is a mandatory legal rule that no company can change (it is not a limit that can be improved on). …”
  • What to do: do not create the version. If the national value is out of date, ask for the national legal data to be updated.
  • Symptom: with 10 days for the invoice issue deadline: “The company value 10 of “INVOICE_ISSUANCE_DEADLINE_BUSINESS_DAYS” is worse than the legal maximum 5 (CIVA art. 36.º n.º 1 alínea a), since 16/02/2019). What happened: the law only allows the company to improve on this value, never to exceed the limit. How to fix it: enter a value equal to or below the legal one, or do not create the company version.”
  • What to do: type a value equal to or below the legal maximum (in the example, 5 or less), or do not create the version.
  • Cause: the profile (for example, Accountant) can only view. The message says who can: “Who does this: Administrador de Salários, Dados legais nacionais, Submissor de declarações, Responsável fiscal.”
  • What to do: ask one of those profiles or the Administrator for the change.
Versions: Odoo 20.0Community and Enterprisefiscaldoo 20.0 (master c643480c2)ID DOC-0083
Was this page helpful?