[FIX] crm: fix lead/opportunity meeting scheduling
Reproduce the issue:
- In the CRM app, create a lead/opportunity.
- Schedule a meeting for this opportunity via
the chatter and click on create.
- Go back, the "Meeting" stat button is now at 1
- Schedule a meeting for this opportunity via
the chatter and click on edit then create.
- Go back, the "Meeting" stat button is still at 1
Cause:
When we click directly on create, the opportunity ID is in the defaults
option but when we click on edit, there is no opportunity ID.
So, this commit use the context to retrieve the concerned opportunity
and set it if it is not already set.
I splitted the solution into a private method for a better readability.
OPW-2092920
closes odoo/odoo#39853
Signed-off-by:
Simon Goffin (sig) <sig@openerp.com>
Please register or sign in to comment