If you want to make loops and special fields in OpenERP use below code -
def get_totals(self, cr, uid, ids):
countries = {}
for sale in self.browse(cr, uid, ids):
country = sale.partner_invoice_id.country
countries.setdefault(country, 0.0)
countries[country] += sale.amount_untaxed
return countries
def print_totals(self, cr, uid, ids):
result = self.get_totals(cr, uid, ids)
for country in result.keys():
print
0 Comment(s)