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
1=== modified file 'consumption_calculation/history_consumption.py'
2--- consumption_calculation/history_consumption.py 2013-11-05 15:44:32 +0000
3+++ consumption_calculation/history_consumption.py 2013-11-21 15:02:52 +0000
4@@ -66,7 +66,7 @@
5 _defaults = {
6 'date_to': lambda *a: (DateFrom(time.strftime('%Y-%m-%d')) + RelativeDateTime(months=1, day=1, days=-1)).strftime('%Y-%m-%d'),
7 'requestor_id': lambda obj, cr, uid, c: uid,
8- 'requestor_date': time.strftime('%Y-%m-%d %H:%M:%S'),
9+ 'requestor_date': lambda *a: time.strftime('%Y-%m-%d %H:%M:%S'),
10 'status': 'draft',
11 }
12
13@@ -222,6 +222,7 @@
14
15 import threading
16 self.write(cr, uid, ids, {'status': 'in_progress'}, context=context)
17+ cr.commit()
18 new_thread = threading.Thread(target=self._create_lines, args=(cr, uid, ids, product_ids, new_context))
19 new_thread.start()
20 new_thread.join(10.0)
21
22=== modified file 'msf_outgoing/msf_outgoing.py'
23--- msf_outgoing/msf_outgoing.py 2013-11-07 17:06:54 +0000
24+++ msf_outgoing/msf_outgoing.py 2013-11-21 15:02:52 +0000
25@@ -497,7 +497,8 @@
26 self.log(cr, uid, draft_shipment_id, _("Packs from the draft Shipment (%s) have been returned to stock.")%(draft_shipment_name,))
27 log_flag = True
28 res = obj_data.get_object_reference(cr, uid, 'msf_outgoing', 'view_picking_ticket_form')[1]
29- 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,})
30+ context.update({'view_id': res, 'picking_type': 'picking.ticket'})
31+ 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)
32
33 # call complete_finished on the shipment object
34 # if everything is alright (all draft packing are finished) the shipment is done also
35@@ -517,6 +518,7 @@
36 'res_id': draft_picking_id ,
37 'type': 'ir.actions.act_window',
38 'target': 'crush',
39+ 'context': context
40 }
41
42 def return_packs_from_shipment(self, cr, uid, ids, context=None):
43@@ -2849,7 +2851,8 @@
44 res = obj_data.get_object_reference(cr, uid, 'msf_outgoing', 'view_ppl_form')[1]
45 self.log(cr, uid, picking.id, _("Products from Pre-Packing List (%s) have been returned to stock.")%(picking.name,), context={'view_id': res,})
46 res = obj_data.get_object_reference(cr, uid, 'msf_outgoing', 'view_picking_ticket_form')[1]
47- 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,})
48+ context.update({'view_id': res, 'picking_type': 'picking_ticket'})
49+ 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)
50 # if all moves are done or canceled, the ppl is canceled
51 cancel_ppl = True
52 for move in picking.move_lines:
53@@ -2935,7 +2938,8 @@
54 # TODO refactoring needed
55 obj_data = self.pool.get('ir.model.data')
56 res = obj_data.get_object_reference(cr, uid, 'msf_outgoing', 'view_picking_ticket_form')[1]
57- self.log(cr, uid, draft_picking_id, _("The corresponding Draft Picking Ticket (%s) has been updated.")%(picking.backorder_id.name,), context={'view_id': res,})
58+ context.update({'view_id': res, 'picking_type': 'picking_ticket'})
59+ self.log(cr, uid, draft_picking_id, _("The corresponding Draft Picking Ticket (%s) has been updated.")%(picking.backorder_id.name,), context=context)
60
61 if picking.subtype == 'packing':
62 # for each packing we get the draft packing
63
64=== modified file 'msf_supply_doc_export/msf_supply_doc_export.py'
65--- msf_supply_doc_export/msf_supply_doc_export.py 2013-10-30 16:03:55 +0000
66+++ msf_supply_doc_export/msf_supply_doc_export.py 2013-11-21 15:02:52 +0000
67@@ -299,9 +299,9 @@
68 Delivery_Order = trans_obj.tr_view(cr, 'Delivery Order', context)
69 Internal_Moves = trans_obj.tr_view(cr, 'Internal Moves', context)
70 for v in values:
71- 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)\
72- 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)\
73- 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]\
74+ 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)\
75+ 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)\
76+ 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'))\
77 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') \
78 or v[2]['report_name'] == 'delivery.order' and context.get('_terp_view_name') in [Delivery_Orders, Delivery_Order]:
79 new_act.append(v)

Subscribers

People subscribed via source and target branches