Odoo Help

1

How to make a function to a button in custom module

By
arsalan
on 7/2/13, 2:46 AM 1,648 views

Hi I have created a custom module in openerp v7. I am using win7 and eclipse IDE(Python) . I have added a button to my module to give it more features. But I dont know how to add a function to that button . I dont have any idea how to declare functions in openerp and call them ?

0
Farid Ghanchi
On 7/2/13, 3:27 AM
'my_field': fields.function(_get_myfield, method=True, string='Reference', type='char'),
def _get_myfield(self, cr, uid, ids, field_name, arg, context=None):
         #your logic declared here
    return result

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

0 follower(s)

Stats

Asked: 7/2/13, 2:46 AM
Seen: 1648 times
Last updated: 3/16/15, 8:10 AM