Merge lp:~dorian-kemps/unifield-server/US-5360-5361 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 5187
Proposed branch: lp:~dorian-kemps/unifield-server/US-5360-5361
Merge into: lp:unifield-server
Diff against target: 68 lines (+11/-11)
2 files modified
bin/addons/sale/wizard/internal_request_import.py (+10/-10)
bin/addons/sales_followup/report/ir_follow_up_location_report.py (+1/-1)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-5360-5361
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+359587@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 'bin/addons/sale/wizard/internal_request_import.py'
2--- bin/addons/sale/wizard/internal_request_import.py 2018-11-14 14:05:06 +0000
3+++ bin/addons/sale/wizard/internal_request_import.py 2018-11-27 09:58:17 +0000
4@@ -475,13 +475,13 @@
5 # Line 6: Creation date
6 create_date = values.get(6, [])[1]
7 if type(create_date) == type(DateTime.now()):
8- req_date = create_date.strftime('%d-%m-%Y')
9- header_values['imp_creation_date'] = req_date
10+ create_date = create_date.strftime('%Y-%m-%d')
11+ header_values['imp_creation_date'] = create_date
12 else:
13 for format in l_date_format:
14 try:
15- time.strptime(create_date, format)
16- header_values['imp_creation_date'] = create_date
17+ create_date = datetime.datetime.strptime(create_date, format)
18+ header_values['imp_creation_date'] = create_date.strftime('%Y-%m-%d')
19 break
20 except:
21 continue
22@@ -496,13 +496,13 @@
23 # Line 7: Requested date
24 req_date = values.get(7, [])[1]
25 if type(req_date) == type(DateTime.now()):
26- req_date = req_date.strftime('%d-%m-%Y')
27+ req_date = req_date.strftime('%Y-%m-%d')
28 header_values['imp_requested_date'] = req_date
29 else:
30 for format in l_date_format:
31 try:
32- time.strptime(req_date, format)
33- header_values['imp_requested_date'] = req_date
34+ req_date = datetime.datetime.strptime(req_date, format)
35+ header_values['imp_requested_date'] = req_date.strftime('%Y-%m-%d')
36 break
37 except:
38 continue
39@@ -694,13 +694,13 @@
40 if vals[8]:
41 dost = vals[8]
42 if type(dost) == type(DateTime.now()):
43- dost = dost.strftime('%d-%m-%Y')
44+ dost = dost.strftime('%Y-%m-%d')
45 line_data.update({'imp_stock_take_date': dost})
46 else:
47 for format in l_date_format:
48 try:
49- time.strptime(dost, format)
50- line_data.update({'imp_stock_take_date': dost})
51+ dost = datetime.datetime.strptime(dost, format)
52+ line_data.update({'imp_stock_take_date': dost.strftime('%Y-%m-%d')})
53 break
54 except:
55 continue
56
57=== modified file 'bin/addons/sales_followup/report/ir_follow_up_location_report.py'
58--- bin/addons/sales_followup/report/ir_follow_up_location_report.py 2018-11-13 10:54:52 +0000
59+++ bin/addons/sales_followup/report/ir_follow_up_location_report.py 2018-11-27 09:58:17 +0000
60@@ -279,7 +279,7 @@
61 shipment = move.picking_id.shipment_id.name or '-'
62 is_shipment_done = move.picking_id.shipment_id.state == 'done'
63 elif from_stock:
64- packing = '-'
65+ packing = move.picking_id.name or '-'
66 shipment = '-'
67 is_shipment_done = move.picking_id.state == 'done' and move.state != 'cancel'
68 state = move.picking_id.state

Subscribers

People subscribed via source and target branches