[6.0][account] REGRESSION: referenced account.bank.statement.reconcile doesn't exist

Bug #647011 reported by Raphaël Valyi - http://www.akretion.com
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
High
Mustufa Rangwala (Open ERP)

Bug Description

Hello,

in trunk revision #4989,
there are several references to the 'account.bank.statement.reconcile' object while it isn't defined anywhere.

An error example is when you create a new bank statement, then click on the "import invoice" button, then select some invoice and click OK, then you get that stack trace:

  File "/home/rvalyi/DEV/openerp/server/bin/osv/osv.py", line 140, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home/rvalyi/DEV/openerp/server/bin/osv/osv.py", line 130, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home/rvalyi/DEV/openerp/addons/account/wizard/account_statement_from_invoice.py", line 73, in populate_statement
    reconcile_id = statement_reconcile_obj.create(cr, uid, {
AttributeError: 'NoneType' object has no attribute 'create'

But actually there might be other place where such bugs would occur as a simple grep shows other occurrences:

rvalyi@rvalyi-laptop:~/DEV/openerp/addons$ grep -r "account\.bank\.statement\.reconcile" . | grep -v i18n | grep -v pyc
grep: ./project_resource_template: No such file or directory
./account_coda/wizard/account_coda_import.py: statement_reconcile_obj = self.pool.get('account.bank.statement.reconcile')
./account/wizard/account_statement_from_invoice.py: statement_reconcile_obj = self.pool.get('account.bank.statement.reconcile')
./account/account_view.xml: <field name="name">account.bank.statement.reconcile.form</field>
./account_payment/wizard/account_payment_populate_statement.py: statement_reconcile_obj = self.pool.get('account.bank.statement.reconcile')
./l10n_ch/wizard/bvr_import.py: statement_reconcile_obj = pool.get('account.bank.statement.reconcile')
./account_payment_extension/wizard/wizard_populate_statement.py: statement_reconcile_obj = pool.get('account.bank.statement.reconcile')

Looks like some cowboy refactoring without even checking with a simple grep, that leads to critical accounting bugs where you can't even pay an invoice anymore guys!

Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Hello,

This is bug is already fixed in lp:~openerp-dev/openobject-addons/trunk-dev-addons3 branch and it will be merged soon with Trunk Addons.

Thank you,
Mustufa

Changed in openobject-addons:
status: New → Fix Committed
Changed in openobject-addons:
status: Fix Committed → Fix Released
assignee: nobody → mra (Open ERP) (mra-tinyerp)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.