Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def compute_shipping_address_name(self):
- for record in self:
- shipping_addresses = self.search([('parent_id', '=', record.id), ('type', '=', 'delivery')])
- child_lines = []
- for shipp in shipping_addresses:
- line = '{ship_name} {ship_street} {ship_state} {ship_zip}'.format(ship_name=shipp.name,
- ship_street=shipp.street,
- ship_state=shipp.state_id.name,
- ship_zip=shipp.zip)
- child_lines.append(line)
- record.shipping_address_name = '|'.join(child_lines)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement