Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • Environment swapping in odoo9

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 273
    Comment on it

    Environment swapping is most important for odoo module and with_context([context][, **overrides])
    records[source]
    It Returns a new version of this recordset attached to an extended context.
    The extended context is either the provided context in which overrides are merged or the current context in which overrides are merged e.g.:

    # current context is {'key1': True}
    r2 = records.with_context({}, key2=True)
    # -> r2._context is {'key2': True}
    r2 = records.with_context(key2=True)
    # -> r2._context is {'key1': True, 'key2': True}

    Note-Returns a new version of this recordset attached to the provided environment

 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: