base_data_model: add address_label composition

This commit is contained in:
David Kilias 2020-03-14 15:12:41 +01:00
parent 028b4b1c72
commit 520edd22aa

View file

@ -29,6 +29,10 @@ class base_data_model():
def get_form_values_dict(self):
base_data = dict(zip(self.forms.keys(), map(lambda f: f.value, self.forms.values())))
base_data['address_label'] = \
f"{base_data['fullname']}\n\
{base_data['address_street']}\n\
{base_data['address_code']} {base_data['address_locality']}"
base_data['address_region'] = ''
return base_data