Merge lp:~unifield-team/unifield-wm/uf-2207 into lp:unifield-wm

Proposed by jftempo
Status: Merged
Merged at revision: 1857
Proposed branch: lp:~unifield-team/unifield-wm/uf-2207
Merge into: lp:unifield-wm
Diff against target: 79 lines (+12/-7)
3 files modified
consumption_calculation/history_consumption.py (+2/-1)
msf_outgoing/msf_outgoing.py (+7/-3)
msf_supply_doc_export/msf_supply_doc_export.py (+3/-3)
To merge this branch: bzr merge lp:~unifield-team/unifield-wm/uf-2207
Reviewer Review Type Date Requested Status
UniField Dev Team Pending
Review via email: mp+196133@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'consumption_calculation/history_consumption.py'
--- consumption_calculation/history_consumption.py 2013-11-05 15:44:32 +0000
+++ consumption_calculation/history_consumption.py 2013-11-21 15:02:52 +0000
@@ -66,7 +66,7 @@
66 _defaults = {66 _defaults = {
67 'date_to': lambda *a: (DateFrom(time.strftime('%Y-%m-%d')) + RelativeDateTime(months=1, day=1, days=-1)).strftime('%Y-%m-%d'),67 'date_to': lambda *a: (DateFrom(time.strftime('%Y-%m-%d')) + RelativeDateTime(months=1, day=1, days=-1)).strftime('%Y-%m-%d'),
68 'requestor_id': lambda obj, cr, uid, c: uid,68 'requestor_id': lambda obj, cr, uid, c: uid,
69 'requestor_date': time.strftime('%Y-%m-%d %H:%M:%S'),69 'requestor_date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
70 'status': 'draft',70 'status': 'draft',
71 }71 }
7272
@@ -222,6 +222,7 @@
222222
223 import threading223 import threading
224 self.write(cr, uid, ids, {'status': 'in_progress'}, context=context)224 self.write(cr, uid, ids, {'status': 'in_progress'}, context=context)
225 cr.commit()
225 new_thread = threading.Thread(target=self._create_lines, args=(cr, uid, ids, product_ids, new_context))226 new_thread = threading.Thread(target=self._create_lines, args=(cr, uid, ids, product_ids, new_context))
226 new_thread.start()227 new_thread.start()
227 new_thread.join(10.0)228 new_thread.join(10.0)
228229
=== modified file 'msf_outgoing/msf_outgoing.py'
--- msf_outgoing/msf_outgoing.py 2013-11-07 17:06:54 +0000
+++ msf_outgoing/msf_outgoing.py 2013-11-21 15:02:52 +0000
@@ -497,7 +497,8 @@
497 self.log(cr, uid, draft_shipment_id, _("Packs from the draft Shipment (%s) have been returned to stock.")%(draft_shipment_name,))497 self.log(cr, uid, draft_shipment_id, _("Packs from the draft Shipment (%s) have been returned to stock.")%(draft_shipment_name,))
498 log_flag = True498 log_flag = True
499 res = obj_data.get_object_reference(cr, uid, 'msf_outgoing', 'view_picking_ticket_form')[1]499 res = obj_data.get_object_reference(cr, uid, 'msf_outgoing', 'view_picking_ticket_form')[1]
500 self.pool.get('stock.picking').log(cr, uid, draft_picking_id, _("The corresponding Draft Picking Ticket (%s) has been updated.")%(draft_picking.name,), context={'view_id': res,})500 context.update({'view_id': res, 'picking_type': 'picking.ticket'})
501 self.pool.get('stock.picking').log(cr, uid, draft_picking_id, _("The corresponding Draft Picking Ticket (%s) has been updated.")%(draft_picking.name,), context=context)
501 502
502 # call complete_finished on the shipment object503 # call complete_finished on the shipment object
503 # if everything is alright (all draft packing are finished) the shipment is done also 504 # if everything is alright (all draft packing are finished) the shipment is done also
@@ -517,6 +518,7 @@
517 'res_id': draft_picking_id ,518 'res_id': draft_picking_id ,
518 'type': 'ir.actions.act_window',519 'type': 'ir.actions.act_window',
519 'target': 'crush',520 'target': 'crush',
521 'context': context
520 }522 }
521 523
522 def return_packs_from_shipment(self, cr, uid, ids, context=None):524 def return_packs_from_shipment(self, cr, uid, ids, context=None):
@@ -2849,7 +2851,8 @@
2849 res = obj_data.get_object_reference(cr, uid, 'msf_outgoing', 'view_ppl_form')[1]2851 res = obj_data.get_object_reference(cr, uid, 'msf_outgoing', 'view_ppl_form')[1]
2850 self.log(cr, uid, picking.id, _("Products from Pre-Packing List (%s) have been returned to stock.")%(picking.name,), context={'view_id': res,})2852 self.log(cr, uid, picking.id, _("Products from Pre-Packing List (%s) have been returned to stock.")%(picking.name,), context={'view_id': res,})
2851 res = obj_data.get_object_reference(cr, uid, 'msf_outgoing', 'view_picking_ticket_form')[1]2853 res = obj_data.get_object_reference(cr, uid, 'msf_outgoing', 'view_picking_ticket_form')[1]
2852 self.log(cr, uid, draft_picking_id, _("The corresponding Draft Picking Ticket (%s) has been updated.")%(picking.previous_step_id.backorder_id.name,), context={'view_id': res,})2854 context.update({'view_id': res, 'picking_type': 'picking_ticket'})
2855 self.log(cr, uid, draft_picking_id, _("The corresponding Draft Picking Ticket (%s) has been updated.")%(picking.previous_step_id.backorder_id.name,), context=context)
2853 # if all moves are done or canceled, the ppl is canceled2856 # if all moves are done or canceled, the ppl is canceled
2854 cancel_ppl = True2857 cancel_ppl = True
2855 for move in picking.move_lines:2858 for move in picking.move_lines:
@@ -2935,7 +2938,8 @@
2935 # TODO refactoring needed2938 # TODO refactoring needed
2936 obj_data = self.pool.get('ir.model.data')2939 obj_data = self.pool.get('ir.model.data')
2937 res = obj_data.get_object_reference(cr, uid, 'msf_outgoing', 'view_picking_ticket_form')[1]2940 res = obj_data.get_object_reference(cr, uid, 'msf_outgoing', 'view_picking_ticket_form')[1]
2938 self.log(cr, uid, draft_picking_id, _("The corresponding Draft Picking Ticket (%s) has been updated.")%(picking.backorder_id.name,), context={'view_id': res,})2941 context.update({'view_id': res, 'picking_type': 'picking_ticket'})
2942 self.log(cr, uid, draft_picking_id, _("The corresponding Draft Picking Ticket (%s) has been updated.")%(picking.backorder_id.name,), context=context)
2939 2943
2940 if picking.subtype == 'packing':2944 if picking.subtype == 'packing':
2941 # for each packing we get the draft packing2945 # for each packing we get the draft packing
29422946
=== modified file 'msf_supply_doc_export/msf_supply_doc_export.py'
--- msf_supply_doc_export/msf_supply_doc_export.py 2013-10-30 16:03:55 +0000
+++ msf_supply_doc_export/msf_supply_doc_export.py 2013-11-21 15:02:52 +0000
@@ -299,9 +299,9 @@
299 Delivery_Order = trans_obj.tr_view(cr, 'Delivery Order', context)299 Delivery_Order = trans_obj.tr_view(cr, 'Delivery Order', context)
300 Internal_Moves = trans_obj.tr_view(cr, 'Internal Moves', context)300 Internal_Moves = trans_obj.tr_view(cr, 'Internal Moves', context)
301 for v in values:301 for v in values:
302 if '_terp_view_name' in context and v[2]['report_name'] == 'picking.ticket' and context['_terp_view_name'] in (Picking_Tickets, Picking_Ticket) and context.get('picking_screen', False)\302 if v[2]['report_name'] == 'picking.ticket' and (context.get('_terp_view_name') in (Picking_Tickets, Picking_Ticket) or context.get('picking_type') == 'picking_ticket') and context.get('picking_screen', False)\
303 or '_terp_view_name' in context and v[2]['report_name'] == 'pre.packing.list' and context['_terp_view_name'] in (Pre_Packing_Lists, Pre_Packing_List) and context.get('ppl_screen', False)\303 or v[2]['report_name'] == 'pre.packing.list' and context.get('_terp_view_name') in (Pre_Packing_Lists, Pre_Packing_List) and context.get('ppl_screen', False)\
304 or '_terp_view_name' in context and v[2]['report_name'] == 'labels' and context['_terp_view_name'] in [Picking_Ticket, Picking_Tickets, Pre_Packing_List, Pre_Packing_Lists, Delivery_Orders, Delivery_Order]\304 or v[2]['report_name'] == 'labels' and (context.get('_terp_view_name') in [Picking_Ticket, Picking_Tickets, Pre_Packing_List, Pre_Packing_Lists, Delivery_Orders, Delivery_Order] or context.get('picking_type', False) in ('delivery_order', 'picking_ticket'))\
305 or v[2]['report_name'] in ('internal.move.xls', 'internal.move') and (('_terp_view_name' in context and context['_terp_view_name'] in [Internal_Moves]) or context.get('picking_type') == 'internal_move') \305 or v[2]['report_name'] in ('internal.move.xls', 'internal.move') and (('_terp_view_name' in context and context['_terp_view_name'] in [Internal_Moves]) or context.get('picking_type') == 'internal_move') \
306 or v[2]['report_name'] == 'delivery.order' and context.get('_terp_view_name') in [Delivery_Orders, Delivery_Order]:306 or v[2]['report_name'] == 'delivery.order' and context.get('_terp_view_name') in [Delivery_Orders, Delivery_Order]:
307 new_act.append(v)307 new_act.append(v)

Subscribers

People subscribed via source and target branches