** Also affects: openobject-client/5.0
   Importance: Undecided
       Status: New

** Also affects: openobject-client/trunk
   Importance: Undecided
     Assignee: Jay (OpenERP) (jvo-openerp)
       Status: New

** Changed in: openobject-client/trunk
       Status: New => Fix Released

** Changed in: openobject-client/5.0
       Status: New => Triaged

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/530307

Title:
  Showing next address marks partner as modified

Status in OpenObject GTK Client:
  Fix Released
Status in OpenObject GTK Client 5.0 series:
  Triaged
Status in OpenObject GTK Client trunk series:
  Fix Released

Bug description:
  Steps to reproduce:
1. Open a partner that has at least one address. In the sample data, use 
Agrolait.
2. Click the arrow icon to move to the next partner contact.
3. Close the Partners screen.

Expected behaviour: when I close the Partners screen, I have not made any 
changes, so it should just close.
Actual behaviour: it prompts me, "This record has been modified do you want to 
save it?"

Analysis:
The record is marked as modified when you move to the next contact. Put a break 
point in client/bin/widget/screen/screen.py line 584 in display_next(). From 
there, it calls record.validate_set(), record.reload(), record._reload(), and 
record.set(). In record.set(), it signals the 'record-changed' event. That 
fires some code at client/bin/widget/model/group.py line 254 in 
_record_changed(). That signals the 'model-changed' event, and that fires some 
code at /bin/widget/model/field.py line 343 in _model_changed(). And that is 
where the modified flag gets set.

My guess is that the reload() method somehow needs to determine whether or not 
the set() method should send the 'record-changed' event. Maybe it's as simple 
as adding a signal parameter with default value True, but I'm not sure.



_______________________________________________
Mailing list: https://launchpad.net/~c2c-oerpscenario
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~c2c-oerpscenario
More help   : https://help.launchpad.net/ListHelp

Reply via email to