Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to use New ids in Odoo ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 2.16k
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: