Skip to content
Health
95/100
good
  • Security25/25
    No findings
  • Activity25/25
    Human commit this month
  • Required by20/25
    3 modules depend on it
  • Maturity25/25
    In 8 Odoo series since 12.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
3
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.09 MB
Module directory on disk
Code analysis 0 migration notes 4 models 9 views 0 HTTP endpoints

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).

Dependencies

Odoo dependencies
odoo/odoo:
- web
- bus
Python dependencies
None
System dependencies
None
Required by
account_move_substate, sale_substate, stock_picking_batch_substate

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

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' 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…

Loading…