_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