I want my opportunity stage to change when I store or sent a quotation with an automated action.
I believe I would need to execute some python code when the status is "draft"
Could someone help me out?
Thanks
Jan
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
I want my opportunity stage to change when I store or sent a quotation with an automated action.
I believe I would need to execute some python code when the status is "draft"
Could someone help me out?
Thanks
Jan
Odoo 18.0
Create an Automation Rule that is triggered when the Quotation state is set to Quotation Sent:
Hi Jan,
I- what you want is: "When a quotation is created, the related opportunity must have the stage X."
the algorithm is pretty simple:
1- when quotation's create funtion is triggered.
2- if field opportunity_id is not empty, then trigger lead stage change.
3- if not, standard quotation creation.
the code should be something like this:
@api.model
def create(self, values):
rec = super(....).create(values)
if rec.opportunity_id:
rec.opportunity_id.stage_id = Ref to stage X
return rec
II- If the process should be triggered while calling an automated action, then it's almost the same logic:
1- If automated action is called
2- Basically it will create quotations i assume ?
3- you get all quotations created and say :
quotation_ids.mapped('opportunity_id').write('stage_id': Ref to stage X )
Hope this helps.
Upvote if it does.
Hi Ibrahim
I will surely try this out.
In the mean time I also found this in the forum:
https://www.odoo.com/nl_NL/forum/help-1/crm-pipeline-automation-171632
This also works!
Will keep you posted on my findings.
thx for the swift reply!
Jan
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up