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

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 225
    Comment on it

    If you need to modifiy your current context you may use the with_context() function.

    self.env['res.partner'].with_context(tz=x).create(vals)
    Be careful not to modify current RecordSet using this functionality:
    self = self.env['res.partner'].with_context(tz=x).browse(self.ids)

    Note- It will modifiy the current Records in RecordSet after a rebrowse and will generate an incoherence between caches and RecordSet.

 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: