TIP: You can type at any time to perform a new search.
Exception Rule
base_exception · OCA/server-tools
- Repository
- OCA/server-tools · module folder · Try on Runboat
- Module version
- 1.0.0
- Category
- Generic Modules
- Folder size
- 0.75 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/server-tools
- Last tracking update
- 2026-08-07 09:06:27
- Authors
- Camptocamp, Akretion, ACSONE SA/NV, Odoo Community Association (OCA), Sodexis
- Maintainers
- Camptocamp, Akretion, ACSONE SA/NV, Odoo Community Association (OCA), Sodexis
- Committers
- Weblate, Franco Leyes, OCA-git-bot, oca-ci
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- sale_exception
- Description
This module provide an abstract model to manage customizable exceptions to be applied on different models (sale order, invoice, ...). It is not useful by itself. You can see an example of implementation in the 'sale_exception' module. (sale-workflow repository) or 'purchase_exception' module (purchase-workflow repository).
Code Analysis ⓘ
Views touched (3)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
view_exception_rule_confirm |
Exceptions Rules | exception.rule.confirm | form | New |
view_exception_rule_form |
exception.rule.form | exception.rule | form | New |
view_exception_rule_list |
exception.rule.list | exception.rule | list | New |
HTTP endpoints (0)
No HTTP endpoints found for this module.
Models touched (4)
New fields (4)
-
exception_idsMany2many → exception.rulecopy=Falsestring='Exceptions' args: 'exception.rule' -
exceptions_summaryHtmlcompute='_compute_exceptions_summary' -
ignore_exceptionBooleancopy=False args: 'Ignore Exceptions' -
main_exception_idMany2one → exception.rulecompute='_compute_main_error'store=Truestring='Main Exception' args: 'exception.rule'
-
action_ignore_exceptions(self)
New fields (0)
No new fields.
Public methods (1)-
detect_exceptions(self)List all exception_ids applied on self Exception ids are also written on records
New fields (10)
-
activeBooleandefault=True -
codeTexthelp='Python code executed to check if the exception apply or not. Use failed = True to block the exception' args: 'Python Code' -
descriptionTexttranslate=True -
domainChar -
exception_typeSelectiondefault='by_py_code'help='By python code: allow to define any arbitrary check\nBy domain: limited to a selection by an odoo domain:\n performance can be better when exceptions are evaluated with several records\nBy method: allow to select an existing check method'required=Trueselection=[('by_domain', 'By domain'), ('by_py_code', 'By python code'), ('by_method', 'By method')] -
is_blockingBooleanhelp='When checked the exception can not be ignored' -
methodSelectionreadonly=Trueselection=[] -
modelSelectionrequired=Trueselection=[]string='Apply on' -
nameCharrequired=Truetranslate=True args: 'Exception Name' -
sequenceIntegerhelp='Gives the sequence order when applying the test'
-
check_exception_type_consistency(self)@api.constrains('exception_type', 'domain', 'code', 'model') -
create(self, vals_list)@api.model_create_multi -
unlink(self) -
write(self, vals)
New fields (3)
-
exception_idsMany2many → exception.rulereadonly=Truestring='Exceptions to resolve' args: 'exception.rule' -
ignoreBooleanargs: 'Ignore Exceptions' -
related_model_idMany2one → base.exceptionargs: 'base.exception'
-
action_confirm(self) -
default_get(self, field_list)@api.model
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…