Odoo Help


OpenERP fields.function() explanation [Closed]

on 4/24/13, 4:49 AM 27,749 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)
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 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

2 follower(s)


Asked: 4/24/13, 4:49 AM
Seen: 27749 times
Last updated: 10/23/16, 4:21 AM