env = env # noqa co = env['res.company'].search([], limit=1) p = co.partner_id print('company:', co.name) print(' partner_id:', p.id, p.name) print(' street:', repr(p.street)) print(' street2:', repr(p.street2)) print(' city:', repr(p.city), 'zip:', repr(p.zip)) print(' state:', p.state_id.name if p.state_id else None) print(' country:', p.country_id.name if p.country_id else None) print(' phone:', repr(p.phone), 'email:', repr(p.email)) print() # Also check if delivery has a source_facility_id with address dlv = env['fusion.plating.delivery'].search([], order='id desc', limit=1) if dlv.source_facility_id: f = dlv.source_facility_id print('facility:', f.name) print(' address:', getattr(f, 'address', None) or getattr(f, 'street', None) or '(no address field)') print(' fields:', [k for k in f._fields if 'addr' in k or 'street' in k or 'city' in k])