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

ProgrammingError: constraint foreign key relation does not exist

By
Santhoshkumar
on 4/16/14, 8:54 AM 1,861 views

When i am upgrade my crm module it shows following error and does not login admin.

ProgrammingError: constraint "portal_crm_crm_contact_us_b_unit_fkey" of relation "portal_crm_crm_contact_us" does not exist

Can any one help me out......

0

Med Said BARA

--Med Said BARA--
2664
| 5 5 7
Algeria
--Med Said BARA--
Med Said BARA
On 4/16/14, 1:42 PM

You probably deleted a module or a record related to b_unit.

What's b_unit ?

b_unit is a field created by me in crm.py also in crm_lead.py

Santhoshkumar
on 4/17/14, 3:33 AM

How did you create it - Paste your code. Did you updated your OpenERP instance recently ?

Med Said BARA
on 4/17/14, 8:42 AM

I created as a field in crm_lead.py file.I updated OpenERP instance recently 'B_unit':fields.many2one('crm.case.businessunit','Business Unit',required=True),

Santhoshkumar
on 4/18/14, 3:54 AM

When you update, the core file and the addons files are updated (including the crm module), this means that probably the changes you made in crm_lead.py are lost.

Med Said BARA
on 4/18/14, 7:56 AM
0
Rafael Reuber
On 4/16/14, 11:38 AM

Start the openerp-server updating your crm módule:

sh openerp-server -d yourdbname -u all

This command will update all your database structure. You can also only update especific module, for example:

sh openerp-server -d yourdbname -u my_crm

Thank you Rafael Reuber i will try these commands...

Santhoshkumar
on 4/17/14, 3:32 AM

Mr.Rafael Reuber when try this sh openerp-server -d yourdbname -u crm it shows openerp-server: 2: openerp-server: import: not found openerp-server: 5: openerp-server: Syntax error: Bad function name

Santhoshkumar
on 4/17/14, 4:07 AM

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: 4/16/14, 8:54 AM
Seen: 1861 times
Last updated: 3/16/15, 8:10 AM