Odoo Help


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.


OpenERP fields.function() explanation [Closed]

on 4/24/13, 4:49 AM 21,422 views

The Question has been closed

Sudhir Arya (SA)
on 01/28/2014 10:25:29

I got this code from stock.py file and line number 163

'complete_name': fields.function(_complete_name, type='char', size=256, string="Location Name",
                    store={'stock.location': (_get_sublocations, ['name', 'location_id'], 10)}),

please give me a explanation about below store attribute in above field.

can we use fields.function( with type='many2one' ? if can please give me a reference sample code or sample model class in openerp 7


Sudhir Arya (SA)

--Sudhir Arya (SA)--
| 6 8 8
Ahmedabad, India
--Sudhir Arya (SA)--

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow




Sudhir Arya (SA)
On 4/24/13, 4:56 AM

You can get information about fields.function from here:

  1. Function Field.
  2. Function Field Description.

You can find many examples in addons.

Hope this will help you.

Is there any hint how to get the value of other fields inside the function fields ?

Mohamed Magdy
on 1/21/14, 9:41 AM

You already have ids in function field. So you can browse your current record and can get the value.

Sudhir Arya (SA)
on 1/22/14, 12:59 AM

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)


Asked: 4/24/13, 4:49 AM
Seen: 21422 times
Last updated: 10/13/15, 3:51 AM