Merge lp:~unifield-team/unifield-server/us-2053 into lp:unifield-server

Proposed by jftempo
Status: Merged
Merged at revision: 4317
Proposed branch: lp:~unifield-team/unifield-server/us-2053
Merge into: lp:unifield-server
Diff against target: 21 lines (+9/-1)
1 file modified
bin/addons/msf_printed_documents/report/report_reception.py (+9/-1)
To merge this branch: bzr merge lp:~unifield-team/unifield-server/us-2053
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+320383@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/msf_printed_documents/report/report_reception.py'
2--- bin/addons/msf_printed_documents/report/report_reception.py 2016-03-08 15:32:40 +0000
3+++ bin/addons/msf_printed_documents/report/report_reception.py 2017-04-10 13:14:50 +0000
4@@ -204,8 +204,16 @@
5 def getActualReceiptDate(self,o):
6 if o.state == 'assigned':
7 actual_receipt_date = ''
8+ elif not o.move_lines:
9+ ard = time.strptime(o.date, '%Y-%m-%d %H:%M:%S')
10+ actual_receipt_date = time.strftime('%d/%m/%Y', ard)
11 else:
12- actual_receipt_date = time.strftime('%d/%m/%Y', time.strptime(o.date,'%Y-%m-%d %H:%M:%S'))
13+ ard_min = time.strptime(o.move_lines[0].date, '%Y-%m-%d %H:%M:%S')
14+ for move in o.move_lines:
15+ move_ard = time.strptime(move.date, '%Y-%m-%d %H:%M:%S')
16+ if move_ard < ard_min:
17+ ard_min = move_ard
18+ actual_receipt_date = time.strftime('%d/%m/%Y', ard_min)
19 return actual_receipt_date
20
21 def get_lines(self, o):

Subscribers

People subscribed via source and target branches

to all changes: