Odoo Help

1

OpenERP fields.function() explanation [Closed]

By
priyankahdp
on 4/24/13, 4:49 AM 26,244 views

The Question has been closed

by
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

5

Sudhir Arya (SA)

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

Working as an OpenERP/Odoo developer and a Team Leader 

Top 5 Odoo contributor On Stackoverflow

LinkedIn

Blog

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 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.

Register

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)

Stats

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