Active User in Odoo

Hello Odooers, Odoogig and Odoo Lovers,

In this Odoo Tips Tutorial I would like to explain how to set logged in  or active user in odoo to user field

  • Sometimes we need to set default user in field, means it will automatically load current logged in user in user field
  • For example if user A is logged in and creates a record then user_id field of form will be automatically loaded with value A user.
  •  There are 2 ways of set  default value in field:
    1. Load Default value in field using Default method
    2. Load Default value in field using Lambda
#odoo12.0 #odootraining #oodooactiveuser #odootips #odoo

1.Load Default value in field using Default in field

  • Here, you have to define default method which will load default value in field

Example

 

2.Load Default value in field using Lambda in field

  • Instead of defining default method for field you can also use Lambda to load default values as shown below

Example

GET IN TOUCH.!

We’d Love to Hear from You! We are happy to answer any questions, you have regarding My Training.

Mail : getodootraining@gmail.com

Skype : mayur_maheshwari1

What’s app : +919924542042

LEAVE A REPLY

Leave a Reply

Your email address will not be published. Required fields are marked *