Account Move Line creation error

Bug #570132 reported by Luis Manuel Angueira Blanco (Pexego)
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Status tracked in Trunk
5.0
Fix Released
Low
Unassigned
Trunk
Fix Released
Low
Mustufa Rangwala (Open ERP)

Bug Description

Hi,

   In account addon (trunk version) there is a little bug when you try to create a new analytic line with no debit value, so it returns an Keyerror (instead to try to read 'debit' value).

   I think the example will explain the problem better:

   - before => 'amount': vals['debit'] or vals['credit'],
   - after => 'amount' : vals.get('debit', False) or vals.get('credit', False),

   I made a little patch to fix this one :)

Related branches

Revision history for this message
Luis Manuel Angueira Blanco (Pexego) (hell2klmab) wrote :
Omar (Pexego) (omar7r)
affects: account-banking → openobject-addons
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Hello Luis,

I have checked the problem and i think its working well without any keyerror.

Thank you,
Mustufa

Changed in openobject-addons:
status: New → Invalid
summary: - [TRUNK] Analytic lines creation error
+ Account Move Line creation error
Revision history for this message
Mustufa Rangwala (Open ERP) (mra-tinyerp) wrote :

Hello Luis,

We have fixed the problem in Branch: lp:~openerp-dev/openobject-addons/trunk-dev-addons3 ..
       revision-id: <email address hidden>
       revno: 3367

It will be merged soon with Trunk Addons Branch

Thank you,
Mustufa

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

It has been improved by revision 2722 <email address hidden>.
Thanks.

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

Hello MRA,

Would you please revert the patch you committed and check with the attached patch?

Plus, things like:
if 'account_tax_id' in vals and vals['account_tax_id']:
Have to be replaced by
vals('account_tax_id',False):

Thanks.

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

Hello,

Ok i have updated the patch.

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

Hello jvo,

vals('account_tax_id',False): => vals.get('account_tax_id',False) :)

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

Oh yes,

Its obvious!

Revision history for this message
Richard (John) Nopkins@Servosoft (richard-nopkins) wrote :

hi mra(openerp),
the patch luks more comfortable.
i wish if this patch is on 6.0.
and, its but-natural(not butt natural ;) ) thts its vals.get('key',False) :)!
thankx.

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.