Odoo Help


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.


a simple example of fields.function

on 9/16/13, 11:30 PM 1,878 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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)


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