How to increment the sequence in every two records for ex :
What is the best condition that i can use it to achieve this result in odoo 10 Regards |
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
2
Replies
2470
Views
if( i % 2 == 0):
count +=1
# this mean if i is even number (in 2 , 4 , 6 ,.... will be True)
Hai medmars,
you do like this,
seq = env['ir.sequence'].search([('code', '=', code)])
if (seq % 2 == 1)
number = (seq / 2) + 1
else:
number = (seq/2)
i think it will help you,
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up