24
24
cr.execute('select country_id from res_partner_address where partner_id=%d', (partner_id,))
25
25
country_id = cr.fetchone()[0]
26
26
cr.execute('select name from res_country where id=%d', (country_id,))
27
29
country_name = cr.fetchone()[0]
29
31
Of course you can do better if you develop smartly in SQL, using joins or subqueries. But you have to be smart and most of the time you will not be able to make such improvements: