From 41ab8e990e5dbc2fa806418bdd28b3b2e34d07a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Wed, 5 Oct 2016 22:46:20 +0200 Subject: [PATCH] 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 --- party.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/party.py b/party.py index 27e9c5ff6e..a3d5a417b0 100644 --- a/party.py +++ b/party.py @@ -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():