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:

By
abin c ibrahim
on 1/5/15, 11:46 PM 912 views

I create a many2one relationship to view the field referred(crm.lead) in Reference/Description(sale.order) as follows,

        'client_order_ref': fields.many2one('crm.lead.referred','Reference/Description', copy=False),

but it cause the following error when i click the Reference?Description field,

File "/home/amz02/Projects/odoo/odoo-8.0-647afdf/openerp/sql_db.py", line 234, in execute res = self._obj.execute(query, params) ProgrammingError: relation "_unknown" does not exist LINE 1: SELECT "_unknown".id FROM "_unknown" ORDER BY "_unknown"."id...

Any1 can help me,,,,

 

 

0

Dhinesh - Technical Consultant, Sodexis Inc

--Dhinesh - Technical Consultant, Sodexis Inc--
3577
| 5 4 9
Pondicherry, India
--Dhinesh - Technical Consultant, Sodexis Inc--

Passionate coder in Python/OpenERP. Knows Django/Flask MVC frameworks. Did code in Java, PHP.

Contact me at: dvdhinesh.mail@gmail.com

Dhinesh - Technical Consultant, Sodexis Inc
On 1/6/15, 12:20 AM

Hi, I am not aware object named 'crm.lead.referred'. What i assume is 'referred' is a field in 'crm.lead' object. So if you want to get the value go for related field.

'opportunity_id': fields.many2one('crm.lead','Opportunity Reference', required=True),

'client_order_ref': fields.related('opportunity_id', 'referred', type='many2one', readonly=True, string='Reference/Description')

0
abin c ibrahim
On 1/6/15, 3:08 AM

Thanks Dinesh,

As per ur answer i got all the opportunity_id in crm.lead,How can i get a particular opportunity_id which is related to a saleorder?

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

1 follower(s)

Stats

Asked: 1/5/15, 11:46 PM
Seen: 912 times
Last updated: 3/16/15, 8:10 AM