M4rtine / cgstudiomap

old version of CG Studio Map - based on odoo
http://www.cgstudiomap.org
GNU Affero General Public License v3.0
3 stars 2 forks source link

error city NoneType #145

Closed foutoucour closed 9 years ago

foutoucour commented 9 years ago
2015-06-17 02:26:48,723 16691 INFO cgstudiomap openerp.addons.res_partner_missing_details.models.res_partner: Checking for missing details: ABT Istanbul 
2015-06-17 02:26:48,724 16691 INFO cgstudiomap requests.packages.urllib3.connectionpool: Starting new HTTPS connection (1): maps.google.com
2015-06-17 02:26:48,919 16691 ERROR cgstudiomap openerp.addons.base.ir.ir_cron: Call of self.pool.get('res.partner').set_missing_details_bot(cr, uid, *()) failed in Job 12
Traceback (most recent call last):
  File "/home/cgstudiomap/project/cgstudiomap/main/parts/odoo/openerp/addons/base/ir/ir_cron.py", line 138, in _callback
    getattr(model, method_name)(cr, uid, *args)
  File "/home/cgstudiomap/project/cgstudiomap/main/parts/odoo/openerp/api.py", line 241, in wrapper
    return old_api(self, *args, **kwargs)
  File "/home/cgstudiomap/project/cgstudiomap/main/parts/odoo/openerp/api.py", line 336, in old_api
    result = method(recs, *args, **kwargs)
  File "/home/cgstudiomap/project/cgstudiomap/main/local_modules/res_partner_missing_details/models/res_partner.py", line 93, in set_missing_details_bot
    details = partner.set_missing_details()
  File "/home/cgstudiomap/project/cgstudiomap/main/parts/odoo/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/home/cgstudiomap/project/cgstudiomap/main/local_modules/res_partner_missing_details/models/res_partner.py", line 63, in set_missing_details
    missing_details = self.get_missing_details()
  File "/home/cgstudiomap/project/cgstudiomap/main/parts/odoo/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/home/cgstudiomap/project/cgstudiomap/main/local_modules/res_partner_phone_missing_details/models/res_partner.py", line 34, in get_missing_details
    missing_details = super(ResPartner, self).get_missing_details()
  File "/home/cgstudiomap/project/cgstudiomap/main/parts/odoo/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/home/cgstudiomap/project/cgstudiomap/main/local_modules/res_partner_url_validation_missing_details/models/res_partner.py", line 35, in get_missing_details
    missing_details = super(ResPartner, self).get_missing_details()
  File "/home/cgstudiomap/project/cgstudiomap/main/parts/odoo/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/home/cgstudiomap/project/cgstudiomap/main/local_modules/res_partner_location_validation_missing_details/models/res_partner.py", line 44, in get_missing_details
    self._clean_location_data(vals)
  File "/home/cgstudiomap/project/cgstudiomap/main/parts/odoo/openerp/api.py", line 239, in wrapper
    return new_api(self, *args, **kwargs)
  File "/home/cgstudiomap/project/cgstudiomap/main/local_modules/res_partner_location_validation/models/res_partner.py", line 204, in _clean_location_data
    vals['city'] = city.encode(__codec__)
AttributeError: 'NoneType' object has no attribute 'encode'
foutoucour commented 9 years ago

test for the bug

2015-06-21 19:46:52,761 4351 INFO test openerp.addons.res_partner_location_validation.tests.test_res_partner: ` https://github.com/cgstudiomap/cgstudiomap/issues/145
2015-06-21 19:46:52,764 4351 INFO test requests.packages.urllib3.connectionpool: Starting new HTTPS connection (1): maps.google.com
2015-06-21 19:46:52,956 4351 INFO test openerp.addons.res_partner_location_validation.tests.test_res_partner: test_build_geocode_return_geocode_instance (openerp.addons.res_partner_location_validation.tests.test_res_partner.TestResPartner)