switching from tree to form always takes the lowest priority

Bug #566318 reported by Ferdinand
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Status tracked in Trunk
5.0
Won't Fix
Undecided
Unassigned
Trunk
Confirmed
Wishlist
OpenERP's Framework R&D

Bug Description

IMHO if such a code is given the form with the id chricar_stock_care_act1_view1 and the view chricar_stock_care_form (priority=50) has to be taken
currently the standard stock picking form is used (priority 16)

    <record model="ir.actions.act_window" id="chricar_stock_care_act1">
      <field name="name">Stock Care</field>
      <field name="res_model">stock.picking</field>
      <field name="view_type">form</field>
      <field name="view_mode">tree,form</field>
      <field name="view_id" ref="chricar_stock_care_list"/>
      <field name="domain">[('type','=','production')]</field>
    </record>
    <record model="ir.actions.act_window.view" id="chricar_stock_care_act1_view2">
      <field name="sequence" eval="1"/>
      <field name="view_mode">tree</field>
      <field name="view_id" ref="chricar_stock_care_list"/>
      <field name="act_window_id" ref="chricar_stock_care_act1"/>
    </record>
    <record model="ir.actions.act_window.view" id="chricar_stock_care_act1_view1">
      <field name="sequence" eval="2"/>
      <field name="view_mode">form</field>
      <field name="view_id" ref="chricar_stock_care_form"/>
      <field name="act_window_id" ref="chricar_stock_care_act1"/>
    </record>

Revision history for this message
Ferdinand (office-chricar) wrote :

It looks like that the views must have the same priority , only than the view name is checked and the correct one is taken.

quote: (imho does not wokr as decribed)
view_id is the name of the view to display when the action is activated. If this field is not defined, the view of a kind (list or form) associated to the object res_model with the highest priority field is used (if two views have the same priority, the first defined view of a kind is used).

Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

on which version did you noticed this ? I don't think we have this in OpenERP, because Supplier & Customers invoices (which have different form views and open in list views) are correct.

Changed in openobject-server:
status: New → Incomplete
Revision history for this message
Ferdinand (office-chricar) wrote :

I noticed it in V5

Sometimes I have the impression that it's more the sequence of loading modules than the priority which is used to determin which form is to be used

this is (was) specially true form o2m widgets where it was not possible to specify tree and form view ids.

Changed in openobject-server:
status: Incomplete → Triaged
Changed in openobject-server:
assignee: nobody → Jay (OpenERP) (jvo-openerp)
Revision history for this message
DBR (OpenERP) (dbr-openerp) wrote :

Hello,

As far as the 'ir.actions.act_window.view' is concerned, they work correctly with relevant act_window on both the versions.

Proper priority is considered for action-bound list and form view here.

But, for O2M, either internal view has to be specified or the highest priority view will taken into consideration.

Let me know if something has been misunderstood.

I would like to set the bug 'wont fix' for stable as its not at all a blocking point, but keeping it as a 'wishlist' for future releases.

Thanks for reporting!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.