Review: Needs Fixing
Hello yogesh,
Indeed the improvements seems good... but it would be nice if we check for the
M2O part too
to get rid of that ugly message "Invalid value for reference field "ref" (last
part must be a non-zero integer):" by doing the test like
--- bin/widget/model/field.py 2011-04-20 09:34:21 +0000
+++ bin/widget/model/field.py 2011-06-01 06:59:30 +0000
@@ -501,7 +501,8 @@
val = model.value[self.name]
if not isinstance(val, (tuple, list)):
val = eval(val)
- return '%s,%d' % (val[0], val[1][0])
+ if val and val[0] and val[1][0]:
+ return '%s,%d' % (val[0], val[1][0])
return False
def set_client(self, model, value, test_state=False, force_change=False):
Thanks,
--
https://code.launchpad.net/~openerp-dev/openobject-client/trunk-bug-715763-ysa/+merge/62651
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-client/trunk-bug-715763-ysa.
_______________________________________________
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