Skip to Content
Menu
This question has been flagged
1 Reply
5215 Views

Can any one explain me why OpenErp Create some default in posgresql database table while creating a new object in OpneErp module ??

In a email_template module email.template object create some default field Like.. id,create_uid,create_date,write_date explain each field with description While from Openerp trunk-Server in base module like res_users and res_partner doen't created this kind of field in posgreSql database tables my question is why and and why not ??

Avatar
Discard
Best Answer

id is added automatically to every model by OpenERP.

Every database requires a unique identified and OpenERP manages this via the id field and a related sequence.

The others are created for every model where self._log_access is set to True (which it is by default).

They are required if access rules are to be implemented for the model.

  • the user who created the record (create_uid)
  • the time it was created (create_date)
  • the user who last updated the record (write_uid)
  • the time it was last updated (write_date)

If a value for self._log_access is not specified, then you can prevent them from being created if self._auto is set to False

Avatar
Discard
Author

thanks Ray Carnes do u know why above fields is not used in base module for database table like res_users and res_partner as per my knowledge its default module in openerp therefore openerp doen't require this kind of fields