Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
3830 มุมมอง

Installed crm + sales,

Now I have created new module/addons sb_crm.

Now in CRM I want to add new states in AVAILABLE_STATES. Which defined in crm.py

How can I add more state from my module so it updates crm.AVAILABLE_STATES

Please let me know how can I resolve this from my modules sb_crm.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi zahin,
You should first import crm module in your sb_crm module:

from openerp.addons.crm import crm

As AVAILABLE_STATES is a list you can write:

crm.AVAILABLE_STATES.append(('new_state','New State'))
อวตาร
ละทิ้ง
ผู้เขียน

Thanks :) It works.

คำตอบที่ดีที่สุด

Thanks saad, One issue here when we installed default openerp CRM, that custom states also seen.

อวตาร
ละทิ้ง