Hello, I need to know what is the field that relates CRM to sales. The thing I need to do is upon confirmation of the quotation, the crm opportunity should change to won automatically, but I can't find the relation between them.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
This code
I hope I understood your need and this is the solution you want.
class SaleOrder(models.Model):
_inherit = 'sale.order'
_description = 'mark opportunity as won from sale order wen you confirm order'
def _action_confirm(self):
opportunity_obj = self.env['crm.lead'].browse(self.opportunity_id.id)
if opportunity_obj.exists():
opportunity_obj.action_set_won_rainbowman()
return super(SaleOrder, self)._action_confirm()
Thanks
let me try it please
It worked, thank you so much!
sorry but i modified my answer check it.
i forget some things
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
Sure
- Email address: abude852@gmail.com
- Linkedin : https://www.linkedin.com/in/abdallah-sabeel/
- Whatsapp: +96597618088
Welcome
Thank you for your help!
Hello, can you check this question please? Link: https://www.odoo.com/nl_NL/forum/help-1/down-payments-sequence-numbers-213538
Hello Moe,
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,
Email: odoo@aktivsoftware.com
Skype: kalpeshmaheshwari
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
2
thg 8 25
|
589 | ||
|
1
thg 5 25
|
1081 | ||
|
2
thg 5 25
|
1519 | ||
|
1
thg 4 25
|
1443 | ||
|
0
thg 3 25
|
1466 |
which odoo version ?
Version 15. I wrote this code but it is not working, can you help?
class CRMLeadInherit(models.Model):
_inherit = 'crm.lead'
@api.onchange('order_ids.state')
def _onchange_quotation_sate(self):
for rec in self:
if rec.order_ids.state=='sale':
rec.stage_id='WON'
Okay 5 minutes i code it >_<