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
odoo/odoo:
- web
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 IDNameModelTypeStatus
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_ids Many2many → exception.rule
    copy=False string='Exceptions' args: 'exception.rule'
  • exceptions_summary Html
    compute='_compute_exceptions_summary'
  • ignore_exception Boolean
    copy=False args: 'Ignore Exceptions'
  • main_exception_id Many2one → exception.rule
    compute='_compute_main_error' store=True string='Main Exception' args: 'exception.rule'
Public methods (1)
  • 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)
  • active Boolean
    default=True
  • code Text
    help='Python code executed to check if the exception apply or not. Use failed = True to block the exception' args: 'Python Code'
  • description Text
    translate=True
  • domain Char
  • exception_type Selection
    default='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=True selection=[('by_domain', 'By domain'), ('by_py_code', 'By python code'), ('by_method', 'By method')]
  • is_blocking Boolean
    help='When checked the exception can not be ignored'
  • method Selection
    readonly=True selection=[]
  • model Selection
    required=True selection=[] string='Apply on'
  • name Char
    required=True translate=True args: 'Exception Name'
  • sequence Integer
    help='Gives the sequence order when applying the test'
Public methods (4)
  • 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_ids Many2many → exception.rule
    readonly=True string='Exceptions to resolve' args: 'exception.rule'
  • ignore Boolean
    args: 'Ignore Exceptions'
  • related_model_id Many2one → base.exception
    args: 'base.exception'
Public methods (2)
  • action_confirm(self)
  • default_get(self, field_list)
    @api.model

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…