Please review this at http://codereview.appspot.com/3324042/
Affected files:
M trytond/model/modelsingleton.py
Index: trytond/model/modelsingleton.py
===================================================================
--- a/trytond/model/modelsingleton.py
+++ b/trytond/model/modelsingleton.py
@@ -29,6 +29,12 @@
singleton_id = self.get_singleton_id()
if not singleton_id:
res = self.default_get(fields_names, with_rec_name=False)
+ if not fields_names:
+ fields_names = (list(set(self._columns.keys()
+ + self._inherit_fields.keys())))
+ for field_name in fields_names:
+ if field_name not in res:
+ res[field_name] = False
if not isinstance(ids, (int, long)):
res['id'] = ids[0]
res = [res]
--
Cédric Krier
B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/
pgpMzqgndh6of.pgp
Description: PGP signature
