Strange bug for account

Asked by forstera

Hello all,
Today, I tried to apply the latest patch to the account module for invoices in foreign currency but since there, when I'm trying to update the module, I get the following error :

This problem comes frome the old file 'account_assert_test.xml'

but no idea of that. Any help will be really appreciate Thanks very much.

No LSB modules are available.
[2010-05-01 00:57:58,491] ERROR:init:[01]:
[2010-05-01 00:57:58,491] ERROR:init:[02]: Environment Information :
[2010-05-01 00:57:58,491] ERROR:init:[03]: System : Linux-2.6.31-14-generic-pae-i686-with-Ubuntu-9.10-karmic
[2010-05-01 00:57:58,492] ERROR:init:[04]: OS Name : posix
[2010-05-01 00:57:58,492] ERROR:init:[05]: Distributor ID: Ubuntu
[2010-05-01 00:57:58,492] ERROR:init:[06]: Description: Ubuntu 9.10
[2010-05-01 00:57:58,492] ERROR:init:[07]: Release: 9.10
[2010-05-01 00:57:58,492] ERROR:init:[08]: Codename: karmic
[2010-05-01 00:57:58,492] ERROR:init:[09]: Operating System Release : 2.6.31-14-generic-pae
[2010-05-01 00:57:58,492] ERROR:init:[10]: Operating System Version : #48-Ubuntu SMP Fri Oct 16 15:22:42 UTC 2009
[2010-05-01 00:57:58,493] ERROR:init:[11]: Operating System Architecture : 32bit
[2010-05-01 00:57:58,493] ERROR:init:[12]: Operating System Locale : fr_CH.UTF8
[2010-05-01 00:57:58,493] ERROR:init:[13]: Python Version : 2.5.4
[2010-05-01 00:57:58,493] ERROR:init:[14]: OpenERP-Server Version : 5.0.9
[2010-05-01 00:57:58,493] ERROR:init:[15]: Last revision No. & ID :
[2010-05-01 00:57:58,493] ERROR:init:[16]: assertion "For all account moves, the state is valid implies that the sum of credits equals the sum of debits" failed!
[2010-05-01 00:57:58,493] ERROR:init:[17]: xmltag: <test expr="not len(line_id) or line_id[0].state != 'valid' or (sum([l.debit - l.credit for l in line_id]) &lt;= 0.00001)"/>
[2010-05-01 00:57:58,494] ERROR:init:[18]:
[2010-05-01 00:57:58,494] ERROR:init:[19]: expected value: True
[2010-05-01 00:57:58,494] ERROR:init:[20]: obtained value: False
sh: bzr: not found
No LSB modules are available.
[2010-05-01 00:57:58,620] ERROR:init:[01]:
[2010-05-01 00:57:58,621] ERROR:init:[02]: Environment Information :
[2010-05-01 00:57:58,621] ERROR:init:[03]: System : Linux-2.6.31-14-generic-pae-i686-with-Ubuntu-9.10-karmic
[2010-05-01 00:57:58,621] ERROR:init:[04]: OS Name : posix
[2010-05-01 00:57:58,622] ERROR:init:[05]: Distributor ID: Ubuntu
[2010-05-01 00:57:58,622] ERROR:init:[06]: Description: Ubuntu 9.10
[2010-05-01 00:57:58,622] ERROR:init:[07]: Release: 9.10
[2010-05-01 00:57:58,622] ERROR:init:[08]: Codename: karmic
[2010-05-01 00:57:58,622] ERROR:init:[09]: Operating System Release : 2.6.31-14-generic-pae
[2010-05-01 00:57:58,622] ERROR:init:[10]: Operating System Version : #48-Ubuntu SMP Fri Oct 16 15:22:42 UTC 2009
[2010-05-01 00:57:58,622] ERROR:init:[11]: Operating System Architecture : 32bit
[2010-05-01 00:57:58,623] ERROR:init:[12]: Operating System Locale : fr_CH.UTF8
[2010-05-01 00:57:58,623] ERROR:init:[13]: Python Version : 2.5.4
[2010-05-01 00:57:58,623] ERROR:init:[14]: OpenERP-Server Version : 5.0.9
[2010-05-01 00:57:58,623] ERROR:init:[15]: Last revision No. & ID :
[2010-05-01 00:57:58,623] ERROR:init:[16]: <assert model="account.move" search="[]" string="For all account moves, the state is valid implies that the sum of credits equals the sum of debits">
[2010-05-01 00:57:58,623] ERROR:init:[17]: <test expr="not len(line_id) or line_id[0].state != 'valid' or (sum([l.debit - l.credit for l in line_id]) &lt;= 0.00001)"/>
[2010-05-01 00:57:58,623] ERROR:init:[18]: </assert>

Question information

Language:
English Edit question
Status:
Answered
For:
Odoo Addons (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#1

Hello Arnaud,

Did you uncomment last assert statements in this file?

Thanks.

Revision history for this message
forstera (arnaud-forster-deactivatedaccount) said :
#2

Hello vra,

I thank you for the enquiry. I made nothing to the file, here it is :

<?xml version="1.0" encoding="utf-8"?>
<openerp>
    <data>
        <assert model="account.move" search="[]" string="For all account moves, the state is valid implies that the sum of credits equals the sum of debits">
            <test expr="not len(line_id) or line_id[0].state != 'valid' or (sum([l.debit - l.credit for l in line_id]) &lt;= 0.00001)"/>
        </assert>

   <!-- <assert model="account.account" search="[]" string="For all accounts, the balance is equal to the sum of the balance of its childs">
        <assert model="account.account" search="[]" string="For all accounts, the balance is equal to the sum of the balance of its childs">
            <test expr="not len(child_id) or (balance - sum([c.balance for c in child_id]) &lt;= 0.00001)"/>
        </assert>

        <assert model="account.move.line" search="[('account_id.type', '=', 'view')]" string="Accounts of view type do not contain any move line">
            <test expr="False"/>
        </assert>

        <assert model="account.invoice" search="[('state', 'in', ['paid', 'open'])]" string="The total amount of all paid or open invoices is correctly computed">
            <test expr="sum([l.price_subtotal for l in invoice_line]) - amount_untaxed &lt;= 0.00001"/>
        </assert>

        <assert model="account.move.reconcile" search="[]" string="For each reconciliation, the sum of credits equals the sum of debits">
            <test expr="sum([l.debit - l.credit for l in line_id]) &lt;= 0.00001"/>
        </assert>

-->
    </data>
</openerp>

Revision history for this message
Vinay Rana (OpenERP) (vra-openerp) said :
#3

Hello Arnaud,

Which patch did you apply for invoices in foreign currency?

If you are talking about following bug:
https://bugs.launchpad.net/openobject-addons/+bug/511104
Check the latest comment : #27.

I am working on this and i did not facing this type of error traceback.
Can you please provide the proper steps for reproduce this at my end?

Thanks.

Revision history for this message
forstera (arnaud-forster-deactivatedaccount) said :
#4

Oops, It's going to be diffucutl, because I'm following 2 bugs we have here : the #511104 ( Pay invoice wizard regression in foreign currency) and the #452854 (Cannot validate invoices with foreign currency ). And there was so many tries ... so, as fa as I remember, I applied the following patches :

Bug #511104 :

pay_wizard_currency_bizzarre.patch of post #16
patch_wiz_only.patch of post #18

for the #452854 :
validate_balanced_entry.patch of post #28
validate_entry.patch of post #52

I did not removed the modified lines but add a # in the beginning of the line, so I'll check the files to see what I applied..

Thanks.

Can you help with this problem?

Provide an answer of your own, or ask forstera for more information if necessary.

To post a message you must log in.