Odoo Help

Welcome!

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.

0

_sequence predefined fields

By
omprakash
on 5/21/13, 1:58 PM 1,490 views

Hai Friends ,

   I have question in Technical Training Document : OpenERP Object Attributes / Predefined fields  [ _sequence ] .
  1. How to make use _sequence ? Please clarify my doubt .And once again thanks for everyone .

Thanks & Regards

OMPRAKASH.A

0

Vasiliy Birukov

--Vasiliy Birukov--
3446
| 6 6 8
Russian Federation
--Vasiliy Birukov--

Help develop and implement any project on base Odoo.

Vasiliy Birukov
On 5/22/13, 5:04 AM

Attribute _sequence define name of SEQUENCE generator (in PostgreSQL DB) for calculate new ID of your object records in your table. By default it have name: NAME_YOUR_TABLE+_id_seq.

Field sequence defines order of your object records in list views (if visible) and allows drag&drop reordering .

Hi wowas , Thanks for your immediate reply . Now i have idea about _sequence . If you please explain with example it make more useful for me .... And once again thanks ......OMPRAKASH.A

omprakash
on 5/22/13, 1:11 PM

It use in framework: _sequence = 'ir_actions_id_seq'. If you need change default name, then you use it. But I think this rare case.

Vasiliy Birukov
on 5/23/13, 2:55 AM

Hi wowas , Thanks for your reply..I can't understand . Can u please explain me again . I very interest to learn OpenERP . The above line are difficult for me to understand -Attribute _sequence define name of SEQUENCE generator (in PostgreSQL DB) for calculate new ID of your object records in your table. By default it have name: NAME_YOUR_TABLE+_id_seq. Field sequence defines order of your object records in list views (if visible) and allows drag&drop reordering .

omprakash
on 5/28/13, 12:14 PM

PostgreSQL have builtin generator of sequence. When you define new object in OpenERP, framework auto define such sequence with name NAME_YOUR_TABLE_id_seq. Framework use it for generate unique ID for each record in your object (row in table). If you want that framework define sequence with other name then you use Attribute _sequence, like in link above.

Vasiliy Birukov
on 5/29/13, 2:51 AM

sequence is absolutely different thing. It's field. Name of special field. If your object have such field, then in list view your records order by this field. And in list view you can change order by drag&drop.

Vasiliy Birukov
on 5/29/13, 3:10 AM

Hi wowas , Thanks for immediate reply . Right now i can understand the concept . But still having doubt what is the purpose using _sequence = 'ir_actions_id_seq' & Field sequence defines order of your object records in list views (if visible) and allows drag&drop reordering . Is there any existing example(module ) It make more easy to understand . Please help me . And once again thank you for care .

omprakash
on 5/29/13, 8:14 AM

It is not related things. Just you ask about Attributes and Fields.

Vasiliy Birukov
on 5/30/13, 2:59 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)

Stats

Asked: 5/21/13, 1:58 PM
Seen: 1490 times
Last updated: 7/10/15, 12:10 PM