Odoo 도움말


2 응답
Jigar Patel (jat)
19. 7. 1. 오전 5:47

Actually, Odoo automatically apply sequence on ID field. This is done by _sequence attribute on model and it's apply on 'ID' field here https://github.com/odoo/odoo/blob/12.0/odoo/models.py#L3630

If you check your table in Postgresql then ID column have description like id integer NOT NULL DEFAULT nextval('model_name_id_seq'::regclass). Here, nextval will execute sequence which will auto increment index.

You can read in detail what is exact nextval function? https://www.postgresql.org/docs/current/sql-createsequence.html

You can use _sequence attribute on model to change sequence field.

Nikunja Maharana India
19. 7. 1. 오후 8:50

Thank you Jigar Patel

Keep Informed
1 팔로워
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