Merge lp:~numerigraphe/openobject-addons/6.1-sale-exception-duplicate-moves into lp:openobject-addons/6.1

Proposed by Numérigraphe
Status: Needs review
Proposed branch: lp:~numerigraphe/openobject-addons/6.1-sale-exception-duplicate-moves
Merge into: lp:openobject-addons/6.1
Diff against target: 13 lines (+4/-0)
1 file modified
sale/ (+4/-0)
To merge this branch: bzr merge lp:~numerigraphe/openobject-addons/6.1-sale-exception-duplicate-moves
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email:

Description of the change

This fixes a bug that duplicates Stock Moves when a Sale Order is in the state "Shipping Exception".
Lionel Sausin.

To post a comment you must log in.

Unmerged revisions

6620. By Anil Kesariya(SerpentCs), Lionel Sausin (Numérigraphe)

[FIX] recreate packing duplicates confirmed moves on sale exception

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sale/'
2--- sale/ 2012-10-09 12:16:14 +0000
3+++ sale/ 2012-11-13 10:02:31 +0000
4@@ -821,6 +821,10 @@
5 for line in order_lines:
6 if line.state == 'done':
7 continue
8+ # If the Sale Order Line already has Stock Moves, skip it if no moves were cancelled
9+ if line.move_ids and all(
10+ [m.state != 'cancel' for m in line.move_ids]):
11+ continue
13 date_planned = self._get_date_planned(cr, uid, order, line, order.date_order, context=context)