Skip to Content
Menu
This question has been flagged

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

Avatar
Discard
Best Answer

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 .

Avatar
Discard
Author

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

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.

Author

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 .

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.

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.

Author

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 .

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

Related Posts Replies Views Activity
12
Apr 23
52938
1
Feb 23
6174
5
Sep 22
42844
1
Oct 22
10077
2
May 21
17315