[stock] Cannot cancel a picking without moves from source

Bug #645930 reported by Omar (Pexego)
8
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
Undecided
JMA(Open ERP)

Bug Description

Hi,

My picking is in assigned state and it hasn't moves.

I want to cancel this picking. From gtk client or web client, I press button_cancel and it works but from source using trg_validate(uid, 'stock.picking', id, 'button_cancel', cr) it can not cancel because it call test_cancel() function, in this function executes this statement:

if not pick.move_lines:
       return False

It should return 'True' because not has sense that if no lines in picking it returns False, avoid cancel from source.

I include the patch.

Tags: pexego
Revision history for this message
Omar (Pexego) (omar7r) wrote :
Revision history for this message
JMA(Open ERP) (jma-openerp) wrote :

Hello Omar (Pexego),

Would you please review the attached patch?

It also resolves the issue.

Thanks for bringing this into notice.

Changed in openobject-addons:
assignee: nobody → JMA(Open ERP) (jma-openerp)
status: New → Confirmed
Revision history for this message
Omar (Pexego) (omar7r) wrote :

Hi JMA,

It works, it doesn't enter in for loop without moves and then it returns True. You can apply the patch.

Thanks

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

Fixed in:

Stable : 2859 <email address hidden>
Trunk : 5004 <email address hidden>

Thanks for reporting Omar.

summary: - [5.0][stock] Cannot cancel a picking without moves from source
+ [stock] Cannot cancel a picking without moves from source
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.