Odoo Help



Abin C I
on 1/5/15, 11:46 PM 1,528 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,,,,




Dhinesh - Technical Consultant, Sodexis Inc

--Dhinesh - Technical Consultant, Sodexis Inc--
| 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')

Abin C I
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?

About This Community

This platform 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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


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