Odoo Help


a simple example of fields.function

on 9/16/13, 11:30 PM 2,962 views

please I'm looking for a simple example of fields.function


def _current_total(self, cr, uid, ids, name, context=None, *args): res = {} for task in self.browse(cr, uid, ids,context): res[task.id] = {'amount': 0.0, 'completion' : 0.0, 'actual_amount' : 0.0,} task.actual_amount = task.completion * task.amount_vatin / 100 res[task.id] = {'actual_amount': task.actual_amount} return res

you can refer at: https://doc.openerp.com/v6.0/developer/2_5_Objects_Fields_Methods/field_type.html/#functional-fields

OpenERP Vietnam
on 9/18/13, 5:25 AM

Thank you :)

on 9/19/13, 6:09 AM

Your Welcome :D

Lady Sharmane Udtuhan
on 9/20/13, 4:50 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

0 follower(s)


Asked: 9/16/13, 11:30 PM
Seen: 2962 times
Last updated: 3/16/15, 8:10 AM