Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Base

Entity: ir.sequence

Compute Method: _get_number_next_actual

Inputs Method Outputs
'''Return number from ir_sequence row when no_gap implementation,
        and number from postgres sequence when standard implementation.'''
for seq in self:
            if not seq.id:
                seq.number_next_actual = 0
            elif seq.implementation != 'standard':
                seq.number_next_actual = seq.number_next
            else:
                seq_id = "%03d" % seq.id
                seq.number_next_actual = _predict_nextval(self, seq_id)

Back to entity