Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How can I maintain AVAILABLE_STATES in CRM?

By
Zahin
on 6/3/13, 4:20 AM 996 views

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.

3

saad

--saad--
1008
| 5 4 8
Casablanca, Morocco
--saad--
saad
On 6/3/13, 6:45 AM

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.

Zahin
on 6/5/13, 8:32 AM
0
Farid Ghanchi
On 9/5/14, 2:08 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 6/3/13, 4:20 AM
Seen: 996 times
Last updated: 3/16/15, 8:10 AM