Odoo Help


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

Abegail Sanchez
on 10/29/14, 9:29 PM 964 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

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.


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

1 follower(s)


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