← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 559747] Re: [account_voucher] Checking the amount for Openning Balance shows information not useful.

 

** Changed in: openobject-addons
     Assignee: (unassigned) => JMA(Open ERP) (jma-openerp)

-- 
[account_voucher] Checking the amount for Openning Balance shows information not useful.
https://bugs.launchpad.net/bugs/559747
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to OpenERP OpenObject.

Status in OpenObject Addons Modules: New

Bug description:
Hello.

When you try with account_voucher installed to put the value "Opening Balance" for an account with moves lines related the message shown not useful, because is called from the method _check_move  defined on account module, the message shown is:

"Wrong credit or debit value in accounting entry !"

The Correct mesage should be:

"You cannot load or change by this method the opening balance amount for an account with move lines. Please try editing the opening move."

To do that we need to implement a new method called _check_moves_lines to avoid overwrite the original one method mentioned before, because this is right for its function.

The new method implements one aditional check:

In account:
        if line_obj.search(cr, uid, [('account_id', 'in', account_ids)]):

The correct one should be:
        if line_obj.search(cr, uid, [('account_id', 'in', account_ids),('move_id.journal_id.type','<>','situation')]):


We post a branch for merge.

To proof the concept a branch was proposed for merge:

revno base is: 2697