The common syntax of record rules is ['|',('user_id','=',user.id),('user_id','=',False)]]
Is there any possiblilties we can use a python method to get the dynamic ids of user?
Example
['|',('user_id','=',getuserid()),('user_id','=',False)]
Se marcó esta pregunta
1
Responder
1708
Vistas
Hii Shashank ,
You can try this below code:
['|',('user_id','=', user.env["your.model"].get_userid().id), ('user_id','=' ,False)]
py:
def get_userid(self):
domain = []
return self.env["res.user"].search(domain)
Thanks & Regards,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
¿Le interesa esta conversación? ¡Participe en ella!
Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.
Registrarse