Repository
OCA/server-ux · module folder · Try on Runboat
Module version
1.0.1
Category
Tools
Folder size
0.09 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/server-ux
Last tracking update
2026-08-07 09:06:24
Authors
Akretion, Odoo Community Association (OCA)
Maintainers
Akretion, Odoo Community Association (OCA)
Committers
OCA-git-bot, oca-ci, bosd, Camille Morand
Odoo dependencies
odoo/odoo:
- web
- bus
Python dependencies
None
System dependencies
None
Required by
account_move_substate, sale_substate
Description
This module provide abstract models to manage customizable substates to
be applied on different models (sale order, purchase, ...).

## example:

- for the quotation state of a sale order we can define 3 substates "In
  negotiation", "Won" and "Lost".
- We can also send mail when the substate is reached.

It is not useful by itself. You can see an example of implementation in
the 'purchase_substate' module. (purchase-workflow repository).

Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
base_substate_type_view_form base.substate.type form New
base_substate_type_view_list base.substate.type list New
base_substate_type_view_search base.substate.type search New
base_substate_view_form base.substate form New
base_substate_view_list base.substate list New
base_substate_view_search base.substate search New
target_state_value_view_form target.state.value form New
target_state_value_view_list target.state.value list New
target_state_value_view_search target.state.value search New
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (4)

New fields (7)
  • active Boolean
    default=True
  • description Text
    translate=True
  • mail_template_id Many2one → mail.template
    help='If set, an email will be sent to the partner when the object reaches this substate.' string='Email Template' args: 'mail.template'
  • model Selection
    help='Model for technical use' readonly=True related='target_state_value_id.model' store=True
  • name Char
    required=True translate=True args: 'Substate Name'
  • sequence Integer
    help='Gives the sequence order when applying the default substate' index=True
  • target_state_value_id Many2one → target.state.value
    ondelete='restrict' string='Target State Value' args: 'target.state.value'
Public methods (0)

No public methods.

New fields (1)
  • substate_id Many2one → base.substate
    copy=False default=<expr> domain=<expr> index=True ondelete='restrict' string='Sub State' tracking=True args: 'base.substate'
Public methods (4)
  • check_substate_id_consistency(self)
    @api.constrains('substate_id')
  • check_substate_id_value(self)
    @api.constrains('substate_id', _state_field)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, values)

New fields (3)
  • model Selection
    required=True selection=[] string='Apply on'
  • name Char
    required=True translate=True
  • target_state_field Char
    help='Technical target state field name. Ex for sale order "state" for other "status" ... ' required=True
Public methods (0)

No public methods.

New fields (4)
  • base_substate_type_id Many2one → base.substate.type
    ondelete='restrict' string='Substate Type' args: 'base.substate.type'
  • model Selection
    help='Model for technical use' readonly=True related='base_substate_type_id.model' store=True
  • name Char
    help='Target state translateble name.\nEx: for sale order "Quotation", "Sale order", "Locked"...' required=True translate=True args: 'Target state Name'
  • target_state_value Char
    help='Technical target state value.\nEx: for sale order "draft", "sale", "done", ...' required=True
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…