In model sale order line I add a field "image_ref", I'd like to pass the value of this field to an icon in the sale order line view. So every time it change the product. change the icon.
I know that I can do this using fields_view_get(), but I don't know exactly how it works, I understand that everything does the py and the view is not modified.
I'm beginning with this.
def fields_view_get(self, cr, uid, view_id=None, view_type='tree', context=None, toolbar=False,submenu=False): result = super(sale_order_line, self).fields_view_get(cr, uid, view_id, view_type, context, toolbar,submenu) active_id = context.get('active_id', False) res['fields'][field]['icon'] = image_desc
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
|Asked: 5/29/13, 6:33 PM|
|Seen: 1089 times|
|Last updated: 3/16/15, 8:10 AM|