Error using account.move copy()

Bug #544314 reported by spamart
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Server (MOVED TO GITHUB)
Confirmed
Undecided
Unassigned

Bug Description

The create() function of account.move seems to bug when using the copy function.

I'm using a really simple call :
### copy_move = self.browse(cr, uid, copy_id)

The context seems to be initiated when the function is called :
### def create(self, cr, uid, vals, context={}):
but it stay at a None value.

As a result, it crashes with the message
### File "/usr/local/openerp/5.0.0/openobject-server/bin/addons/account/account.py", line 898, in create
### context['journal_id'] = vals['journal_id']
### TypeError: 'NoneType' object does not support item assignment

I also noticed that the function has a browse that is not used anywhere, and therefore is completely useless
### accnt_journal = self.pool.get('account.journal').browse(cr, uid, vals['journal_id'])

If i try to add the journal and period ID in my call
### copy_move = self.browse(cr, uid, copy_id, journal_id, period_id)

It just goes in a infinite loop and crash with a max recursion error.
### RuntimeError: maximum recursion depth exceeded in __instancecheck__

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Sypam,

Would you please attach the code of your module so we can test this at our end?

Moreover, can you try the patch attached at https://bugs.launchpad.net/openobject-server/+bug/544087?

Let us know the updates.

Thanks.

Revision history for this message
spamart (sypam) wrote :

Hello,

The code is in the extra addons "account_reverse" message, in the "reverse_move" function,
but you may don't have to bother since the patch is working alright for me!

Thanks a lot.

affects: openobject-addons → openobject-server
Changed in openobject-server:
status: New → Confirmed
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.