Base Sequence Option
base_sequence_option · OCA/server-tools
Health
90/100
good
-
Security25/25No findings
-
Activity20/25Last human commit 10 months ago
-
Required by20/252 modules depend on it
-
Maturity25/25In 5 Odoo series since 14.0
Heuristic over the facts below, not an audit · How it's computed
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:- base
- 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 ID | Name | Model | Type | Status |
|---|---|---|---|---|
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_idMany2one → res.companycomodel_name='res.company'default=<expr>help='Company related to this sequence option'index=Truereadonly=Falserequired=Truestring='Company' -
modelSelectionindex=Truereadonly=Falserequired=Trueselection=[]string='Apply On Model' -
nameChar -
option_idsOne2many → ir.sequence.option.linecomodel_name='ir.sequence.option.line'inverse_name='base_id'string='Sequence Options' -
use_sequence_optionBooleanhelp='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'
No public methods.
New fields (10)
-
base_idMany2one → ir.sequence.optioncomodel_name='ir.sequence.option'index=Trueondelete='cascade'required=True -
company_idMany2one → res.companycomodel_name='res.company'related='base_id.company_id'store=True -
filter_domainChardefault='[]'help='Find matching option by document values'string='Apply On' -
implementationSelectionrelated='sequence_id.implementation'string='Implementation' -
modelSelectionrelated='base_id.model'store=True -
nameCharrequired=Truestring='Description' -
prefixCharrelated='sequence_id.prefix'string='Prefix' -
sequence_idMany2one → ir.sequencecheck_company=Truecomodel_name='ir.sequence'required=Truestring='Sequence' -
suffixCharrelated='sequence_id.suffix'string='Suffix' -
use_sequence_optionBooleanrelated='base_id.use_sequence_option'
-
get_model_options(self, model) -
get_sequence(self, record, options=False)Find sequence option that match the record values
Loading…
Loading…
Loading…
Loading…
Loading…