Account Dynamic Rules
Overview
Allows to define dynamic rules to set Account, Product or Payment Terms on invoices based on Partner and Product criteria.
Features
- Define rules matching by Partner, Product, and Payment Mode.
- Automatically update Invoice Line (Account, Product) and Invoice (Payment Term) when a match is found.
- Works for lines created via UI or API (e.g. n8n).
Configuration
Go to Accounting > Configuration > Account Dynamic Rules.
Defining Rules (Best Practices)
The engine evaluates rules by Priority (Sequence). The first matching rule wins.
1. Wildcards (Comodines)
You can leave fields empty to act as "Wildcards".
- Empty Partner: Applies to ANY Partner.
- Empty Product: Applies to ANY Product.
Example:
- Rule A: Partner "Azure" + Product (Empty) -> Account "629000".
- Result: All bills from Azure go to 629000, regardless of the product.
2. Description Matching
Use the "Description Match" field to refine rules based on text.
- Logic: "Contains" (Case Insensitive).
- Useful for generic invoices where the service type is in the text.
Example:
- Rule B: Partner (Empty) + Description "Hosting" -> Analytic Account "IT Infrastructure".
- Result: Any bill line containing "hosting" (e.g. "Annual Web Hosting", "Hosting Service") gets the analytic account.
- Result: Any bill line containing "hosting" (e.g. "Annual Web Hosting", "Hosting Service") gets the analytic account.
Advanced Logic
1. Priority & Conflicts
If two rules match the same line (e.g. Rule A matches Partner+Product, Rule B matches Partner+Wildcard), the system ALWAYS applies the rule with the Lower Sequence. Specificity does not automatically grant priority.
2. Multiple Rules per Invoice
The engine works Line by Line.
- Line 1 can match Rule A.
- Line 2 can match Rule B.
- Line 3 can match no rule. This allows a single invoice to have mixed accounts/analytics based on its content.
Note: If rules modify Header Fields (e.g. Payment Terms), the last matching line determines the final value for the whole invoice.
API & Automation (n8n / Imports)
This module enhances API reliability for Purchase Invoices (Vendor Bills).
If you create an invoice via API (create method) and omit certain fields, the system auto-populates them from the Partner:
- Payment Terms: From
partner.property_payment_term_id. - Bank Account: From first
partner.bank_ids. - Payment Mode: From
partner.supplier_payment_mode_id.
Metadata
Release files for odoo-addon-account-dynamic-rules 16.0.1.0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| odoo_addon_account_dynamic_rules-16.0.1.0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Release files / odoo_addon_account_dynamic_rules-16.0.1.0.1.4-py3-none-any.whl
| Download URL | odoo_addon_account_dynamic_rules-16.0.1.0.1.4-py3-none-any.whl |
|---|---|
| Size | 22.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
727b0dd5fac9395d67c8111b97749a7f1299456506e1fc14b6da48532ac1ea1b
|
|
BLAKE2b-256 checksum How to use checksums |
b571b5ed33c630055346eb697fe0f43f0f413d72c7b939c011c1de8286b3aa56
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.12
|
Security for odoo-addon-account-dynamic-rules 16.0.1.0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.