Odoo Help


Need an OpenERP developer for help

on 1/10/14, 2:38 PM 1,159 views

Hi everybody,

I am currently working on a project with OpenERP 7. I have already done a lot of things but I block in few points.

Someone can help me? I think it will not be hard for an expert. The questions are more like:

How can I link two fields in two different objects ( one of the two fields is an one2many). I can pay your help.

Thank you a lot.


On 1/10/14, 7:53 PM

Dear Navnath Desale,

Thank you for your answer.

I have three importantes questions:

First one:

I would like to add a new field in the sale.py : Table sale_order. This field will link to an purchase _order. It is why I add this in the python code

class sale_order(osv.osv):
_name = "sale.order"
_inherit = ['mail.thread', 'ir.needaction_mixin']
_description = "Sales Order"
_columns = {
    'name': fields.char('Order Reference', size=64, required=True,
        readonly=True, states={'draft': [('readonly', False)], 'sent': [('readonly', False)]}, select=True),
    'link_Purchase': fields.many2one('purchase.order', 'Link Purchase'),

But it don't work. I have this error:

'NoneType' object has no attribute '_table' You know why please?

Second one :

Is it possible to print the result of an SQL queries? For exemple my SQL queries will send me the name of 10 products. I would like to have a tree with a line for each result. Is it possible? If yes how? With a field type function? How can I put in my field the names of the 10 products? How can I print it? For the moment I succeed in storing the result of my SQL queries in a field type text.

cr.execute('SELECT name from product_bat where name is not null')
res = cr.fetchall()
result['product_BAT'] = res

'product_BAT': fields.text('product.bat'),

<field name="product_BAT"/>

The problem is that I have the list of my result in one line, seperate by some coma.


Third one:

I would like to know how is possible to get (or to link together) two fields in two differents tables?

To be more clear:

My first field (field1) is a one2many field. Table product.template. My second field (field2) is on the table sale.order.line.

The goal of this manipulation is to have the field1 (the one2many) for each product of the sale.order.line. Need I to declare my field2 as a one2many too? or can in make the link to say: My field 2 is my field 1?

You think you can help me? How many times you need?

Thank you a lot.


Yes...Of-course I can help you at my level best.please feel free to contact me on my email-id: desale.navnath@gmail.com

David Warner
on 1/11/14, 4:57 AM

In your first question,You are getting this error due to missing dependency.Go to openerp.py file of sale module and in depends add purchase as an dependency.Restart your server and then try.You should not get above error.

David Warner
on 1/11/14, 5:21 AM

Can you please provide me your files so that I can work on it to help you at my level best?

David Warner
on 1/11/14, 5:28 AM

Thanks a lot. I will send you an email right now.

on 1/11/14, 5:34 AM
David Warner
On 1/10/14, 3:40 PM

Can you please elaborate your requirement so that it will be quite good to me to help you at my level best?

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

0 follower(s)


Asked: 1/10/14, 2:38 PM
Seen: 1159 times
Last updated: 3/16/15, 8:10 AM