Canceled Move should not go for Invoice creation.

Bug #638385 reported by Jan Verlaan
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Status tracked in Trunk
5.0
Fix Released
Medium
Unassigned
Trunk
Fix Released
Medium
Unassigned

Bug Description

Patch included

SITUATION IDENTIFIED IN:
Created Invoice from packing

REPRODUCTION ENVIRONMENT:
Stable version 5.0.16 via bazaar updated today via bazaar.
revision 2849
date: 2010-09-014
branch-nick: addons

PROBLEM DESCRIPTION:
Invoice is created with a invoice line containing canceled pickinglines

SPECIFIC PARAMETER SETUP:
Purchase order type is "Invoice from picking"
Demo data setup

STEPS TO BE FOLLOWED:
Create a purchase order with 1 orderline with 1 pcs BasicPC and a second orderline with 1 pcs MediumPC
Check the parameter that the invoice is created "From picking"
Confirm and Approve the purchaseorder.

Go to Packing and see that a packing is created with 2 picking lines.
Click on first picking line to go into detail screen and "Cancel" this specific picking line. Exit this detail screen.
Now first line is canceled and the second one is open.
Receive the product by check availability and confirm. See that only the second line asked for quantity which is correct.

Create invoice

OBSERVED RESULT:
The invoice contains both productlines with ordered products, not the delivered products.

EXPECTED RESULT:
An invoice with only the delivered products

ADDITIONAL COMMENTS:
This functionality is changed between 5.04 and 5.014.
Previously for the cancelled picking line a backorder was created in status cancelled.
Therefore the cancelled line disappeared from the picking where the invoice was created from. This is not the case anymore and no check is done on cancelled picking lines.

I like the current functionality as it cleans up the packing orders but the invoice should be created right.

Revision history for this message
Jan Verlaan (jan-verlaan) wrote :
Changed in openobject-addons:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → 5.0.15
Changed in openobject-addons:
assignee: nobody → DHS(OpenERP) (dhs-openerp)
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hi Jan,Raphael,

Thanks for pointing this note.

Is that right to not allow only 'cancel' state?

Should not we follow the concept that 'draft'/'cancel' move should not be allowed for invoice creation?

May be a better approach stays as only 'done' moves are qualified for invoice lines.

Share your views.

Thanks.

Revision history for this message
Jan Verlaan (jan-verlaan) wrote :

Hi Jay,

I guess you are right, but the current functionality does create a backorder for the materials not shipped (accept cancelled lines). Resulting all other states then cancel and done are moved to the backorder.

So from functional point of view it isn't needed to adjust other states then cancelled, but from technical point of view and readability of the code it could be added, but will never be triggered.

Revision history for this message
Jan Verlaan (jan-verlaan) wrote :

See also https://bugs.launchpad.net/openobject-addons/+bug/647041. Also a patch included.
Is related to this bug as it concerns reports.

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

Experts,

Please share your view,so we can come up with a concrete solution.

Thanks.

Revision history for this message
Ferdinand (office-chricar) wrote :

IMHO a cancelled picking line has to be treated by all (following) actions as if it does not exist.

the other alternative would be to delete the line - which of course is not desired, because the "workflow" generation and cancellation of the line should be documented for further investigation.

invoice should of course take the picking qty (and price if different from order - which is quite common for some business and/or products where daily spot prices are used regardless which price was available at order date. )
(see https://code.launchpad.net/~openerp-commiter/openobject-addons/chricar_price_unit)

Revision history for this message
Jan Verlaan (jan-verlaan) wrote :

Obviously this issue is so clear that nobody has anything to add. :-)
We have applied the proposed patch 6 weeks ago in production and haven't had any problem with it. It just removes the cancelled picking lines from the invoices.

Please take into consideration also bug https://bugs.launchpad.net/openobject-addons/+bug/647041 that has the same issue for reports.

Thanks, Jan

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

Alright Jan,

I will look at this soon and patch it.

Thanks.

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

Thanks Experts.

Fixed in : by

Stable : 2872 <email address hidden>
Trunk : 4308 <email address hidden>

Let us know more about the topic if needs more clear changes in trunk.

Thanks.

summary: - 5.0 Regression - Canceled pickingline in picking does create a
- invoiceline (Patch incl)
+ Canceled Move should not go for Invoice creation.
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.