Odoo Help

0

OpenERP v7 : Sum of Values

By
Silviaa
on 1/25/14, 7:06 AM 778 views

May be it will be the basic question .
Below is my code:

def add_slab_info(self, cr, uid, ids, context={}):     
   sqty=2
 for qty in range(0,sqty):   
   area = (length) * (width)                                           
   Self.pool.get(object).create(cr, uid, {'product_id':value.product_id.id,
       'sno':no,'length':length,'width':width,'price':price,
       'area':area,
        })                
   self.pool.get('purchase.order.line').write(cr,uid,record_id,
        'product_qty':  sum(area),
        'product_field':product})

I want to get the sum of area in For loop. could anyone help me?

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)

Stats

Asked: 1/25/14, 7:06 AM
Seen: 778 times
Last updated: 3/16/15, 8:10 AM