I hope I understood your need and this is the solution you want.
_inherit = 'sale.order'
_description = 'mark opportunity as won from sale order wen you confirm order'
opportunity_obj = self.env['crm.lead'].browse(self.opportunity_id.id)
return super(SaleOrder, self)._action_confirm()
Yes I marked your answer as the best one. I am more into functional odoo than technical, can I have a way to get in contact with you if I face problems with technical issues? If you don't mind of course. If it is okay with you: kindly provide me with your linked in account or any other social media platform
- Email address: email@example.com
- Linkedin : https://www.linkedin.com/in/abdallah-sabeel/
- Whatsapp: +96597618088
Hello, can you check this question please? Link: https://www.odoo.com/nl_NL/forum/help-1/down-payments-sequence-numbers-213538
In sale order model we have a Many2one field named "opportunity_id" to "crm.lead" model. By using this field you can access all data of crm record related to that sale order.
I Hope this will help you.
Thanks & Regards,
which odoo version ?
Version 15. I wrote this code but it is not working, can you help?
_inherit = 'crm.lead'
for rec in self:
Okay 5 minutes i code it >_<