تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
1708 أدوات العرض

I want to auto generate my own sequential code and don't want Odoo to add the text "Customer's Opportunity" when I select the Customer. How do I disable it and auto generate a new sequential number whenever I create a new opportunity just like Sales Order. 

الصورة الرمزية
إهمال
أفضل إجابة

Hi,

In Odoo the name of the CRM ie, "Customer Opportunity" is gaining by a compute method . So inorder to disable it you need to inherit the module "crm.lead" and override the field name and remove the compute function from it or you can super the compute function and change the functionality.
And to add custom sequence number in CRM please refer to our blog


https://www.cybrosys.com/blog/how-to-create-sequence-numbers-in-odoo-17#:~:text=In%20Odoo%2017%2C%20you%20can,accessing%20the%20%22Sequences%22%20option


Hope it helps

الصورة الرمزية
إهمال
أفضل إجابة

Hi,
Using automated action, you can achieve the same. See this example of generating the automatic barcode value for the product using the automated action and the sequence, using the same approach you can achieve your goal.

* Define a sequence
* Create an automated action which executes on create and get the value from sequence
* set the value to the field

Watch:  Generate Barcode For Products Using Automated Action In Odoo



Thanks

الصورة الرمزية
إهمال
المنشورات ذات الصلة الردود أدوات العرض النشاط
1
مارس 24
1333
3
فبراير 24
1901
1
أبريل 23
8360
CRM automations تم الحل
1
ديسمبر 24
1224
1
مارس 24
3090