Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • How to make loops and special fields in OpenERP/Odoo ?

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 261
    Comment on it

    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)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: