Availability |
Odoo Online
Odoo.sh
On Premise
|
Lines of code | 42 |
Technical Name |
incrementing_sequence_mixin |
License | LGPL-3 |
Website | http://www.bemade.org |
Versions | 17.0 |
Adds an incrementing.sequence.mixin model to inherit from. This model adds a sequence field to the models that inherit from it, including the logic to set it to the highest current sequence number + 1 by default and to leave it otherwise changeable by the user (i.e. with a drag and drop via the handle).
Specify the _sequence_group attribute on the model to indicate which field to use to determine if records belong to the same group. For example, if one were to use this on sale.order.line, they could specify "order_id" as the _sequence_group such that newly created lines take on the highest sequence number of all lines on the same sales order.
Please log in to comment on this module