[5.0] [stock] Return packing with zero quantity

Bug #611207 reported by Quentin THEURET @Amaris
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
JMA(Open ERP)

Bug Description

Rev. No: 2798

On Outgoing Products, when I click on 'Return Packing' action, I have the possibility to set the return quantity of a product to 0. When I set the return quantity to 0 and I confirm this return packing, the system creates a picking and moves with quantity of 0.

On this configuration, the system shouldn't create the picking when all return quantities are 0 or shouldn't create the move with return quantity equal to 0. It's not an important bug, but it's not ergonomic when you have a lot of stock movements.

Example on demo data:

On Outgoing Products, open the picking 'PACK21' and I click on 'Return Packing'. On the wizard, set the quantity of PC3 to 0. Click on 'Return'. The system shows the created picking with two moves. One with 0.00 PC3 and one with 3.00 CPU3.

I attached a patch to fix this bug. The patch sees if the quantity of return product are 0, if it's true, the system doesn't create the stock move. If all quantities are 0, the system doesn't create the picking and all stock moves.

Related branches

Revision history for this message
Quentin THEURET @Amaris (qtheuret) wrote :
Changed in openobject-addons:
status: New → Opinion
Changed in openobject-addons:
assignee: nobody → JMA(Open ERP) (jma-openerp)
Changed in openobject-addons:
importance: Undecided → Low
milestone: none → 5.0.13
status: Opinion → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

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

Changed in openobject-addons:
status: In Progress → Fix Released
Revision history for this message
Quentin THEURET @Amaris (qtheuret) wrote :

Hi Jay,

I reopen this bug because, the fix fixes the problem if you have only one move in picking.

If you have more than one move in picking, the return packing wizard propose you to set a return for all moves. But if you want create a return packing for only one move, you set all other move product quantity to zero. But if you do that, the system shows you an error message.

The system shouldn't create a return packing with all product quantities are equal to zero. But if we have only one quantity not equal ti zero, the system should create a return packing with only this line (without other lines where quantity equal to zero).

In my patch, the instruction 'continue' allows that, but if all lines quantity are equal to zero, the system doesn't send a message to the user. You can add instruction to send a message to the user if all lines quantity are equal to zero.

I attached a patch to do that and to fix the problem.

Changed in openobject-addons:
status: Fix Released → Confirmed
Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

We agree to your suggestion.
It has been improved by revision 2802 <email address hidden> authored to you.
Thanks.

Changed in openobject-addons:
status: Confirmed → Fix Released
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.