Odoo Help

Welcome!

This community 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.

0

what is the meaning of the function _amount_residual in account.invoice?Thanks in advance

By
Alcaline
on 2/19/15, 8:30 PM 535 views

def _amount_residual(self, cr, uid, ids, name, args, context=None):
        result = {}
        for invoice in self.browse(cr, uid, ids, context=context):
            result[invoice.id] = 0.0
            if invoice.move_id:
                for m in invoice.move_id.line_id:
                    if m.account_id.type in ('receivable','payable'):
                        result[invoice.id] += m.amount_residual_currency
            #prevent the residual amount on the invoice to be less than 0
            result[invoice.id] = max(result[invoice.id], 0.0)            
        return result

0
Jordan Vrtanoski
On 2/20/15, 2:56 AM

This is the amount that is left unpaid after all payments ware reconciled with the invoice. With other words, the customer needs to pay this remaining amount of mony so we can close the invoice.

Hi Jordan, If this is the amount that is left unpaid why is my balance gets doubled after validation?

Alcaline
on 2/20/15, 3:04 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/19/15, 8:30 PM
Seen: 535 times
Last updated: 3/16/15, 8:10 AM