Odoo Help


OpenERP fields.function() explanation [Closed]

on 4/24/13, 4:49 AM 29,730 views

The Question has been closed

Sudhir Arya (ERP Harbor Consulting Services)
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 (ERP Harbor Consulting Services)

--Sudhir Arya (ERP Harbor Consulting Services)--
| 6 8 8
Ahmedabad, India
--Sudhir Arya (ERP Harbor Consulting Services)--

• Co-Founder & Co-Owner at ERP Harbor Consulting Services

• ERP Consultant / ERP Customization / TechnoFunctional Expert

• Sound knowledge in Python, Odoo (Open ERP), XML, PostgreSQL

• Domain knowledge of Sale Management, Purchase Management, Warehouse Management, Manufacturing, Multi Company Configuration & Management, HR Management, Medical Management, Construction Management, Education Management, Point of Sale, Third Party Integrations

• Positive attitude and quick Learner

• Good analytical skill, quick bug and issue tracing and find the solution

• Good knowledge and experience in payment gateway integration with Odoo

• Ready to accept new challenges

• Active Memeber On Stackoverflow 




Sudhir Arya
ERP Harbor Consulting Services
Sudhir Arya (ERP Harbor Consulting Services)
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 (ERP Harbor Consulting Services)
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: 29730 times
Last updated: 10/23/16, 4:21 AM