Skip to content
Snippets Groups Projects
Commit b0f46a58 authored by Benjamin - Le Filament's avatar Benjamin - Le Filament
Browse files

[IMP] add function get_formatted_address

parent 42eb97ad
Branches
No related tags found
No related merge requests found
...@@ -1520,6 +1520,15 @@ class ScopPartner(models.Model): ...@@ -1520,6 +1520,15 @@ class ScopPartner(models.Model):
"context": ctx, "context": ctx,
} }
# ------------------------------------------------------
# Business Methods
# ------------------------------------------------------
def get_formatted_address(self):
self.ensure_one()
address_fields = [self.street, self.street2, self.street3]
address = [f for f in address_fields if f]
return "\n".join(address) if address else ""
# ------------------------------------------------------ # ------------------------------------------------------
# CRON function # CRON function
# ------------------------------------------------------ # ------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment