[FIX] account: manage multiple ids in _is_end_of_seq_chain
`_deduce_sequence_number_reset` should be used on maximum one record. That function is called from `_get_sequence_format_param` in `_is_end_of_seq_chain` but that function was possibly calling it on multiple ids. https://runbot.odoo.com/runbot/build/10315612 closes odoo/odoo#77811 X-original-commit: 10b880ae999643a4e3e9328d96196a19b0cf7ac6 Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com> Signed-off-by: William André (wan) <wan@odoo.com>
This commit is contained in:
@@ -264,7 +264,7 @@ class SequenceMixin(models.AbstractModel):
|
||||
"""
|
||||
batched = defaultdict(lambda: {'last_rec': self.browse(), 'seq_list': []})
|
||||
for record in self:
|
||||
seq_format, format_values = self._get_sequence_format_param(record[record._sequence_field])
|
||||
seq_format, format_values = record._get_sequence_format_param(record[record._sequence_field])
|
||||
seq = format_values.pop('seq')
|
||||
batch = batched[(seq_format, frozendict(format_values))]
|
||||
batch['seq_list'].append(seq)
|
||||
|
||||
Reference in New Issue
Block a user