Hello,
When I try to get an active id using the below, it shows None.
self.env.context.get('active_id')
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello,
When I try to get an active id using the below, it shows None.
self.env.context.get('active_id')
HI,
Based on the comment you have added, it seems you need to use self.id instead of looking for the active_id . In the validation to exclude the current record you can use self.id to compare or to exclude the current record.
To know more about self and odoo environment, see: Odoo Environment Variables
Thanks
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up
1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.