Account : partner_bank to be partner_bank_id ?

Bug #544287 reported by Numérigraphe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Status tracked in Trunk
5.0
Fix Released
Undecided
JMA(Open ERP)
Trunk
Fix Released
Low
Mantavya Gajjar (Open ERP)

Bug Description

In 5.0 and trunk, in the invoice object, the onchange functions for the partner and the bank details have a parameter partner_bank_id, but the name of the field is actually partner_bank.

In v5.0, I suggest the parameter name be changed in the signature of the onchange functions.

In the trunk, I suggest the field be renamed to partner_bank_id, which is more conform to the conventions - unless you chose to follow my humble suggestion for bug #405863, and split this into two distinct fields.

Lionel.

Changed in openobject-addons:
assignee: nobody → JMA(Open ERP) (jma-openerp)
Changed in openobject-addons:
milestone: none → 5.0.8
status: New → Confirmed
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Fixed by revision 2672 <email address hidden>.
Thanks.

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

Hello Lionel,

Thank you for pointing out this issue.

Revision history for this message
Numérigraphe (numerigraphe) wrote : Re: [Bug 544287] Re: account: wrong parameters for bank account in onchange

Jay (Open ERP) a écrit :
> Fixed by revision 2672 <email address hidden>.
> Thanks.
May I suggest you communicate about this API change? Just in case
someone wrote a function call with onchange_partner_id(...,
partner_bank_id=foo,...) like I have just done.
Lionel

Revision history for this message
JMA(Open ERP) (jma-openerp) wrote : Re: account: wrong parameters for bank account in onchange

Hello Lionel,

Yes you are right that it could create problems for predecessor(which depend on account) modules.

But, It was a real mistake on code and, it is not at all good to continue this mistake for other modules too.

We have checked the modules on Official Addons(stable) which were using this method and this fix contains those changes.

We are thankful to you for pointing this out.

Thank you.

Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :

Hello,

Let us be aware about any official module whether it still contains an error with this method.

Thanks.

Revision history for this message
Numérigraphe (numerigraphe) wrote :

revision 2672 <email address hidden> contains this change that I find a bit strange: Why remove this line ?
=== modified file 'account/account.py'
--- account/account.py 2010-03-17 12:36:40 +0000
+++ account/account.py 2010-03-23 09:59:56 +0000
@@ -932,7 +932,6 @@
                         l[2]['period_id'] = default_period
                 context['period_id'] = default_period

- accnt_journal = self.pool.get('account.journal').browse(cr, uid, vals['journal_id'])
         if 'line_id' in vals:
             c = context.copy()
             c['novalidate'] = True

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

Hello Lionel,

This was just an extra change. The line was unncessary.

And, JMA(OpenERP) is right about official modules.

Tell us if we still miss anything.

Thanks.

Revision history for this message
Numérigraphe (numerigraphe) wrote : Re: [Bug 544287] Re: account: wrong parameters for bank account in onchange

Thank you Jay and JMA.
> The line was unncessary.
>
Fine then, thanks.
> And, JMA(OpenERP) is right about official modules.
I sure trust you on this. I was rather thinking of extra, community,
partners' customizations ... so IMHO it should be announced as an API
change for everyone to check their own code.
Lionel

summary: - account: wrong parameters for bank account in onchange
+ Account : partner_bank to be partner_bank_id ?
Revision history for this message
Mantavya Gajjar (Open ERP) (mga) wrote :

Hello,

Its fix and committees under trunk,
revision is : <email address hidden>

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.