Hello!
I have a table like this:
row_number | some_data_1 | some_data_2 |
1 | ||
2 |
And I want the row_number to be automatically set to values starting from 1
How can I do it?
What code can I write in "Advanced Properties - Compute" on the row_number field?
I tried to do like this:
increment = 1
for record in self:
record['row_number'] = increment
increment = increment + 1
But when trying to add new lines - new lines start at 1 again
Help, please!
https://www.cybrosys.com/blog/how-to-add-sequence-in-odoo-12