Exception Rule

base_exception
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/19.0/base_exception
VERSION
VERSION 1.0.0
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion, Camptocamp, ACSONE SA/NV, Sodexis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion, Camptocamp, ACSONE SA/NV, Sodexis
COMMITTERS
COMMITTERSWeblate, OCA-git-bot, oca-ci, Franco Leyes
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:40:46
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base_setup
    - base
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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
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
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/18.0/base_exception
VERSION
VERSION 1.1.1
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion, Camptocamp, ACSONE SA/NV, Sodexis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion, Camptocamp, ACSONE SA/NV, Sodexis
COMMITTERS
COMMITTERSStefan Rijnhart, Weblate, OCA-git-bot, Stephane Mangin, oca-ci, Duy (Đỗ Anh)
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:30:08
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base_setup
    - base
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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
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
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/17.0/base_exception
VERSION
VERSION 1.1.0
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion, Camptocamp, ACSONE SA/NV, Sodexis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion, Camptocamp, ACSONE SA/NV, Sodexis
COMMITTERS
COMMITTERSPedro M. Baeza, Weblate, OCA-git-bot, SilvioC2C, oca-ci, docker-odoo, Franco Leyes
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 19:20:01
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base_setup
    - base
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
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_tree exception.rule.tree exception.rule tree New
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
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/16.0/base_exception
VERSION
VERSION 2.1.0
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion, Camptocamp, ACSONE SA/NV, Sodexis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion, Camptocamp, ACSONE SA/NV, Sodexis
COMMITTERS
COMMITTERSLaurent Mignon (ACSONE), Denis Roussel, Weblate, OCA-git-bot, oca-ci, matiasperalta1, aliciagarzo, Ahmet Yigit Budak
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:53:53
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base_setup
    - base
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

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_tree exception.rule.tree exception.rule tree New
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
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/15.0/base_exception
VERSION
VERSION 1.0.3
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion, Camptocamp, Sodexis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion, Camptocamp, Sodexis
COMMITTERS
COMMITTERSMiquel Raïch, Weblate, OCA-git-bot, oca-ci, CarlosRoca13, Cesar Andres Sanchez, josep-tecnativa
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:46:39
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base_setup
    - base
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

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_tree exception.rule.tree exception.rule tree New
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 (1)
  • check_exception_type_consistency(self)
    @api.constrains('exception_type', 'domain', 'code', 'model')

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
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/14.0/base_exception
VERSION
VERSION 3.0.0
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion, Camptocamp, ACSONE SA/NV, Sodexis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion, Camptocamp, ACSONE SA/NV, Sodexis
COMMITTERS
COMMITTERSmreficent, Enric Tobella, Ivàn Todorovich, OCA Transbot, Sébastien BEAU, oca-travis, Weblate, OCA-git-bot, oca-ci, Kitti U, Kevin Khao, Hai Lang, oca-git-bot, Joshua Lauer
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:41:06
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base_setup
    - base
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

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_tree exception.rule.tree exception.rule tree New
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' args: '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
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/13.0/base_exception
VERSION
VERSION 1.2.0
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion, Camptocamp, Sodexis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion, Camptocamp, Sodexis
COMMITTERS
COMMITTERSStefan Rijnhart, Jairo Llopis, mreficent, Jordi Ballester, OCA Transbot, Thierry Ducrest, João Marques, oca-travis, Weblate, OCA-git-bot, GuillemCForgeFlow
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:34:17
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base_setup
    - base
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

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_tree exception.rule.tree exception.rule tree New
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' args: '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 (9)
  • active Boolean
    default=True args: 'Active'
  • 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 args: 'Description'
  • domain Char
    args: 'Domain'
  • 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' required=True selection=[('by_domain', 'By domain'), ('by_py_code', 'By python code')] string='Exception Type'
  • is_blocking Boolean
    help='When checked the exception can not be ignored' string='Is blocking'
  • 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' string='Sequence'
Public methods (1)
  • check_exception_type_consistency(self)
    @api.constrains('exception_type', 'domain', 'code')

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
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/12.0/base_exception
VERSION
VERSION 3.1.1
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion, Camptocamp, Sodexis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion, Camptocamp, Sodexis
COMMITTERS
COMMITTERSGuewen Baconnier, Jared Kipe, OCA Transbot, Sébastien BEAU, Florian da Costa, David Beal, oca-travis, Weblate, OCA-git-bot, Iván Todorovich, Tom Blauwendraat, hparfr, KevinKhao
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:29:22
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base_setup
    - base
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

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_tree exception.rule.tree exception.rule tree New
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' args: '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)
    @api.multi

New fields (0)

No new fields.

Public methods (1)
  • detect_exceptions(self)
    @api.multi
    List all exception_ids applied on self Exception ids are also written on records

New fields (9)
  • active Boolean
    default=True args: 'Active'
  • 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 args: 'Description'
  • domain Char
    args: 'Domain'
  • 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' required=True selection=[('by_domain', 'By domain'), ('by_py_code', 'By python code'), ('by_method', 'By method')] string='Exception Type'
  • method Selection
    readonly=True selection=[] string='Method'
  • 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' string='Sequence'
Public methods (1)
  • check_exception_type_consistency(self)
    @api.constrains('exception_type', 'domain', 'code', 'model')

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)
    @api.multi
  • default_get(self, field_list)
    @api.model
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/11.0/base_exception
VERSION
VERSION 1.1.2
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion, Camptocamp, Sodexis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion, Camptocamp, Sodexis
COMMITTERS
COMMITTERSAlexandre Fayolle, Andrea, Enric Tobella, Stéphane Bidoul (ACSONE), Jordi Ballester, OCA Transbot, David Beal, oca-travis, Weblate, OCA-git-bot, Iván Todorovich, Tom Blauwendraat, Mourad, nicomacr
WEBSITE
WEBSITEhttps://github.com/OCA/server-tools
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:24:00
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base_setup
    - base
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

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_tree exception.rule.tree exception.rule tree New
Models touched (3)

New fields (4)
  • exception_ids Many2many → exception.rule
    copy=False string='Exceptions' args: 'exception.rule'
  • 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'
  • rule_group Selection
    readonly=True args: []
Public methods (2)
  • detect_exceptions(self)
    @api.multi
    returns the list of exception_ids for all the considered base.exceptions
  • test_exceptions(self)
    @api.multi
    Condition method for the workflow from draft to confirm

New fields (8)
  • active Boolean
    args: 'Active'
  • code Text
    default='\n# Python code. Use failed = True to block the base.exception.\n# You can use the following variables :\n# - self: ORM model of the record which is checked\n# - "rule_group" or "rule_group_"line:\n# browse_record of the base.exception or\n# base.exception line (ex rule_group = sale for sale order)\n# - object: same as order or line, browse_record of the base.exception or\n# base.exception line\n# - obj: same as object\n# - env: Odoo Environment (i.e. self.env)\n# - time: Python time module\n# - cr: database cursor\n# - uid: current user id\n# - context: current context\n' 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 args: 'Description'
  • model Selection
    required=True selection=[] string='Apply on'
  • name Char
    required=True translate=True args: 'Exception Name'
  • next_state Char
    help="If we detect exception we set the state of object (ex purchase) to the next_state (ex 'to approve'). If there are more than one exception detected and all have a value for next_state, we usethe exception having the smallest sequence value" args: 'Next state'
  • rule_group Selection
    help='Rule group is used to group the rules that must validated at same time for a target object. Ex: validate sale.order.line rules with sale order rules.' required=True selection=[]
  • sequence Integer
    help='Gives the sequence order when applying the test' string='Sequence'
Public methods (0)

No public methods.

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)
    @api.multi
  • default_get(self, field_list)
    @api.model
REPOSITORY
REPOSITORYOCA/server-tools
GIT
GIThttps://github.com/OCA/server-tools.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/server-tools/tree/10.0/base_exception
VERSION
VERSION 4.1.1
CATEGORY
CATEGORYGeneric Modules
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Akretion, Camptocamp, Sodexis
MAINTAINERS
MAINTAINERSOdoo Community Association (OCA), Akretion, Camptocamp, Sodexis
COMMITTERS
COMMITTERSGuewen Baconnier, Alexandre Fayolle, Pedro M. Baeza, GitHub, Cédric Pigeon, Laurent Mignon (ACSONE), Denis Roussel, Stéphane Bidoul (ACSONE), OCA Transbot, Florian da Costa, David Beal, oca-travis, Weblate, OCA-git-bot, hparfr, Mourad Elhadj Mimoune, Mourad EL HADJ MIMOUNE
WEBSITE
WEBSITEhttp://www.akretion.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:19:59
ODOO DEPENDENCIES
ODOO DEPENDENCIES odoo/odoo:
    - base_setup
    - base
    - web_kanban
    - web
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION

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_tree exception.rule.tree exception.rule tree New
Models touched (1)

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)
    @api.multi
  • default_get(self, field_list)
    @api.model