Odoo Help


This community 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.



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

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


Ludo - Neobis

--Ludo - Neobis--
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--


Ludo - Neobis
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.

Ludo - Neobis
on 12/22/14, 6:12 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


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