Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Invoicing
Entity: sequence.mixin
Compute Method: _compute_split_sequence
| Inputs | Method | Outputs |
|---|---|---|
|
|
for record in self:
sequence = record[record._sequence_field] or ''
- regex = re.sub(r"\?P<\w+>", "?:", record._sequence_fixed_regex.replace(r"?P<seq>", "")) # make the seq the only matching group
+ # make the seq the only matching group
+ regex = self._make_regex_non_capturing(record._sequence_fixed_regex.replace(r"?P<seq>", ""))
matching = re.match(regex, sequence)
record.sequence_prefix = sequence[:matching.start(1)]
record.sequence_number = int(matching.group(1) or 0)
|
|
