Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to return value in new record to odoo

def computeremainingFeeds(self):
        for rec in self:
            if rec.feed_received_kg != 0:
                rec.remaining_feed_credit = rec.feed_received_kg - rec.feed_consumed_kg
            elif rec.remaining_feed_credit != 0:
                rec.remaining_feed_credit = rec.remaining_feed_credit - rec.feed_consumed_kg
        return remaining_feed_credit
      
 
PREVIOUS NEXT
Tagged: #return #record #odoo
ADD COMMENT
Topic
Name
1+1 =