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

partner of opening entries

By
Wided
on 3/6/15, 3:08 AM 351 views

Hello,

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

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: 3/6/15, 3:08 AM
Seen: 351 times
Last updated: 3/16/15, 8:10 AM