Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
12066 มุมมอง

Hai Friends ,

I have question regards OpenERP Object Attributes / Predefined Fields  -  [ _auto & _sql ] .
  1. From the technical document i have idea , but still not clear . Can anyone please explain the fields properties ?

    And once again thanks for everyone , such support for newbie .

Thanks & Regards

OMPRAKASH.A

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

_sql: SQL code executed upon creation of the object (only if _auto is True). It means this code gets executed after the table is created.


_auto: Determines whether a corresponding PostgreSQL table must be generated automatically from the object. Setting _auto to False can be useful in case of OpenERP objects generated from PostgreSQL views. See the “Reporting From PostgreSQL Views” section for more details.

For example in sale.order class if you are defining _auto=False, sale_order table will not be created in PostgreSQL database.

_auto=False option mostly used to generated PostgreSQL views. You can see example of _auto here and here

Reference: Predefined Fields

อวตาร
ละทิ้ง
ผู้เขียน

Hi , Sudhir Arya thanks for immediate reply .. I like to know is there any existing example (module ) to understand about _sql & _auto ... OMPRAKASH.A

_sql: SQL code to create the table/view for this object (if _auto is False) – can be replaced by SQL execution in the init() method. (Reference: Technical Memento )

ผู้เขียน

Hi , Sudhir Arya .. Thanks for your reply ..Surely i will make use of it ....

ผู้เขียน

Hi wowas , Thanks for your reply ...

Related Posts ตอบกลับ มุมมอง กิจกรรม
_rec_name - predefined fields แก้ไขแล้ว
12
เม.ย. 23
55611
1
ก.ค. 15
7098
1
ต.ค. 18
3796
3
พ.ค. 25
1765
1
เม.ย. 25
1302