Useful Api in OpenERP/Odoo 9 Python

@api.multi
def multi_fct(self):
    i = 0
    for record in self:
        i += record.value
    return i

@api.depends('qty')
def multi_fct(self):
    i = 0
    for record in self:
        i += record.value * record.qty
    return i

How useful was this post?

Average rating / 5. Vote count:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.