Use fields.depends decorator
issue3487 review2301002
This commit is contained in:
+4
-3
@@ -12,10 +12,11 @@ __metaclass__ = PoolMeta
|
||||
class Address:
|
||||
__name__ = 'party.address'
|
||||
|
||||
google_maps_url = fields.Function(fields.Char('Google Maps',
|
||||
on_change_with=['street', 'streetbis', 'zip', 'city', 'country',
|
||||
'subdivision']), 'on_change_with_google_maps_url')
|
||||
google_maps_url = fields.Function(fields.Char('Google Maps'),
|
||||
'on_change_with_google_maps_url')
|
||||
|
||||
@fields.depends('street', 'streetbis', 'zip', 'city', 'country',
|
||||
'subdivision')
|
||||
def on_change_with_google_maps_url(self, name=None):
|
||||
lang = Transaction().language[:2]
|
||||
url = ''
|
||||
|
||||
Reference in New Issue
Block a user