Ravi Gohil (OpenERP) has proposed merging
lp:~openerp-dev/openobject-client/6.1-opw-575612-rgo into
lp:openobject-client/6.1.
Requested reviews:
Naresh(OpenERP) (nch-openerp)
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-client/6.1-opw-575612-rgo/+merge/109359
Hello,
Steps to reproduce this issue:
1 - create a account_move entry manually.
2 - confirm and then set to draft by cancel button (need account_cancel)
enabled.
3 - you can see that all the fields have remained as read-only.
if you come out of the form view and enter it again, it will work as it should
again.
This fix fixes this issue, kindly review it.
Thanks.
--
https://code.launchpad.net/~openerp-dev/openobject-client/6.1-opw-575612-rgo/+merge/109359
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-client/6.1-opw-575612-rgo.
=== modified file 'bin/widget/model/field.py'
--- bin/widget/model/field.py 2011-12-09 09:33:16 +0000
+++ bin/widget/model/field.py 2012-06-08 13:21:19 +0000
@@ -159,15 +159,13 @@
ro = model.mgroup._readonly
state_changes = dict(self.attrs.get('states',{}).get(state,[]))
if 'readonly' in state_changes:
- self.get_state_attrs(model)['readonly'] = state_changes.get('readonly', False)
+ self.get_state_attrs(model)['readonly'] = state_changes.get('readonly', False) or ro
else:
- if self.attrs.get('readonly', False) or ro:
- self.get_state_attrs(model)['readonly'] = True
+ self.get_state_attrs(model)['readonly'] = self.attrs.get('readonly', False) or ro
if 'required' in state_changes:
self.get_state_attrs(model)['required'] = state_changes.get('required', False)
else:
- if self.attrs.get('required', False):
- self.get_state_attrs(model)['required'] = self.attrs['required']
+ self.get_state_attrs(model)['required'] = self.attrs.get('required', False)
if 'value' in state_changes:
self.set(model, state_changes['value'], modified=True)
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp