Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to each product partial reconciliation in OpenERP(Odoo)

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 692
    Comment on it

    In OpenERP first, create custom module and than override the function in .py file in custom module  and pass this file to the file. Then get the correct line residual amount  and pass this line in account invoice. using this function product_residual and this function residual amount between all invoice.

    Using this function given below

    def product_residual(self, cr, uid, ids, context=None):
            self.residual = 0.0
            partial_reconciliations_done = []
            for line in self.sudo().move_id.line_id:
                if line.account_id.type not in ('receivable', 'payable'):
                if line.reconcile_partial_id and in partial_reconciliations_done:
                # Get the correct line residual amount
                if line.currency_id == self.currency_id:
                    line_amount = line.amount_residual_currency if line.currency_id else line.amount_residual
                    from_currency = line.company_id.currency_id.with_context(
                    line_amount = from_currency.compute(line.amount_residual, self.currency_id)
                # For partially reconciled lines, split the residual amount
                if line.reconcile_partial_id:
                    partial_reconciliation_invoices = set()
                    for pline in line.reconcile_partial_id.line_partial_ids:
                        if pline.invoice and self.type == pline.invoice.type:
                    line_amount = self.currency_id.round(line_amount / len(partial_reconciliation_invoices))
                self.residual += line_amount
            self.residual = max(self.residual, 0.0)


 0 Comment(s)

Sign In

Sign up using

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: