It is currently Tue May 22, 2012 10:53 pm

All times are UTC + 2 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: specific field to display
PostPosted: Mon Apr 18, 2011 5:32 am 
Offline

Joined: Wed Feb 16, 2011 1:41 pm
Posts: 11
hello all
I really need help. I'm a newbie..
:) :)


"How to display a specific field only, for example i have this source...

Code:
class examplea(osv.osv):
    _name = "example.a"
    _columns = {
                "name": fields.char("name", size=20, required=True),
                "descA": fields.text("Description"),
                }
examplea()

class exampleb(osv.osv):
    _name = "example."
    _columns = {
                "name": fields.char("name", size=20, required=True),
                "descB": fields.text("Description"),
                }
exampleb()


my question is,
1. i want to display "name" on examplea and "descB" on exampleb together.
2. how to display "name" and "desca" on examplea and only "descB" on exampleb.
Any one can help me with it...
Thx
:mrgreen:


Top
 Profile  
 
 Post subject: Re: specific field to display
PostPosted: Mon Apr 18, 2011 12:26 pm 
Offline

Joined: Thu Sep 23, 2010 9:29 pm
Posts: 251
Location: Leeseringen, Germany
These two models are not linked in any way we can see in the example.

How would you know which name on example.a corresponds to which descB?

Using my crystal ball, I'd advice to lookup fields.related().
http://doc.openerp.com/v6.0/developer/2 ... _type.html

_________________
Light travels faster than sound.
That is why some people appear bright until you hear them speak.


Top
 Profile  
 
 Post subject: Re: specific field to display
PostPosted: Tue Apr 19, 2011 4:41 am 
Offline

Joined: Wed Feb 16, 2011 1:41 pm
Posts: 11
Sorry iam forget to post the relation
supposing i add a new class.

Code:
class examplec osv.osv):
    _name = "example.c"
    _columns = {
                "name": many2one("example.a", "name"),
                "descC": many2one("example.b", "Description"),
                }
examplec()



So i just want to dispaly name in example.a and description in example.b..
What should i do..?
Manipulate in xml or what.

Thx for Help
Best regards


Top
 Profile  
 
 Post subject: Re: specific field to display
PostPosted: Wed Apr 20, 2011 7:10 pm 
Offline

Joined: Wed Feb 16, 2011 1:41 pm
Posts: 11
I break it..
It work now..

Thx 4 help.
Thx to OpenERP.. :oops:
Love u a lot
:lol: :lol: :lol:


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC + 2 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:

Protected by Anti-Spam ACP