Odoo Help


Openerp 7: field.function

on 1/30/14, 2:19 AM 1,036 views

I have a function field

's_no':fields.function(_get_no,string='Serial No',type='integer', multi="lineno"),

 def _get_line_no(self, cr, uid, ids, line_no,  arg, context=None):
    res = {}
     no =0
    for record in self.browse(cr, uid, ids, context=context):      
            's_no': no,
    return res

so 's_no' it would be

 PO0001      PO0002    PO0003  
  s_no     s_no     s_no
  1          1        1
  2          2        2
  3                   3

I want to assign this field value into another field and it must be a Database column

's_line_no':fields.integer('serial Line No', store=True),   
 s_line_no  = s_no

s_no    s_line_no (database)
 1       1
 2       2
 3       3

Any advice will be helpful.

Why don't you add store=True to your function?

GH Mediacloud, Grover Menacho
on 1/30/14, 5:04 PM

If i used store=true i cant get the output structure as i expected.

on 1/30/14, 11:51 PM

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

0 follower(s)


Asked: 1/30/14, 2:19 AM
Seen: 1036 times
Last updated: 3/16/15, 8:10 AM