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

How to make a function to a button in custom module

By
arsalan
on 7/2/13, 2:46 AM 1,435 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

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)

Stats

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