Merge lp:~unifield-team/unifield-wm/UF-2312 into lp:unifield-wm

Proposed by jftempo
Status: Needs review
Proposed branch: lp:~unifield-team/unifield-wm/UF-2312
Merge into: lp:unifield-wm
Diff against target: 165 lines (+46/-26)
3 files modified
account_hq_entries/hq_entries.py (+3/-0)
msf_printed_documents/report/report_reception.py (+26/-10)
msf_printed_documents/report/report_reception.rml (+17/-16)
To merge this branch: bzr merge lp:~unifield-team/unifield-wm/UF-2312
Reviewer Review Type Date Requested Status
UniField Reviewer Team Pending
Review via email: mp+202826@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

1961. By Sean Carroll <sean@sean-msf>

UF-2312: [FIX] added check for hq correctable

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_hq_entries/hq_entries.py'
2--- account_hq_entries/hq_entries.py 2014-01-13 13:44:46 +0000
3+++ account_hq_entries/hq_entries.py 2014-01-23 10:32:19 +0000
4@@ -227,6 +227,9 @@
5 if line.user_validated == True:
6 res = True
7 break
8+ if line.account_id.is_not_hq_correctible:
9+ res = True
10+ break
11 return res
12
13 def get_linked_lines(self, cr, uid, ids, context=None):
14
15=== modified file 'msf_printed_documents/report/report_reception.py'
16--- msf_printed_documents/report/report_reception.py 2013-03-06 13:23:42 +0000
17+++ msf_printed_documents/report/report_reception.py 2014-01-23 10:32:19 +0000
18@@ -51,6 +51,10 @@
19 'getQtyIS': self.getQtyIS,
20 'getWarning': self.getWarning,
21 'getOriginRef': self.getOriginRef,
22+ 'getBatch': self.getBatch,
23+ 'getExpDate': self.getExpDate,
24+ 'getActualReceiptDate': self.getActualReceiptDate,
25+ 'getQtyBO': self.getQtyBO,
26 })
27
28 def getOriginRef(self,o):
29@@ -79,14 +83,17 @@
30 return warn
31
32 def getQtyPO(self,line):
33- if line.picking_id:
34- for x in line.picking_id.move_lines:
35- if x.line_number == line.line_number:
36- return x.product_qty
37- return False
38-
39- def getQtyIS(self,line):
40- return line.product_qty
41+ val = line.purchase_line_id.product_qty if line.purchase_line_id else 0
42+ return "{0:.2f}".format(val)
43+
44+ def getQtyBO(self,line,o):
45+ val = (line.purchase_line_id.product_qty - line.product_qty) if o.state == 'done' else 0
46+ return "{0:.2f}".format(val)
47+
48+ def getQtyIS(self,line,o):
49+ val = line.product_qty if o.state == 'done' else 0
50+ return "{0:.2f}".format(val)
51+
52
53 def getProject(self,o):
54 return o and o.purchase_id and o.purchase_id.dest_address_id and o.purchase_id.dest_address_id.name or False
55@@ -148,8 +155,17 @@
56
57 def getDateCreation(self, o):
58 return time.strftime('%d-%b-%Y', time.strptime(o.creation_date,'%Y-%m-%d %H:%M:%S'))
59-
60-
61+
62+ def getBatch(self, line):
63+ return line.prodlot_id.name
64+
65+ def getExpDate(self, line):
66+ return time.strftime('%d/%m/%Y', time.strptime(line.prodlot_id.life_date,'%Y-%m-%d'))
67+
68+
69+ def getActualReceiptDate(self,o):
70+ return time.strftime('%d/%m/%Y', time.strptime(o.date_done,'%Y-%m-%d %H:%M:%S'))
71+
72 def get_lines(self, o):
73 return o.move_lines
74
75
76=== modified file 'msf_printed_documents/report/report_reception.rml'
77--- msf_printed_documents/report/report_reception.rml 2013-03-06 13:23:42 +0000
78+++ msf_printed_documents/report/report_reception.rml 2014-01-23 10:32:19 +0000
79@@ -198,7 +198,7 @@
80 <lineStyle kind="LINEBELOW" colorName="black" thickness="0.5" />
81 </blockTableStyle>
82
83-
84+[[ getExpDate(line) ]]
85
86 <blockTableStyle id="LinesTable2">
87
88@@ -275,6 +275,7 @@
89
90 <blockTable colWidths="800.0" >
91 <tr><td><para style="Standard">Expected Receipt Date : [[ getERD(objects[0]) ]]</para></td></tr>
92+ <tr><td><para style="Standard">Actual Receipt Date : [[ getERD(objects[0]) ]]</para></td></tr>
93 </blockTable>
94
95 <blockTable colWidths="800.0" >
96@@ -478,14 +479,14 @@
97
98 <tr>
99 <td>
100- <blockTable colWidths="30,375,50,50,50,60,75,50,20,20,20" style="OrderInformations3">
101+ <blockTable colWidths="30,365,50,50,50,60,75,60,20,20,20" style="OrderInformations3">
102 <tr>
103 <td>
104 <para style="TextInformation4" alignment="CENTER">Item</para>
105 </td>
106
107 <td>
108- <blockTable colWidths="75,300" style="OrderInformations4">
109+ <blockTable colWidths="65,300" style="OrderInformations4">
110 <tr>
111 <td>
112 <para style="TextInformation" alignment="LEFT">Code</para>
113@@ -510,7 +511,7 @@
114 <para style="TextInformation5" alignment="CENTER">Qty confirmed</para>
115 </td>
116 <td>
117- <para style="TextInformation5" alignment="CENTER">Unity of Measure</para>
118+ <para style="TextInformation5" alignment="CENTER">Unit of Measure</para>
119 </td>
120 <td>
121 <para style="TextInformation5" alignment="CENTER">Qty backorder</para>
122@@ -547,14 +548,14 @@
123 <tr>
124 [[ repeatIn(get_lines(objects[0]), 'line') ]]
125 <td>
126- <blockTable colWidths="30,375,50,50,50,60,75,50,20,20,20" style="OrderInformations3">
127+ <blockTable colWidths="30,365,50,50,50,60,75,60,20,20,20" style="OrderInformations3">
128 <tr>
129 <td>
130 <para style="TextInformation4" alignment="CENTER">[[ getNbItem() ]]</para>
131 </td>
132
133 <td>
134- <blockTable colWidths="75,300" style="OrderInformations4">
135+ <blockTable colWidths="65,300" style="OrderInformations4">
136 <tr>
137 <td>
138 <para style="TextInformationSpe" alignment="CENTER">[[ line.product_id and line.product_id.default_code or False ]]</para>
139@@ -582,16 +583,16 @@
140 <para style="TextInformation4" alignment="CENTER">[[ line.product_uom and line.product_uom.name or False ]]</para>
141 </td>
142 <td>
143- <para style="TextInformation4" alignment="CENTER">[[ getQtyIS(line) ]]</para>
144- </td>
145- <td>
146- <para style="TextInformation4" alignment="CENTER"></para>
147- </td>
148- <td>
149- <para style="TextInformation4" alignment="CENTER"></para>
150- </td>
151- <td>
152- <para style="TextInformation4" alignment="CENTER"></para>
153+ <para style="TextInformation4" alignment="CENTER">[[ getQtyBO(line,objects[0]) ]]</para>
154+ </td>
155+ <td>
156+ <para style="TextInformation4" alignment="CENTER">[[ getQtyIS(line,objects[0]) ]]</para>
157+ </td>
158+ <td>
159+ <para style="TextInformation4" alignment="CENTER">[[ getBatch(line) ]]</para>
160+ </td>
161+ <td>
162+ <para style="TextInformation4" alignment="CENTER">[[ getExpDate(line) ]]</para>
163 </td>
164 <td>
165 <para style="TextInformation4" alignment="CENTER">[[ check(line,'kc') ]]</para>

Subscribers

People subscribed via source and target branches