[FIX] Base_setup : Country passed in values only if filled

lp bug: https://launchpad.net/bugs/416296 fixed

bzr revid: jvo@tinyerp.com-20090820103909-2a0ezid3v3z87eek
This commit is contained in:
Jay (Open ERP) 2009-08-20 16:09:09 +05:30
parent 57edd831b3
commit 80824824fb
1 changed files with 4 additions and 2 deletions

View File

@ -188,10 +188,12 @@ class wizard_base_setup(wizard.interface):
'city': form['city'],
'email': form['email'],
'phone': form['phone'],
'country_id': form['country_id'],
}
# we can do this, or set res.append((False, '')) in _get_all()
if form['country_id'] > 0:
values['country_id'] = form['country_id']
if form['state_id'] > 0:
values['state_id']=form['state_id']
values['state_id'] = form['state_id']
if company.partner_id.address:
address=company.partner_id.address[0]
address_obj.write(cr, uid, [address.id], values)