computed adress if if if if :)
This commit is contained in:
parent
a197f65db5
commit
561aa7a49d
@ -59,5 +59,11 @@ class Coworker(models.Model):
|
||||
@api.depends('street', 'contact_zip', 'city')
|
||||
def _compute_full_contact_adress(self):
|
||||
for coworker in self:
|
||||
if coworker.city:
|
||||
coworker.full_contact_adress = u'{}'.format(coworker.city)
|
||||
|
||||
if coworker.contact_zip and coworker.city:
|
||||
coworker.full_contact_adress = u'{} {}'.format(coworker.contact_zip, coworker.city)
|
||||
|
||||
if coworker.street and coworker.contact_zip and coworker.city:
|
||||
coworker.full_contact_adress = u'{} {} {}'.format(coworker.street, coworker.contact_zip, coworker.city)
|
||||
|
Loading…
Reference in New Issue
Block a user