invoice payment should pay only the invoice I started from

Bug #767058 reported by Leonardo Pistone
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 3

Bug Description

Observed in OE 6.0. To reproduce:

- create and confirm two invoices for a customer.
- open one of them
- Click the "Payment" button

In the new window with the voucher, I expect to see in the list of "Invoices and outstanding transactions" only the invoice I started from, not all of them. If you see none, try to fill in the "Payment Method".

looking up in the code, in account_voucher/invoice.py, L47 the invoice_id is indeed passed on to the voucher system, but it is not used (apart from _get_journal, which doesn't matter much here).

thanks!

Tags: maintenance

Related branches

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Leonardo Pistone (lepistone) wrote :

Thanks Amit. Still, it seems to me a bug, not a wishlist thing. In fact as I wrote the invoice_id is passed on to the voucher view, so I suppose what I say (ie pay the invoice I started from) is what should happen.

Otherwise I don't see a reasonable method of paying one invoice when the customer has many to pay.

Revision history for this message
Thomas Winteler (Win-Soft) (thomi) wrote :

we also have this problem... cause.. a partner has eg. 200 open invoices.. you select one of them and in the voucher you see all open invoices and need to delete all other 199 or find the correct one to enter the correct amount... and correct the other lines that get a auto computed amount...

thanks for fast solving this
thomi

Revision history for this message
Bogdan Stanciu (bstanciu) wrote : Re: [Bug 767058] Re: invoice payment should pay only the invoice I started from

On 29. 04. 11 14:18, Thomas Winteler wrote:
> we also have this problem... cause.. a partner has eg. 200 open
> invoices.. you select one of them and in the voucher you see all open
> invoices and need to delete all other 199 or find the correct one to
> enter the correct amount... and correct the other lines that get a auto
> computed amount...
>
> thanks for fast solving this
> thomi
>
it was reported at least twice recently, so maybe the team should take
it more serious. besides, it is not a big change, but improves a lot the
usability.
every time i have several open invoices, based on the murpy's law, the
wrong one gets the amount, so i need to change it :-))

thank you
b

Revision history for this message
Cristian Salamea (ovnicraft) wrote :

Yes we need to use invoice_id and get unreconciled lines from invoice, this bug has impact in performance too, user just want to pay the invoice which comes from, algorithm now needs to read M*N lines if you fix it just read N lines.

Regards,

Revision history for this message
Thomas Winteler (Win-Soft) (thomi) wrote :

Hey

There is another way to reproduce this:

1. Accounting / Customers / Customers Payment
2. create a new Voucher Entry
3. select a Customer that has a lot of open invoices
4. "Invoices and outstanding transactions" are showing all open invoices for that customer

In this situation, the list of open invoices should be empty and the user should have the ability to select multiple open invoice manually, to close multi invoices...

If that works as described, we have two different customer payment precesses:

A. single invoice process: select a single invoice from "customer invoices"
B. multi invoice handling: create a empty customer payment voucher and select manually open invoices of that customer

thanks for working on that
thomi

Revision history for this message
Amit Parik (amit-parik) wrote :

Hello,

According to above discussion it seems like a bug So I am set it to as a "low" priority.

Thanks for the understanding!

Changed in openobject-addons:
importance: Wishlist → Low
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Cristian Salamea (ovnicraft) wrote :

@Thomas the second case use what you describe IMHO is ok, system is loading all unreconciled accounts from a partner and users has the ability to close any invoice.

Regards,

Revision history for this message
Ashvin Rathod (OpenERP) (ara-tinyerp) wrote :

Hello Leonardo,

I have fixed the problem in lp:~openerp-dev/openobject-addons/trunk-bug-767058-ara branch. It will be merge soon with trunk addons.

Revision ID: <email address hidden>
Revision No: 4666

Thanks,
ara

Changed in openobject-addons:
status: In Progress → Fix Committed
Revision history for this message
Thomas Winteler (Win-Soft) (thomi) wrote :

btw.. in GTK client same happens...

I'm wondering that so much customer can work in this way?

@Ashvin
I'm working with Leonardo and he tried to test your code in v6.0 branch.. no luck...
They (Agile BG) will report it as OPW.. cause our customer can't work if there are maybe 200+ open invoices for one partner... and they enter daily 10+ invoices for same partner... so hurry up in this to get it to v6 branch.. ;)

Thanks for treatment
thomi

Revision history for this message
Cristian Salamea (ovnicraft) wrote :

This bug will fixed into v6 too ?

Regards,

tags: added: maintenance
Changed in openobject-addons:
milestone: none → 6.0.3
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Everyone,

Thanks for the discussion and reporting, it has been fixed into stable by revision 4563 <email address hidden>.

Changed in openobject-addons:
status: Fix Committed → Fix Released
Revision history for this message
Thomas Winteler (Win-Soft) (thomi) wrote :

@Jay

Thanks for working and try to fix that.. but i tested on three instances.. no success :(

Updated the instances to latest bzr revision:
cat /opt/openerp/development/addons/.bzr/branch/last-revision
4566 <email address hidden>

An tried that with some invoices from same customer... if i pay one, there are still all listed in the payment voucher..
Tested it also on another instance, with same revision and made a little video, so you can see what's happening:
http://dl.dropbox.com/u/5636258/openerp-pay-single-invoice.ogv

Thanks for spending more time in that important little thing that makes working more efficient in OpenERP ;)

cheers from switzerland
thomi

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

Thomas,

I just made another test and it seems working as expected after the fix.

As there are changes in XML files, would you please make sure you have updated the module ?

If not, can you do the same changes in your Views and recheck?

Thanks for being spot on.

Revision history for this message
Thomas Winteler (Win-Soft) (thomi) wrote :

Hey Jay

I always do updating modules if there are new bzr revisions.

I tested also on a new demo db with demo data... same problem as in a existing db...

Step's to reproduce:
1. select a single customer invoice
2. press Payment button
3. select the correct Payment Method (the correct invoice is in the list of invoices and outstanding transactions)
4. change the payment date (all open invoices of that customer will be listed)
5. change again payment method (see 3.)
6. change again payment date (see 4.)

Thanks for fixing
thomi

Revision history for this message
Leonardo Pistone (lepistone) wrote :

Jay,

Agree with Thomas. The on_change for the payment method seems OK, but the on_change for the date doesn't.

Thanks

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

Thomas and Leonardo,

I tend to agree now. Thanks for providing information Leonardo.

It has been recorrected by revision 4571 <email address hidden>.

Your feedback is much appreciated.

Thanks.

Revision history for this message
Thomas Winteler (Win-Soft) (thomi) wrote :

Good Morning

@Jay
Thanks a lot for fixing it... we now tested it on different instances and it works like a charm.
While testing this i found another issue... but i will retest and report it to AgileBG and on LP in another Ticket.

Thanks a lot

kind regards from switzerland
Thomas

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

Thomas,

Thanks for the feedback, we appreciate your participation and inputs here.

Feel free to post any bugs found.

Thanks once again.

Revision history for this message
Thomas Winteler (Win-Soft) (thomi) wrote :

Hey

I spent more time in this.. and found out, that single payment works really fine.. but if you want work on multi payments from a customer.. it breaks...

Try to expland.. and the :) a video to demonstrate:

1. create some invoices for the same partner and validate them
2. select one of them and make the payment for that invoice
3. enter all data that are needed: Paid Amount (maybe partner pay's 500.--), Payment Method and Date
3.1 the selected invoice before will now be listed
4. press "New" (invoices and outstanding transactions)
4.1 select invoices that are also paid
4.2 save each single line, edit it again and enter the amount (where the invoice amount should be auto inserted, please!)
4.3 repeat that for other open invoices of this partner
5 check now the total open balance and total amount
6. change now the paid amount to another amount (maybe if the total amount don't fit paid amount or only for test)
6.1 lines are gone!!!

You can repeat that and maybe change Payment Method or Date... same happens

Btw. if you press "New" (invoices and outstanding transactions) the list always have all invoices instead of only those that arn't in the list of invoices and outstanding transactions...

video demonstration:
http://dl.dropbox.com/u/5636258/openerp-multi-invoice-payment.ogv (5MB)

Thanks for fixing that soon
Thomas

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

Thomas,

Thanks for the video, I will check it soon and get back to you.

Revision history for this message
Leonardo Pistone (lepistone) wrote :

Jay, Thomas,

I can confirm what Thomas says: the new code should be checked again if someone

1. goes into an invoice, clicks "pay"
2. then changes around things, adds lines.

There is probably something wrong with the onchange methods.

NB this should still go under OPW 5577.

Thanks!

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

Leonardo,

I agree too. The behavior of onchange on amount is still buggy.

The problem which was posted has been solved, but the relevant issue still remains and we are in the process to get an elegant solution on board.

Thanks for your feedback.

Revision history for this message
Thomas Winteler (Win-Soft) (thomi) wrote :

Hey Jay

Are you having good news for us?... Cause it's OPW, we need that really fast...

Thanks for response...
Thomas

Revision history for this message
Thomas Winteler (Win-Soft) (thomi) wrote :

I report in this Bug cause it has to do with this, i think

Today I gave accounting training in customer invoice payment. Single payment work as expected.

But if you need to change a already posted customer payment, unreconcile it, set it back to draft, edit and change the date (amount or payment method), the "Invoices and outstanding transactions" will be emptied.

it happens the same as if you want work with multi invoice payment...

Thanks
thomi

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

Thomas,

We are working for it and will end up with an elegant solution.

Note that this is different bug than the posted one.

Thanks for understanding.

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

Hello Guys,

For the sake of clarity, I have created a new bug and we will communicate over there.
https://bugs.launchpad.net/openobject-addons/+bug/783496

Thanks.

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.