Community mailing list archives

community@mail.odoo.com

Re: related field in odoo v8

by
Dharmrajsinh Jahla (dja)
- 09/05/2014 05:25:15

You can do something like :

company_id = fields.Many2one('res.company', related='invoice_id.company_id', string='xyz', ...)

On Friday 05 September 2014 02:39 PM, abhishek jaiswal wrote:
<blockquote cite="mid:CAKyY-owE3qdUHGua0Fw7FkX8SkyRtOC7nc2F7PkzzmrZznnUjA@mail.gmail.com" type="cite">
how can i use fields.related in Odoo V8

i am perting a module and i got stucked with field.related

hoe to change this
'company_id': fields.related('invoice_id','company_id',type='many2one',relation='res.company',string='Company', store=True, readonly=True),

into new api
--
With Warm Regards
Abhishek Jaiswal

_______________________________________________
Mailing-List: https://www.odoo.com/groups/community-59
Post to: mailto:community@mail.odoo.com
Unsubscribe: https://www.odoo.com/groups?unsubscribe


--
Dharmraj Jhala,
(Jr.Application Engineer)
Odoo(OpenERP)