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

Proposed by jftempo
Status: Merged
Merged at revision: 5736
Proposed branch: lp:~dorian-kemps/unifield-server/US-6441
Merge into: lp:unifield-server
Diff against target: 32 lines (+3/-11)
1 file modified
bin/addons/msf_printed_documents/report/report_reception.py (+3/-11)
To merge this branch: bzr merge lp:~dorian-kemps/unifield-server/US-6441
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+385469@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 2018-09-03 09:00:00 +0000
3+++ bin/addons/msf_printed_documents/report/report_reception.py 2020-06-10 07:55:39 +0000
4@@ -208,25 +208,17 @@
5 def getExpDate(self, line):
6 return time.strftime('%d/%m/%Y', time.strptime(line.prodlot_id.life_date,'%Y-%m-%d'))
7
8-
9- def getActualReceiptDate(self,o):
10+ def getActualReceiptDate(self, o):
11 if o.state != 'done':
12 actual_receipt_date = ''
13- elif not o.move_lines:
14- ard = time.strptime(o.date, '%Y-%m-%d %H:%M:%S')
15- actual_receipt_date = time.strftime('%d/%m/%Y', ard)
16 else:
17- ard_min = time.strptime(o.move_lines[0].date, '%Y-%m-%d %H:%M:%S')
18- for move in o.move_lines:
19- move_ard = time.strptime(move.date, '%Y-%m-%d %H:%M:%S')
20- if move_ard < ard_min:
21- ard_min = move_ard
22- actual_receipt_date = time.strftime('%d/%m/%Y', ard_min)
23+ actual_receipt_date = time.strftime('%d/%m/%Y', time.strptime(o.date_done, '%Y-%m-%d %H:%M:%S'))
24 return actual_receipt_date
25
26 def get_lines(self, o):
27 return o.move_lines
28
29+
30 report_sxw.report_sxw('report.msf.report_reception_in', 'stock.picking', 'addons/msf_printed_documents/report/report_reception.rml', parser=report_reception, header=False)
31
32 # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

Subscribers

People subscribed via source and target branches