In new ids context all work is done in the cache. And after that check all function and ids in python file, and creating a record in a model with computed fields, the records of the recordset will be in memory only. At that time the id of the record will be a dummy ids of type
openerp.models.NewId
if isinstance(current_record.id, models.NewId):
# do your stuff
Note- if you need to use the record id in your code (e.g. for a sql query) you should check if it is available or not.
0 Comment(s)