Skip to content
Health
90/100
good
  • Security25/25
    No findings
  • Activity20/25
    Last human commit 10 months ago
  • Required by20/25
    2 modules depend on it
  • Maturity25/25
    In 5 Odoo series since 14.0

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

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

Description

This module allow user to add optional sequences to some document model. On which sequence is used, is based on domain matching with document values (and original sequence will be bypassed).

For example, it is now possible to,

  • Avoid using Odoo automatic sequence on invoice and vendor bill with old style sequence.
  • Customer payment and vendor payment to run on different sequence.
  • Assign different sales order sequence based on customer region.

This is a base module and does nothing by itself. Following are modules that will allow managing sequence options for each type of documents, I.e.,

  • Purchase Order: purchase_sequence_option
  • Invoice / Bill / Refund / Payment: account_sequence_option
  • Others: create a new module with few lines of code

Dependencies

Odoo dependencies
odoo/odoo:
Python dependencies
odoo_test_helper
System dependencies
None
Required by
account_sequence_option, hr_expense_sequence_option

Code analysis

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

Views touched 3

XML IDNameModelTypeStatus
view_ir_sequence_option_form view.ir.sequence.option.form ir.sequence.option form New
view_ir_sequence_option_line_tree view.ir.sequence.option.line.list ir.sequence.option.line list New
view_ir_sequence_option_tree view.ir.sequence.option.list ir.sequence.option list New

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 3

New fields (0)

No new fields.

Public methods (2)
  • next_by_code(self, sequence_code, sequence_date=None)
    @api.model
  • next_by_id(self, sequence_date=None)

New fields (5)
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> help='Company related to this sequence option' index=True readonly=False required=True string='Company'
  • model Selection
    index=True readonly=False required=True selection=[] string='Apply On Model'
  • name Char
  • option_ids One2many → ir.sequence.option.line
    comodel_name='ir.sequence.option.line' inverse_name='base_id' string='Sequence Options'
  • use_sequence_option Boolean
    help='If checked, Odoo will try to find the new matching sequence first, if not found, fall back to use the original Odoo sequence.' string='Use sequence options'
Public methods (0)

No public methods.

New fields (10)
  • base_id Many2one → ir.sequence.option
    comodel_name='ir.sequence.option' index=True ondelete='cascade' required=True
  • company_id Many2one → res.company
    comodel_name='res.company' related='base_id.company_id' store=True
  • filter_domain Char
    default='[]' help='Find matching option by document values' string='Apply On'
  • implementation Selection
    related='sequence_id.implementation' string='Implementation'
  • model Selection
    related='base_id.model' store=True
  • name Char
    required=True string='Description'
  • prefix Char
    related='sequence_id.prefix' string='Prefix'
  • sequence_id Many2one → ir.sequence
    check_company=True comodel_name='ir.sequence' required=True string='Sequence'
  • suffix Char
    related='sequence_id.suffix' string='Suffix'
  • use_sequence_option Boolean
    related='base_id.use_sequence_option'
Public methods (2)
  • get_model_options(self, model)
  • get_sequence(self, record, options=False)
    Find sequence option that match the record values

Loading…

Loading…

Loading…

Loading…

Loading…