Odoo Help


partner of opening entries

on 3/6/15, 3:08 AM 662 views


I'm using openerp 7.

When we use the wizard to generate opening entries for a fiscal year, it's normal that we have many different partners for lines in the same move, but what is abnormal is that the partner of the first line is used as a partner of the entire move.

The partner of the account move for the opening entries should be empty. Don't you agree with me?

I'd like to have your opinons before reporting a bug, and I'm not even sure if it's a bug because when you look at the method _check_same_partner() in account.py, it seems like it's intentional.

    # Look in the line_id and line_partial_ids to ensure the partner is the same or empty
    # on all lines. We allow that only for opening/closing period
    def _check_same_partner(self, cr, uid, ids, context=None):
        for reconcile in self.browse(cr, uid, ids, context=context):
            move_lines = []
            if not reconcile.opening_reconciliation:
                if reconcile.line_id:
                    first_partner = reconcile.line_id[0].partner_id.id
                    move_lines = reconcile.line_id
                elif reconcile.line_partial_ids:
                    first_partner = reconcile.line_partial_ids[0].partner_id.id
                    move_lines = reconcile.line_partial_ids
                if any([(line.account_id.type in ('receivable', 'payable') and line.partner_id.id != first_partner) for line in move_lines]):
                    return False
        return True

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.


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

1 follower(s)


Asked: 3/6/15, 3:08 AM
Seen: 662 times
Last updated: 3/16/15, 8:10 AM