Use empty dictionary for default addresses

The client will anyway call default_get to get the default values but it will
do it only for the fields present in the view. This will prevent the client to
fetch the definition of the fields that were not in the view.

issue5919
review28851002
This commit is contained in:
Cédric Krier committed 2016-10-05 22:46:20 +02:00
1 parent 4b5975801c
commit 41ab8e990e
1 file changed
+1 -5
+1 -5
View File
@@ -117,11 +117,7 @@ class Party(ModelSQL, ModelView):
def default_addresses():
if Transaction().user == 0:
return []
Address = Pool().get('party.address')
fields_names = list(x for x in Address._fields.keys()
if x not in ('id', 'create_uid', 'create_date',
'write_uid', 'write_date'))
return [Address.default_get(fields_names)]
return [{}]
@staticmethod
def default_code_readonly():