act_window "view" parameter prohibits display of data

Bug #428006 reported by Ferdinand

This bug report was converted into a question: question #83106: act_window "view" parameter prohibits display of data.

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

Trying to add one of these 3 to the delivery module

without the "view" line the correct picking is displayed, but not with the correct view

<!-- FIXME these 3 do call the correct form, but do not call the data content sale_id
        <act_window
            domain="[('sale_id', '=', active_id),('type','=','out')]"
            context="{'contact_display': 'partner'}"
            view="stock.view_picking_out_form"
            id="act_sale_order_2_stock_picking_carrier 0"
            name="test Outgoing Products carrier 0"
            res_model="stock.picking"
            src_model="sale.order"/>
        <act_window
            domain="[('sale_id', '=', active_id),('type','=','out')]"
            context="{'contact_display': 'partner'}"
            view="view_picking_withcarrier_out_form"
            id="act_sale_order_2_stock_picking_carrier"
            name="test Outgoing Products carrier 1"
            res_model="stock.picking"
            src_model="sale.order"/>
        <act_window
            domain="[('sale_id', '=', active_id),('type','=','out')]"
            context="{'contact_display': 'partner'}"
            view="stock.view_picking_out_form"
            id="act_sale_order_2_stock_picking_carrier2"
            name="test Outgoing Products carrier 2"
            res_model="stock.picking"
            src_model="sale.order"/>

Revision history for this message
Mantavya Gajjar (Open ERP) (mga) wrote :

Hello,

It Seems that you want to display the Form view instead of the List view for the target mode.

yes before that in above code there is a problem view="view_picking_withcarrier_out_form" => view="delivery.view_picking_withcarrier_out_form" the view `view_picking_withcarrier_out_form` is defined in the delivery module with out that it will not allow to run server perfectly.

if you open a form view by default openerp will open in new record mode.

please check the code for `My Current Timesheet` you have to do something similar to that.

first create a wizard that will open the form with record, this is only the way to open the link in form view with data.

also here this is not a bug, so i am convert this in to a question [https://bugs.launchpad.net/openobject-server/+bug/428006] instead of bug.

thanks

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

thanks for pointing out

delivery.view_picking_withcarrier_out_form was not not necessary because I was adding the code mentioned in the delivery module hence view_picking_withcarrier_out_form was available.

So I added to ./addons/purchase/stock_view.xml

        <act_window
            domain="[('purchase_id', '=', active_id),('type','=','in')]"
            view="stock.view_picking_in_tree"
            id="act_purchase_order_2_stock_picking"
            name="Incoming Products PO"
            res_model="stock.picking"
            src_model="purchase.order"/>

which opens the correct tree view with the as the menu "Stock/Incoming Products"
./addons/stock/stock_view.xml

        <record id="action_picking_tree4" model="ir.actions.act_window">
            <field name="name">Incoming Products</field>
            <field name="res_model">stock.picking</field>
            <field name="type">ir.actions.act_window</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form,calendar</field>
            <field name="domain">[('type','=','in')]</field>
        </record>
        <record id="action_invoice_tree5_view1" model="ir.actions.act_window.view">
            <field eval="1" name="sequence"/>
            <field name="view_mode">tree</field>
            <field name="view_id" ref="view_picking_in_tree"/>
            <field name="act_window_id" ref="action_picking_tree4"/>

BUT "Incoming Products" from Menu opens "view_picking_in_form" while "Incoming Products PO" (see above) opens an "out" form
which IMHO is not correct

the form should be "view_picking_in_form" because it's defined in the same
 <record id="action_picking_tree4" model="ir.actions.act_window">

it's definitevely an enhancement but seems logical to me

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

Other bug subscribers

Related questions

Remote bug watches

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