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.


How to manipulate the view.xml with specific id using fields_view_get?

Abegail Sanchez
on 10/29/14, 9:29 PM 654 views

This is the view I want to achieve:

I want that view_id product_location_view_tree only use that view, this view is working

but It affect all the tree view of the product_product model

def fields_view_get(self,cr,uid,view_id='product_location_view_tree',view_type='tree',context=None,toolbar=None,submenu=None):
        _moves_fields = res['fields']
        if res['type'] == 'tree':
            for key,value in self._format_columns(cr).items():
                _moves_fields.update({value : {'string':key,'type': 'float',},})
                _moves_arch_lst += """<field name='%s'/>"""%value    
            _moves_arch_lst += """</tree>"""
        return res

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

1 follower(s)


Asked: 10/29/14, 9:29 PM
Seen: 654 times
Last updated: 3/16/15, 8:10 AM