context dropped - active_id, active_ids,... all when its wizard

Bug #532635 reported by Shah Japan
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Web Client
Fix Released
Undecided
Sananaz (Open ERP)

Bug Description

when we open the wizard from GTK client it passes following to the context
{'lang': u'en_US', 'active_ids': [85], 'tz': False, 'active_id': 85}

but when the same wizard called from web client it passes only,
{'lang': u'en_US', 'tz': False, 'client': 'web'}

Related branches

Revision history for this message
Shah Japan (jsh.axelor) wrote :

It occours only if Wizard has multi=False,
so if Action on Multiple Doc. is True then only active_id is passed in context from web_client.

Changed in openobject-client-web:
status: New → Incomplete
status: Incomplete → Confirmed
Revision history for this message
Sananaz (Open ERP) (sma-tiny) wrote :

Hello,

Its fixed in stable. Please update your code and notify us.

Revision-info:
2834 <email address hidden>

Thanks.

Changed in openobject-client-web:
status: Confirmed → Fix Committed
Revision history for this message
Shah Japan (jsh.axelor) wrote :

GTK

TERP: wizard execute ('openerp', 1, 'admin', 3, {'model': 'res.partner', 'report_type': 'pdf', 'id': 21, 'form': {}, 'ids': [21]}, 'init', {'lang': 'fr_FR', 'active_ids': [84], 'tz': False, 'active_id': 84})

Web-Client

TERP: wizard execute ('openerp', 1, 'admin', 2, {'context': {'lang': u'fr_FR', 'active_ids': [7], 'tz': False, 'active_id': 7, 'client': 'web'}, 'form': {}, 'ids': [7], 'report_type': 'pdf', 'model': 'res.partner', 'id': 7}, 'init', {'lang': u'fr_FR', 'active_ids': [7], 'client': 'web', 'tz': False, 'active_id': 7})

still web-client has wrong value, 7 it should be 84.

Changed in openobject-client-web:
assignee: nobody → sma (Open ERP) (sma-tiny)
status: Fix Committed → Confirmed
Revision history for this message
Sananaz (Open ERP) (sma-tiny) wrote :

Hello,

Resolve this problem and fixed in stable. Please update your code and notify us.

Revision-info:
2836 <email address hidden>

Thanks.

Changed in openobject-client-web:
status: Confirmed → Fix Committed
Revision history for this message
Shah Japan (jsh.axelor) wrote :

Thanks sma (Open ERP),
It works perfect now.

Changed in openobject-client-web:
status: Fix Committed → Incomplete
Revision history for this message
Sam http://www.smile.fr (samir-rachedi) wrote :

Hi!!

when I try to transmit a list in active_ids through an ir.actions.act_window, by selecting the items from a tree view, only the first item is retrieved :
I try to transmit : active_ids = [47,48,49,50]
I retrieve active_ids=[47] in context.

P.S.: It works before doing bzr pull.

this is my code :

<record id="action_purchase_orders" model="ir.actions.act_window">
            <field name="name">Make purchase orders</field>
            <field name="type">ir.actions.act_window</field>
            <field name="res_model">purchase.order.creating.wizard</field>
            <field name="view_type">form</field>
            <field name="view_mode">form</field>
            <field name="context">{'active_sale_order_line_ids':active_ids}</field>
            <field name="target">new</field>
        </record>

Revision history for this message
Pereerro (pereerro) wrote :

Hi,
I receive the ir.ui.menu id of the list in a act_window action.
Surprisingly, in the call, the values are in context.
Here is the added work for me. I create two values more passing the original context.

In openerp/controllers/form.py , class Form def action
old:
        context.update(rpc.session.context.copy())
        context.update({'active_id': rpc.session.active_id, 'active_ids': [rpc.session.active_id]})

new:
        context.update({'active_id': rpc.session.active_id, 'web_active_id': context.get('active_id',False), 'web_active_ids': context.get('active_ids',False),'active_ids': [rpc.session.active_id]})

Revision history for this message
Sananaz (Open ERP) (sma-tiny) wrote :

Hello,

Its fixed in stable version. Please update your code.

Revision-info:
2919 <email address hidden>

Thanks.

Changed in openobject-client-web:
status: Incomplete → Fix Released
milestone: none → 5.0.13
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.