Wrong ID passed to the function corresponding to the button

Bug #1018508 reported by Alexis de Lattre
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Odoo Web (MOVED TO GITHUB)
Fix Committed
Undecided
OpenERP Publisher's Warranty Team

Bug Description

With an up-to-date server/6.1 (revno 4223) and openerp-web/6.1 (revno 2376) :

on the main form view of res_partner, I have added a button on the "res_partner_address" part of the view.
In the Web client, I open the form view of a partner that has several partner addresses (for example, I open a partner that has two partner addresses ID 10 and 11).

I have the first partner address displayed on the screen and I click on my button : the function corresponding to my button gets ids = 10 -> OK

Then, I move to the second partner address ; I click again on my button ; the function corresponding to my button gets ids = 10 -> that's the bug, I should get ID = 11 !

This bug is not present in the Gtk Client 6.1.

If you want to easily reproduce the problem :

1. install the "asterisk_click2dial" module from lp:openerp-asterisk-connector on an OpenERP 6.1 server.
If you look at asterisk_click2dial/res_partner_view.xml line 60, you will see that it adds "Dial" buttons on the first tab of the main partner form, which corresponds to the res_partner_address object. In asterisk_click2dial/asterisk_click2dial.py, add debug lines in the code to print the value of "ids" in the functions "action_dial_phone" line 425 and "action_dial_mobile" line 431 (these 2 functions are called by the "Dial" buttons).

2. Go to "Sales > Address book > Customers", open the partner "Tecsas" (it has 2 partner addresses).

3. For the first partner address "Laurent Jacot", click on the "Dial" button next to the "phone" field -> you should see that the function "action_dial_phone" is called with the right value as ids (ID = 4 for "Laurent Jacot" in my case)

4. Move to the second partner address "Loïc Dupont" and click on the "Dial" button next to the "phone" field -> the function "action_dial_phone" is still called with the value of the first partner address as "ids" !!! (in my case, it is called with ID = 4 corresponding to "Laurent Jacot", although it should be called with ID=18 corresponding to "Loïc Dupont")

5. Repeat step 2 to 4 with the Gtk client -> you will see that it works well, the bug is not present.

Tags: maintenance

Related branches

Changed in openerp-web:
assignee: nobody → OpenERP Publisher's Warranty Team (openerp-opw)
tags: added: maintenance
Changed in openerp-web:
status: New → Fix Committed
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.