Odoo Help



Ajeng Shilvie
on 12/22/14, 2:45 AM 617 views

can i create new sequence type by override create method not by xml in odooV8 ?


Ludo - 21South

--Ludo - 21South--
| 2 2 5
Zwijndrecht, Netherlands
--Ludo - 21South--


Ludo - 21South
On 12/22/14, 3:56 AM

Yes, because they are just regular Odoo objects like any other (ir.sequence), but why would you? What would be the benefit of creating sequences on the spot? And why create new sequences that do not belong to a module per default?

If you create a sequence using the regular XML way, the sequence does not nesc. have to be used anyway.

because the sequence format that i want is defend on partner_id.id, whenever i choose different partner , the sequence changes as well

Ajeng Shilvie
on 12/22/14, 5:02 AM

So, you will need a sequence per partner actually? What part should be the sequence in this case? Something like "partner_id-sequence_number"? If that is really the case AND the sequences for 2 partners may overlap (so partner X can have 0001 and partner y can have 0001 as well), then it might indeed be handy to create them on te spot. The only thing is, I don't think by default you can assign a sequence to a particular partner, so if you need that functionality you should build it yourself. An additional field should be enough I suppose.

21south, Ludo - 21South
on 12/22/14, 6:12 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 12/22/14, 2:45 AM
Seen: 617 times
Last updated: 3/16/15, 8:10 AM