Odoo Help

Welcome!

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.

1

OpenERP fields.function() explanation [Closed]

By
priyankahdp
on 4/24/13, 4:49 AM 22,605 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)--
10150
| 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 community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

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