one2many list on_change fired before remove

Bug #785062 reported by Marian Negru
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Fix Released
Low
OpenERP sa GTK client R&D

Bug Description

The problem is that the event is signaled before removing the item and the on_change method receives the deleted item in the list. The code is:

model.signal('record-changed', model.parent)
self.screen.remove()

and it should be:

self.screen.remove()
model.signal('record-changed', model.parent)

in method _sig_remove from widget\view\form_gtk\one2many_list.py file

Related branches

Changed in openobject-client:
assignee: nobody → OpenERP sa GTK client R&D (openerp-dev-gtk)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Ravi Gadhia (OpenERP) (rga-openerp) wrote :

Hello Marian Negru,
           Would you please provide us your test case where you face problem.

Thanks

Revision history for this message
Marian Negru (marian-negru) wrote : RE: [Bug 785062] Re: one2many list on_change fired before remove

Hi,

The problem appears when you have a one2many field (with one2many list widget) and you set up the on_change event.
Then try to remove an item from list and see that the event is fired and the field has the item that was removed in the list.

Best regards,
Marian

-----Original Message-----
From: <email address hidden> [mailto:<email address hidden>] On Behalf Of Ravi Gadhia (OpenERP)
Sent: Thursday, July 28, 2011 3:00 PM
To: <email address hidden>
Subject: [Bug 785062] Re: one2many list on_change fired before remove

Hello Marian Negru,
           Would you please provide us your test case where you face problem.

Thanks

--
You received this bug notification because you are subscribed to the bug report.
https://bugs.launchpad.net/bugs/785062

Title:
  one2many list on_change fired before remove

Status in OpenERP GTK Client:
  Confirmed

Bug description:
  The problem is that the event is signaled before removing the item and
  the on_change method receives the deleted item in the list. The code
  is:

  model.signal('record-changed', model.parent)
  self.screen.remove()

  and it should be:

  self.screen.remove()
  model.signal('record-changed', model.parent)

  in method _sig_remove from widget\view\form_gtk\one2many_list.py file

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-client/+bug/785062/+subscriptions

Revision history for this message
Ravi Gadhia (OpenERP) (rga-openerp) wrote :

Hello Marian Negru,
         It has been fixed in lp:~openerp-dev/openobject-client/trunk-bug-785062-rga and it will merge soon with trunk client thanks for reporting......

Changed in openobject-client:
status: Confirmed → Fix Committed
Revision history for this message
VO (ovailly) wrote :

Bonjour,

je suis en congés jusqu'au mardi 16 août 2011.

Pour une urgence veuillez adresser votre demande sur les deux
boites Email suivantes :

<email address hidden>
<email address hidden>

Merci

Olivier vailly

Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

Hello,

Thanks for reporting !

The fix has been merged at trunk client with revision-info:1938 <email address hidden>

Thanks,

Changed in openobject-client:
status: Fix Committed → Fix Released
Revision history for this message
VO (ovailly) wrote :

Bonjour,

je suis en congés jusqu'au mardi 16 août 2011.

Pour une urgence veuillez adresser votre demande sur les deux
boites Email suivantes :

<email address hidden>
<email address hidden>

Merci

Olivier vailly

Revision history for this message
Robin (www.cgbs.com.au) (robin-cgbs) wrote :

Thank you for the fix.

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.