Skip to content Skip to sidebar Skip to footer

How To Call A Method In Odoo 7?

I've created a method and I was using field function to call the method. But, the method never executes. here is my code : def _get_data_from_puchase_order(self, cr, ids, field, ar

Solution 1:

This help,

ids : list of id of your object,

def_get_data_from_puchase_order(self,cr,uid,ids,name, args, context=None) :
        print"SUCCESS"print":::::::::::::::::"
        result = {}
        for row in ids:
            result[row] = "test"return result 

_columns = {
        'data_purchase_product': fields.function(_get_data_from_puchase_order, string='origin', method = True, type='integer'),
    }

Post a Comment for "How To Call A Method In Odoo 7?"