← Back to team overview

openerp-community-reviewer team mailing list archive

[Merge] lp:~camptocamp/stock-logistic-flows/7.0-picking_dispatch-duplicate-move-1281471 into lp:stock-logistic-flows

 

Guewen Baconnier @ Camptocamp has proposed merging lp:~camptocamp/stock-logistic-flows/7.0-picking_dispatch-duplicate-move-1281471 into lp:stock-logistic-flows.

Requested reviews:
  Stock and Logistic Core Editors (stock-logistic-core-editors)
Related bugs:
  Bug #1281471 in Stock And Logistic Flows: "picking_dispatch: duplicating a delivery order will put the new stock move in the duplicated's dispatch"
  https://bugs.launchpad.net/stock-logistic-flows/+bug/1281471

For more details, see:
https://code.launchpad.net/~camptocamp/stock-logistic-flows/7.0-picking_dispatch-duplicate-move-1281471/+merge/206866

Fixes: lp:1281471

Erase the dispatch_id from duplicated stock moves
-- 
https://code.launchpad.net/~camptocamp/stock-logistic-flows/7.0-picking_dispatch-duplicate-move-1281471/+merge/206866
Your team Stock and Logistic Core Editors is requested to review the proposed merge of lp:~camptocamp/stock-logistic-flows/7.0-picking_dispatch-duplicate-move-1281471 into lp:stock-logistic-flows.
=== modified file 'picking_dispatch/picking_dispatch.py'
--- picking_dispatch/picking_dispatch.py	2012-12-10 10:51:23 +0000
+++ picking_dispatch/picking_dispatch.py	2014-02-18 08:58:37 +0000
@@ -157,6 +157,14 @@
                                                help='who this move is dispatched to'),
                 }
 
+    def copy_data(self, cr, uid, id, default=None, context=None):
+        if default is None:
+            default = {}
+        default = default.copy()
+        default['dispatch_id'] = False
+        return super(StockMove, self).\
+            copy_data(cr, uid, id, default=default, context=context)
+
     def do_partial(self, cr, uid, ids, partial_datas, context=None):
         """
         in addition to what the original method does, create backorder


Follow ups