I checked with revision 2973 of openerp-server/trunk, and it's fixed.
Thank you.

However, I also checked with revision 2146 of openerp-server/5.0, and it
has the problem I described here in comment #4. The behaviour described
in this bug stops happening, but now it doesn't work properly when I do
make changes to a partner contact. If I make changes to a partner
contact, move to the next contact, and then move back, the changes are
gone. I would argue that this is worse than the original bug, because
you can lose changes.

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

Status in OpenObject GTK Client: 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