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.

0

context 'tree_view_ref' still working in v7

By
Nicolas Clavier
on 3/26/13, 2:10 PM 2,358 views

Hi all,

Is the following trick to force a view for a field still available in v7 ?

<field name="my_many2many" context="{'tree_view_ref' : 'my_module.my_model_tree_view'}" />

I used it on a many2many field , but it doesn't seem to have any effect .. (nor openerp complains about it)

cheers

Hy, didi you succeed in making this work even with the answer below? Regards

Mind & Go, Mind And Go
on 9/5/13, 4:57 AM

I did indeed. Works as expected.

Nicolas Clavier
on 9/6/13, 10:35 AM
0
harsh jain
On 3/25/15, 10:23 AM


<field name="my_many2many" context="{'tree_view_ref' : 'my_module.my_model_tree_view'}" />

but where you define the view 'my_model_tree_view' ..make priority same as the default view for the many2many or many2one model <field eval="7" name="priority"/>

0

Andreas Brueckl

--Andreas Brueckl--
5056
| 7 8 7
Vienna, Austria
--Andreas Brueckl--
OpenERP Consulting and Development
Andreas Brueckl
On 3/26/13, 2:19 PM

It should work for at least one2many fields since it is also used in the stock.picking object in file stock/stock_view.xml:

<field name="move_lines" context="{'address_in_id': partner_id, 'form_view_ref':'view_move_picking_form', 'tree_view_ref':'view_move_picking_tree', 'picking_type': 'internal'}"/>

You can try to remove the my_module. before the name for the view.

0
Mind And Go
On 5/15/14, 3:21 AM

Some little tips :

  1. Did you check which view is called from the action?
  2. Maybe the form view called is not the correct one (check priority)
  3. In the web UI, update your module

Hope it can help

 

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

2 follower(s)

Stats

Asked: 3/26/13, 2:10 PM
Seen: 2358 times
Last updated: 3/25/15, 10:23 AM