Merge lp:~jfb-tempo-consulting/unifield-server/US-7848 into lp:unifield-server
- US-7848
- Merge into trunk
Proposed by
jftempo
Status: | Merged |
---|---|
Merged at revision: | 5906 |
Proposed branch: | lp:~jfb-tempo-consulting/unifield-server/US-7848 |
Merge into: | lp:unifield-server |
Diff against target: |
1345 lines (+213/-181) 34 files modified
bin/addons/analytic_distribution/analytic_line.py (+1/-1) bin/addons/msf_doc_import/wizard/wizard_in_simulation_screen.py (+2/-2) bin/addons/msf_outgoing/msf_outgoing.py (+2/-2) bin/addons/msf_outgoing/report/empty_picking_ticket.rml (+3/-3) bin/addons/msf_outgoing/report/freight_manifest.rml (+2/-2) bin/addons/msf_outgoing/report/freight_manifest_xls.mako (+3/-3) bin/addons/msf_outgoing/report/labels.rml (+1/-1) bin/addons/msf_outgoing/report/packing_list.rml (+2/-2) bin/addons/msf_outgoing/report/packing_list_xls.mako (+2/-2) bin/addons/msf_outgoing/report/picking_ticket.rml (+3/-3) bin/addons/msf_outgoing/report/pre_packing_excel_report_xls.mako (+3/-3) bin/addons/msf_outgoing/wizard/incoming_shipment_processor.py (+2/-2) bin/addons/msf_outgoing/wizard/internal_move_processor.py (+2/-2) bin/addons/msf_outgoing/wizard/outgoing_delivery_processor.py (+2/-2) bin/addons/msf_outgoing/wizard/picking_processor.py (+8/-8) bin/addons/msf_outgoing/wizard/return_ppl_processor.py (+2/-2) bin/addons/msf_printed_documents/report/report_reception.rml (+1/-1) bin/addons/msf_profile/data/patches.xml (+3/-0) bin/addons/msf_profile/i18n/en_MF.po (+1/-1) bin/addons/msf_profile/i18n/fr_MF.po (+29/-32) bin/addons/msf_profile/msf_profile.py (+32/-19) bin/addons/msf_supply_doc_export/report/report_pick_export_xls.mako (+2/-2) bin/addons/product_attributes/product_attributes.py (+38/-40) bin/addons/product_attributes/product_attributes_data.xml (+20/-0) bin/addons/product_attributes/product_attributes_view.xml (+5/-3) bin/addons/specific_rules/specific_rules.py (+14/-14) bin/addons/stock/physical_inventory.py (+1/-1) bin/addons/stock/physical_inventory_view.xml (+3/-3) bin/addons/stock/report/physical_inventory_counting_sheet.py (+3/-4) bin/addons/stock/stock_move.py (+13/-13) bin/addons/stock/stock_production_lot.py (+4/-4) bin/addons/stock/wizard/physical_inventory_select_products.py (+2/-2) bin/addons/stock/wizard/physical_inventory_select_products_view.xml (+1/-1) bin/addons/stock_forecast/wizard/stock_forecast.py (+1/-1) |
To merge this branch: | bzr merge lp:~jfb-tempo-consulting/unifield-server/US-7848 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
UniField Reviewer Team | Pending | ||
Review via email: mp+394739@code.launchpad.net |
Commit message
Description of the change
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/analytic_distribution/analytic_line.py' |
2 | --- bin/addons/analytic_distribution/analytic_line.py 2020-10-30 17:31:31 +0000 |
3 | +++ bin/addons/analytic_distribution/analytic_line.py 2020-12-02 10:15:56 +0000 |
4 | @@ -533,7 +533,7 @@ |
5 | # - cost center and funding pool compatibility |
6 | if not ad_obj.check_fp_cc_compatibility(cr, uid, new_fp_id, new_cc_id, context=context): |
7 | # not compatible with CC |
8 | - res.append((id, entry_sequence, _('CC'))) |
9 | + res.append((id, entry_sequence, _('CC '))) |
10 | return False |
11 | |
12 | # - destination / account |
13 | |
14 | === modified file 'bin/addons/msf_doc_import/wizard/wizard_in_simulation_screen.py' |
15 | --- bin/addons/msf_doc_import/wizard/wizard_in_simulation_screen.py 2020-10-27 16:40:36 +0000 |
16 | +++ bin/addons/msf_doc_import/wizard/wizard_in_simulation_screen.py 2020-12-02 10:15:56 +0000 |
17 | @@ -1300,7 +1300,7 @@ |
18 | res[line.id] = { |
19 | 'lot_check': product.batch_management, |
20 | 'exp_check': product.perishable, |
21 | - 'kc_check': product.kc_txt, |
22 | + 'kc_check': product.is_kc and 'X', |
23 | 'dg_check': product.dg_txt, |
24 | 'np_check': product.cs_txt, |
25 | 'move_price_unit': price_unit, |
26 | @@ -1412,7 +1412,7 @@ |
27 | method=True, |
28 | type='char', |
29 | size=8, |
30 | - string='KC', |
31 | + string='CC', |
32 | readonly=True, |
33 | store=False, |
34 | multi='computed', |
35 | |
36 | === modified file 'bin/addons/msf_outgoing/msf_outgoing.py' |
37 | --- bin/addons/msf_outgoing/msf_outgoing.py 2020-11-03 15:36:10 +0000 |
38 | +++ bin/addons/msf_outgoing/msf_outgoing.py 2020-12-02 10:15:56 +0000 |
39 | @@ -1692,7 +1692,7 @@ |
40 | 'volume': fields.float(digits=(16, 2), string=u'Volume[dm³]'), |
41 | 'weight': fields.float(digits=(16, 2), string='Weight[kg]'), |
42 | 'value': fields.float('Value', help='Total Value of the additional item. The value is to be defined in the currency selected for the partner.'), # The string is modified in the fields_view_get |
43 | - 'kc': fields.boolean('KC', help='Defines whether the additional item is to be kept cool.'), |
44 | + 'kc': fields.boolean('CC', help='Defines whether the additional item must respect the cold chain.'), |
45 | 'dg': fields.boolean('DG', help='Defines whether the additional item is a dangerous good.'), |
46 | 'cs': fields.boolean('CS', help='Defines whether the additional item is a controlled substance.'), |
47 | } |
48 | @@ -2333,7 +2333,7 @@ |
49 | 'is_dangerous_good': fields.function(_is_one_of_the_move_lines, method=True, |
50 | type='char', size=8, string='Dangerous Good'), |
51 | 'is_keep_cool': fields.function(_is_one_of_the_move_lines, method=True, |
52 | - type='char', size=8, string='Keep Cool'), |
53 | + type='char', size=8, string='Cold Chain'), |
54 | 'is_narcotic': fields.function(_is_one_of_the_move_lines, method=True, |
55 | type='char', size=8, string='CS'), |
56 | 'overall_qty': fields.function(_get_overall_qty, method=True, fnct_search=_qty_search, type='float', string='Overall Qty', |
57 | |
58 | === modified file 'bin/addons/msf_outgoing/report/empty_picking_ticket.rml' |
59 | --- bin/addons/msf_outgoing/report/empty_picking_ticket.rml 2020-08-24 19:43:15 +0000 |
60 | +++ bin/addons/msf_outgoing/report/empty_picking_ticket.rml 2020-12-02 10:15:56 +0000 |
61 | @@ -307,7 +307,7 @@ |
62 | <para style="LineHeader">Expiry Date</para> |
63 | </td> |
64 | <td> |
65 | - <para style="LineHeader">KC</para> |
66 | + <para style="LineHeader">CC</para> |
67 | </td> |
68 | <td> |
69 | <para style="LineHeader">DG</para> |
70 | @@ -466,7 +466,7 @@ |
71 | <para style="LineHeader">Expiry Date</para> |
72 | </td> |
73 | <td> |
74 | - <para style="LineHeader">KC</para> |
75 | + <para style="LineHeader">CC</para> |
76 | </td> |
77 | <td> |
78 | <para style="LineHeader">DG</para> |
79 | @@ -562,7 +562,7 @@ |
80 | <para style="LineValue">[[ m.prodlot_id and formatLang(m.prodlot_id.life_date, date=True) or '' ]]</para> |
81 | </td> |
82 | <td> |
83 | - <para style="LineValue">[[ m.product_id.kc_txt or ' ' ]]</para> |
84 | + <para style="LineValue">[[ m.product_id.is_kc and 'X' or ' ' ]]</para> |
85 | </td> |
86 | <td> |
87 | <para style="LineValue">[[ m.product_id.dg_txt or ' ' ]]</para> |
88 | |
89 | === modified file 'bin/addons/msf_outgoing/report/freight_manifest.rml' |
90 | --- bin/addons/msf_outgoing/report/freight_manifest.rml 2020-10-28 16:59:15 +0000 |
91 | +++ bin/addons/msf_outgoing/report/freight_manifest.rml 2020-12-02 10:15:56 +0000 |
92 | @@ -511,7 +511,7 @@ |
93 | <para style="TextInformation5" alignment="CENTER">Value</para> |
94 | </td> |
95 | <td> |
96 | - <para style="TextInformation5" alignment="CENTER">KC</para> |
97 | + <para style="TextInformation5" alignment="CENTER">CC</para> |
98 | </td> |
99 | <td> |
100 | <para style="TextInformation5" alignment="CENTER">DG</para> |
101 | @@ -623,7 +623,7 @@ |
102 | <para style="TextInformation5" alignment="CENTER">Value</para> |
103 | </td> |
104 | <td> |
105 | - <para style="TextInformation5" alignment="CENTER">KC</para> |
106 | + <para style="TextInformation5" alignment="CENTER">CC</para> |
107 | </td> |
108 | <td> |
109 | <para style="TextInformation5" alignment="CENTER">DG</para> |
110 | |
111 | === modified file 'bin/addons/msf_outgoing/report/freight_manifest_xls.mako' |
112 | --- bin/addons/msf_outgoing/report/freight_manifest_xls.mako 2020-09-22 13:12:41 +0000 |
113 | +++ bin/addons/msf_outgoing/report/freight_manifest_xls.mako 2020-12-02 10:15:56 +0000 |
114 | @@ -190,7 +190,7 @@ |
115 | <Column ss:AutoFitWidth="1" ss:Width="55" /> |
116 | # Description |
117 | <Column ss:AutoFitWidth="1" ss:Width="70" /> |
118 | - # KC |
119 | + # CC |
120 | <Column ss:AutoFitWidth="1" ss:Width="30" /> |
121 | # DG |
122 | <Column ss:AutoFitWidth="1" ss:Width="30" /> |
123 | @@ -295,7 +295,7 @@ |
124 | <Cell ss:StyleID="header"><Data ss:Type="String">${_('Kgs')}</Data></Cell> |
125 | <Cell ss:StyleID="header"><Data ss:Type="String">${_('m³')}</Data></Cell> |
126 | <Cell ss:StyleID="header"><Data ss:Type="String">${_('Value')}</Data></Cell> |
127 | - <Cell ss:StyleID="header"><Data ss:Type="String">${_('KC')}</Data></Cell> |
128 | + <Cell ss:StyleID="header"><Data ss:Type="String">${_('CC')}</Data></Cell> |
129 | <Cell ss:StyleID="header"><Data ss:Type="String">${_('DG')}</Data></Cell> |
130 | <Cell ss:StyleID="header"><Data ss:Type="String">${_('CS')}</Data></Cell> |
131 | </Row> |
132 | @@ -336,7 +336,7 @@ |
133 | <Cell ss:StyleID="header"><Data ss:Type="String">${_('Kgs')|x}</Data></Cell> |
134 | <Cell ss:StyleID="header"><Data ss:Type="String">${_('m³')|x}</Data></Cell> |
135 | <Cell ss:StyleID="header"><Data ss:Type="String">${_('Value')|x}</Data></Cell> |
136 | - <Cell ss:StyleID="header"><Data ss:Type="String">${_('KC')|x}</Data></Cell> |
137 | + <Cell ss:StyleID="header"><Data ss:Type="String">${_('CC')|x}</Data></Cell> |
138 | <Cell ss:StyleID="header"><Data ss:Type="String">${_('DG')|x}</Data></Cell> |
139 | <Cell ss:StyleID="header"><Data ss:Type="String">${_('CS')|x}</Data></Cell> |
140 | </Row> |
141 | |
142 | === modified file 'bin/addons/msf_outgoing/report/labels.rml' |
143 | --- bin/addons/msf_outgoing/report/labels.rml 2019-06-07 13:08:23 +0000 |
144 | +++ bin/addons/msf_outgoing/report/labels.rml 2020-12-02 10:15:56 +0000 |
145 | @@ -167,7 +167,7 @@ |
146 | <para style="P4">[[ translate('Specific Information:') ]]</para> |
147 | </td> |
148 | <td> |
149 | - <para style="P2">[[ stock_picking.is_keep_cool and translate('KC / ') or ' ' ]][[ stock_picking.is_dangerous_good and translate('DG / ') or ' ' ]][[ stock_picking.is_narcotic and translate('CS') or ' ' ]]</para> |
150 | + <para style="P2">[[ stock_picking.is_keep_cool and translate('CC / ') or ' ' ]][[ stock_picking.is_dangerous_good and translate('DG / ') or ' ' ]][[ stock_picking.is_narcotic and translate('CS') or ' ' ]]</para> |
151 | </td> |
152 | </tr> |
153 | </blockTable> |
154 | |
155 | === modified file 'bin/addons/msf_outgoing/report/packing_list.rml' |
156 | --- bin/addons/msf_outgoing/report/packing_list.rml 2020-07-29 07:33:16 +0000 |
157 | +++ bin/addons/msf_outgoing/report/packing_list.rml 2020-12-02 10:15:56 +0000 |
158 | @@ -274,7 +274,7 @@ |
159 | <para style="ParcelLineTitle">Exp. Date</para> |
160 | </td> |
161 | <td> |
162 | - <para style="ParcelLineTitle">KC</para> |
163 | + <para style="ParcelLineTitle">CC</para> |
164 | </td> |
165 | <td> |
166 | <para style="ParcelLineTitle">DG</para> |
167 | @@ -310,7 +310,7 @@ |
168 | <para style="ParcelLineValue">[[ formatLang(m.prodlot_id.life_date, date=True) ]]</para> |
169 | </td> |
170 | <td> |
171 | - <para style="ParcelLineValue">[[ m.product_id.kc_txt or ' ' ]]</para> |
172 | + <para style="ParcelLineValue">[[ m.product_id.is_kc and 'X' or ' ' ]]</para> |
173 | </td> |
174 | <td> |
175 | <para style="ParcelLineValue">[[ m.product_id.dg_txt or ' ' ]]</para> |
176 | |
177 | === modified file 'bin/addons/msf_outgoing/report/packing_list_xls.mako' |
178 | --- bin/addons/msf_outgoing/report/packing_list_xls.mako 2019-03-25 15:14:48 +0000 |
179 | +++ bin/addons/msf_outgoing/report/packing_list_xls.mako 2020-12-02 10:15:56 +0000 |
180 | @@ -443,7 +443,7 @@ |
181 | <Cell ss:StyleID="s136"><Data ss:Type="String">${_('Total Qty.')|x}</Data></Cell> |
182 | <Cell ss:StyleID="s131"><Data ss:Type="String">${_('Batch')|x}</Data></Cell> |
183 | <Cell ss:StyleID="s131"><Data ss:Type="String">${_('Exp. Date')|x}</Data></Cell> |
184 | - <Cell ss:StyleID="s131"><Data ss:Type="String">${_('KC')|x}</Data></Cell> |
185 | + <Cell ss:StyleID="s131"><Data ss:Type="String">${_('CC')|x}</Data></Cell> |
186 | <Cell ss:StyleID="s131"><Data ss:Type="String">${_('DG')|x}</Data></Cell> |
187 | <Cell ss:StyleID="s131"><Data ss:Type="String">${_('CS')|x}</Data></Cell> |
188 | </Row> |
189 | @@ -460,7 +460,7 @@ |
190 | % else: |
191 | <Cell ss:StyleID="s134"><Data ss:Type="String"></Data></Cell> |
192 | % endif |
193 | - <Cell ss:StyleID="s134"><Data ss:Type="String">${(m.product_id.kc_txt or '')|x}</Data></Cell> |
194 | + <Cell ss:StyleID="s134"><Data ss:Type="String">${(m.product_id.is_kc and 'X' or '')|x}</Data></Cell> |
195 | <Cell ss:StyleID="s134"><Data ss:Type="String">${(m.product_id.dg_txt or '')|x}</Data></Cell> |
196 | <Cell ss:StyleID="s134"><Data ss:Type="String">${(m.product_id.cs_txt or '')|x}</Data></Cell> |
197 | </Row> |
198 | |
199 | === modified file 'bin/addons/msf_outgoing/report/picking_ticket.rml' |
200 | --- bin/addons/msf_outgoing/report/picking_ticket.rml 2020-06-18 15:56:24 +0000 |
201 | +++ bin/addons/msf_outgoing/report/picking_ticket.rml 2020-12-02 10:15:56 +0000 |
202 | @@ -294,7 +294,7 @@ |
203 | <para style="LineHeader">Expiry Date</para> |
204 | </td> |
205 | <td> |
206 | - <para style="LineHeader">KC</para> |
207 | + <para style="LineHeader">CC</para> |
208 | </td> |
209 | <td> |
210 | <para style="LineHeader">DG</para> |
211 | @@ -378,7 +378,7 @@ |
212 | <para style="LineHeader">Expiry Date</para> |
213 | </td> |
214 | <td> |
215 | - <para style="LineHeader">KC</para> |
216 | + <para style="LineHeader">CC</para> |
217 | </td> |
218 | <td> |
219 | <para style="LineHeader">DG</para> |
220 | @@ -465,7 +465,7 @@ |
221 | <para style="LineValue">[[ m.prodlot_id and formatLang(m.prodlot_id.life_date, date=True) or '' ]]</para> |
222 | </td> |
223 | <td> |
224 | - <para style="LineValue">[[ m.product_id.kc_txt or ' ' ]]</para> |
225 | + <para style="LineValue">[[ m.product_id.is_kc and 'X' or ' ' ]]</para> |
226 | </td> |
227 | <td> |
228 | <para style="LineValue">[[ m.product_id.dg_txt or ' ' ]]</para> |
229 | |
230 | === modified file 'bin/addons/msf_outgoing/report/pre_packing_excel_report_xls.mako' |
231 | --- bin/addons/msf_outgoing/report/pre_packing_excel_report_xls.mako 2019-02-06 08:24:45 +0000 |
232 | +++ bin/addons/msf_outgoing/report/pre_packing_excel_report_xls.mako 2020-12-02 10:15:56 +0000 |
233 | @@ -165,7 +165,7 @@ |
234 | <Column ss:AutoFitWidth="1" ss:Width="100.0" /> |
235 | ## Expiry Date # |
236 | <Column ss:AutoFitWidth="1" ss:Width="85.0" /> |
237 | - ## KC |
238 | + ## CC |
239 | <Column ss:AutoFitWidth="1" ss:Width="20.0" /> |
240 | ## DG |
241 | <Column ss:AutoFitWidth="1" ss:Width="20.0" /> |
242 | @@ -257,7 +257,7 @@ |
243 | _('Total Qty to pack'), |
244 | _('Batch #'), |
245 | _('Expiry Date #'), |
246 | - _('KC'), |
247 | + _('CC'), |
248 | _('DG'), |
249 | _('CS'), |
250 | _('Qty Packed'), |
251 | @@ -290,7 +290,7 @@ |
252 | <Cell ss:StyleID="line_center"><Data ss:Type="String"></Data></Cell> |
253 | <Cell ss:StyleID="short_date_center"><Data ss:Type="String"></Data></Cell> |
254 | % endif |
255 | - <Cell ss:StyleID="line_center"><Data ss:Type="String">${m.product_id.kc_txt or ''|x}</Data></Cell> |
256 | + <Cell ss:StyleID="line_center"><Data ss:Type="String">${m.product_id.is_kc and 'X' or ''|x}</Data></Cell> |
257 | <Cell ss:StyleID="line_center"><Data ss:Type="String">${m.product_id.dg_txt or ''|x}</Data></Cell> |
258 | <Cell ss:StyleID="line_center"><Data ss:Type="String">${m.product_id.cs_txt or ''|x}</Data></Cell> |
259 | <Cell ss:StyleID="line_center"><Data ss:Type="Number"></Data></Cell> |
260 | |
261 | === modified file 'bin/addons/msf_outgoing/wizard/incoming_shipment_processor.py' |
262 | --- bin/addons/msf_outgoing/wizard/incoming_shipment_processor.py 2020-10-09 12:11:21 +0000 |
263 | +++ bin/addons/msf_outgoing/wizard/incoming_shipment_processor.py 2020-12-02 10:15:56 +0000 |
264 | @@ -1141,7 +1141,7 @@ |
265 | 'kc_check': fields.function( |
266 | _get_product_info, |
267 | method=True, |
268 | - string='KC', |
269 | + string='CC', |
270 | type='char', |
271 | size=8, |
272 | store={ |
273 | @@ -1149,7 +1149,7 @@ |
274 | }, |
275 | readonly=True, |
276 | multi='product_info', |
277 | - help="Ticked if the product is a Heat Sensitive Item", |
278 | + help="Ticked if the product is a cold Chain Item", |
279 | ), |
280 | 'ssl_check': fields.function( |
281 | _get_product_info, |
282 | |
283 | === modified file 'bin/addons/msf_outgoing/wizard/internal_move_processor.py' |
284 | --- bin/addons/msf_outgoing/wizard/internal_move_processor.py 2020-09-25 15:16:18 +0000 |
285 | +++ bin/addons/msf_outgoing/wizard/internal_move_processor.py 2020-12-02 10:15:56 +0000 |
286 | @@ -617,7 +617,7 @@ |
287 | 'kc_check': fields.function( |
288 | _get_product_info, |
289 | method=True, |
290 | - string='KC', |
291 | + string='CC', |
292 | type='char', |
293 | size=8, |
294 | store={ |
295 | @@ -625,7 +625,7 @@ |
296 | }, |
297 | readonly=True, |
298 | multi='product_info', |
299 | - help="Ticked if the product is a Heat Sensitive Item", |
300 | + help="Ticked if the product is a Cold Chain Item", |
301 | ), |
302 | 'ssl_check': fields.function( |
303 | _get_product_info, |
304 | |
305 | === modified file 'bin/addons/msf_outgoing/wizard/outgoing_delivery_processor.py' |
306 | --- bin/addons/msf_outgoing/wizard/outgoing_delivery_processor.py 2020-09-25 15:16:18 +0000 |
307 | +++ bin/addons/msf_outgoing/wizard/outgoing_delivery_processor.py 2020-12-02 10:15:56 +0000 |
308 | @@ -368,7 +368,7 @@ |
309 | 'kc_check': fields.function( |
310 | _get_product_info, |
311 | method=True, |
312 | - string='KC', |
313 | + string='CC', |
314 | type='char', |
315 | size=8, |
316 | store={ |
317 | @@ -376,7 +376,7 @@ |
318 | }, |
319 | readonly=True, |
320 | multi='product_info', |
321 | - help="Ticked if the product is a Heat Sensitive Item", |
322 | + help="Ticked if the product is a Cold Chain Item", |
323 | ), |
324 | 'ssl_check': fields.function( |
325 | _get_product_info, |
326 | |
327 | === modified file 'bin/addons/msf_outgoing/wizard/picking_processor.py' |
328 | --- bin/addons/msf_outgoing/wizard/picking_processor.py 2020-10-27 16:40:36 +0000 |
329 | +++ bin/addons/msf_outgoing/wizard/picking_processor.py 2020-12-02 10:15:56 +0000 |
330 | @@ -39,7 +39,7 @@ |
331 | |
332 | def _get_moves_product_info(self, cr, uid, ids, field_name, args, context=None): |
333 | """ |
334 | - Returns True of False for each line if the line contains a dangerous or keep cool product |
335 | + Returns True of False for each line if the line contains a dangerous or cold chain product |
336 | """ |
337 | # Objects |
338 | line_obj = self.pool.get(self._columns['move_ids']._obj) |
339 | @@ -58,7 +58,7 @@ |
340 | 'contains_dg': False, |
341 | 'forbidden_product': False |
342 | } |
343 | - # KC |
344 | + # CC |
345 | kc_lines = line_obj.search(cr, uid, [ |
346 | ('wizard_id', '=', wizard_id), |
347 | ('kc_check', '!=', ''), |
348 | @@ -131,11 +131,11 @@ |
349 | 'contains_kc': fields.function( |
350 | _get_moves_product_info, |
351 | method=True, |
352 | - string='Contains Keep Cool goods', |
353 | + string='Contains Cold Chain goods', |
354 | type='boolean', |
355 | store=False, |
356 | readonly=True, |
357 | - help="Is at least one line contains a keep cool product.", |
358 | + help="Is at least one line contains a cool chain product.", |
359 | multi='kc_dg', |
360 | ), |
361 | } |
362 | @@ -380,7 +380,7 @@ |
363 | 'perishable', |
364 | 'type', |
365 | 'subtype', |
366 | - 'kc_txt', |
367 | + 'is_kc', |
368 | 'ssl_txt', |
369 | 'dg_txt', |
370 | 'cs_txt',], |
371 | @@ -398,7 +398,7 @@ |
372 | 'kit_check': product['type'] == 'product' and |
373 | product['subtype'] == 'kit' and not |
374 | product['perishable'], |
375 | - 'kc_check': product['kc_txt'], |
376 | + 'kc_check': product['is_kc'] and 'X', |
377 | 'ssl_check': product['ssl_txt'], |
378 | 'dg_check': product['dg_txt'], |
379 | 'np_check': product['cs_txt'], |
380 | @@ -704,7 +704,7 @@ |
381 | 'kc_check': fields.function( |
382 | _get_product_info, |
383 | method=True, |
384 | - string='KC', |
385 | + string='CC', |
386 | type='char', |
387 | size=8, |
388 | store={ |
389 | @@ -712,7 +712,7 @@ |
390 | }, |
391 | readonly=True, |
392 | multi='product_info', |
393 | - help="Ticked if the product is a Heat Sensitive Item", |
394 | + help="Ticked if the product is a Cold Chain Item", |
395 | ), |
396 | 'ssl_check': fields.function( |
397 | _get_product_info, |
398 | |
399 | === modified file 'bin/addons/msf_outgoing/wizard/return_ppl_processor.py' |
400 | --- bin/addons/msf_outgoing/wizard/return_ppl_processor.py 2019-04-11 16:48:11 +0000 |
401 | +++ bin/addons/msf_outgoing/wizard/return_ppl_processor.py 2020-12-02 10:15:56 +0000 |
402 | @@ -267,7 +267,7 @@ |
403 | 'kc_check': fields.function( |
404 | _get_product_info, |
405 | method=True, |
406 | - string='KC', |
407 | + string='CC', |
408 | type='char', |
409 | size=8, |
410 | store={ |
411 | @@ -275,7 +275,7 @@ |
412 | }, |
413 | readonly=True, |
414 | multi='product_info', |
415 | - help="Ticked if the product is a Heat Sensitive Item", |
416 | + help="Ticked if the product is a Cold Chain Item", |
417 | ), |
418 | 'ssl_check': fields.function( |
419 | _get_product_info, |
420 | |
421 | === modified file 'bin/addons/msf_printed_documents/report/report_reception.rml' |
422 | --- bin/addons/msf_printed_documents/report/report_reception.rml 2020-08-06 14:14:54 +0000 |
423 | +++ bin/addons/msf_printed_documents/report/report_reception.rml 2020-12-02 10:15:56 +0000 |
424 | @@ -597,7 +597,7 @@ |
425 | <para style="TextInformation4" alignment="CENTER">BM</para> <!-- 18 --> |
426 | </td> |
427 | <td> |
428 | - <para style="TextInformation4" alignment="CENTER">KC</para> <!-- 18 --> |
429 | + <para style="TextInformation4" alignment="CENTER">CC</para> <!-- 18 --> |
430 | </td> |
431 | <td> |
432 | <para style="TextInformation4" alignment="CENTER">DG</para> <!-- 18 --> |
433 | |
434 | === modified file 'bin/addons/msf_profile/data/patches.xml' |
435 | --- bin/addons/msf_profile/data/patches.xml 2020-11-13 11:25:30 +0000 |
436 | +++ bin/addons/msf_profile/data/patches.xml 2020-12-02 10:15:56 +0000 |
437 | @@ -630,5 +630,8 @@ |
438 | <field name="method">us_7808_ocg_rename_esc</field> |
439 | </record> |
440 | |
441 | + <record id="us_7848_cold_chain" model="patch.scripts"> |
442 | + <field name="method">us_7848_cold_chain</field> |
443 | + </record> |
444 | </data> |
445 | </openerp> |
446 | |
447 | === modified file 'bin/addons/msf_profile/i18n/en_MF.po' |
448 | --- bin/addons/msf_profile/i18n/en_MF.po 2019-07-30 12:57:31 +0000 |
449 | +++ bin/addons/msf_profile/i18n/en_MF.po 2020-12-02 10:15:56 +0000 |
450 | @@ -929,7 +929,7 @@ |
451 | #: code:addons/msf_doc_import/wizard/__init__.py:134 |
452 | #, python-format |
453 | msgid "ppl_import_update_kc" |
454 | -msgstr "KC" |
455 | +msgstr "CC" |
456 | |
457 | #. module: msf_doc_import |
458 | #: code:addons/msf_doc_import/wizard/__init__.py:134 |
459 | |
460 | === modified file 'bin/addons/msf_profile/i18n/fr_MF.po' |
461 | --- bin/addons/msf_profile/i18n/fr_MF.po 2020-11-12 16:19:32 +0000 |
462 | +++ bin/addons/msf_profile/i18n/fr_MF.po 2020-12-02 10:15:56 +0000 |
463 | @@ -1156,7 +1156,6 @@ |
464 | #. modules: account, register_accounting, analytic_distribution |
465 | #: report:addons/register_accounting/report/fully_report_xls.mako:575 |
466 | #: view:account.analytic.line:0 |
467 | -#: code:addons/analytic_distribution/analytic_line.py:527 |
468 | msgid "CC" |
469 | msgstr "CC" |
470 | |
471 | @@ -7590,8 +7589,8 @@ |
472 | #: model:ir.actions.act_window,name:product_attributes.product_cold_chain_action |
473 | #: model:ir.ui.menu,name:product_attributes.menu_cold_chain_product |
474 | #: view:product.cold_chain:0 |
475 | -msgid "Cold chain" |
476 | -msgstr "Chaîne du froid" |
477 | +msgid "Thermosensitivity" |
478 | +msgstr "Thermosensibilité" |
479 | |
480 | #. module: return_claim |
481 | #: code:addons/return_claim/return_claim.py:924 |
482 | @@ -16517,6 +16516,7 @@ |
483 | #: report:addons/procurement_cycle/report/replenishment_inventory_review.mako:991 |
484 | #: report:addons/procurement_cycle/report/replenishment_order_calc.mako:439 |
485 | #: report:addons/procurement_cycle/report/replenishment_order_calc.mako:461 |
486 | +#: report:addons/msf_outgoing/report/freight_manifest_xls.mako:266 |
487 | #, python-format |
488 | msgid "No" |
489 | msgstr "Non" |
490 | @@ -17282,11 +17282,6 @@ |
491 | msgid "Qty Packed" |
492 | msgstr "Qté Colisée" |
493 | |
494 | -#. module: product_attributes |
495 | -#: model:ir.model,name:product_attributes.model_product_cold_chain |
496 | -msgid "product.cold_chain" |
497 | -msgstr "product.cold_chain" |
498 | - |
499 | #. module: msf_doc_import |
500 | #: code:addons/msf_doc_import/account.py:295 |
501 | #, python-format |
502 | @@ -19238,11 +19233,6 @@ |
503 | msgid "Starting balance" |
504 | msgstr "Solde initial" |
505 | |
506 | -#. module: product_attributes |
507 | -#: field:product.product,kc_txt:0 |
508 | -msgid "Keep Cool icon" |
509 | -msgstr "Keep Cool icon" |
510 | - |
511 | #. modules: sourcing, msf_instance |
512 | #: code:addons/msf_instance/msf_instance.py:565 |
513 | #: code:addons/sourcing/product_supplierinfo.py:58 |
514 | @@ -24726,6 +24716,7 @@ |
515 | #: report:addons/procurement_cycle/report/replenishment_inventory_review.mako:991 |
516 | #: report:addons/procurement_cycle/report/replenishment_order_calc.mako:439 |
517 | #: report:addons/procurement_cycle/report/replenishment_order_calc.mako:461 |
518 | +#: report:addons/msf_outgoing/report/freight_manifest_xls.mako:266 |
519 | #, python-format |
520 | msgid "Yes" |
521 | msgstr "Oui" |
522 | @@ -25388,8 +25379,8 @@ |
523 | #: field:stock.forecast,keep_cool:0 |
524 | #: report:stock.forecast.report:0 |
525 | #: model:product.heat_sensitive,name:product_attributes.heat_2 |
526 | -msgid "Keep Cool" |
527 | -msgstr "Garder Frais" |
528 | +msgid "Cold Chain" |
529 | +msgstr "Chaîne du Froid" |
530 | |
531 | #. modules: msf_doc_import, product, board, msf_supply_doc_export, msf_outgoing |
532 | #: field:board.board.line,height:0 |
533 | @@ -39150,8 +39141,8 @@ |
534 | |
535 | #. module: stock |
536 | #: selection:physical.inventory.select.products,second_filter:0 |
537 | -msgid "KC/CS/DG" |
538 | -msgstr "GF/CS/MD" |
539 | +msgid "CC/CS/DG" |
540 | +msgstr "CF/CS/MD" |
541 | |
542 | #. module: account |
543 | #: view:account.analytic.chart:0 |
544 | @@ -45000,8 +44991,8 @@ |
545 | |
546 | #. module: product_attributes |
547 | #: field:product.product,is_kc:0 |
548 | -msgid "Is Keep Cool ?" |
549 | -msgstr "Est à maintenir au frais?" |
550 | +msgid "Is Cold Chain ?" |
551 | +msgstr "Respect Chaîne du Froid ?" |
552 | |
553 | #. modules: sales_followup, stock_override, msf_supply_doc_export, sale |
554 | #: view:po.follow.up:0 |
555 | @@ -53894,8 +53885,8 @@ |
556 | #: field:purchase.order.line,kc_dg:0 |
557 | #: field:sale.order.line,kc_dg:0 |
558 | #: field:stock.move,kc_dg:0 |
559 | -msgid "KC/DG" |
560 | -msgstr "GF/MD" |
561 | +msgid "CC/DG" |
562 | +msgstr "CF/MD" |
563 | |
564 | #. modules: msf_outgoing, return_claim |
565 | #: help:claim.event,replacement_picking_expected_claim_event:0 |
566 | @@ -66712,9 +66703,10 @@ |
567 | #: report:addons/msf_outgoing/report/packing_list_xls.mako:435 |
568 | #: report:addons/msf_outgoing/report/pre_packing_excel_report_xls.mako:223 |
569 | #: code:addons/specific_rules/specific_rules.py:53 |
570 | +#: code:addons/stock/report/physical_inventory_counting_sheet.py:27 |
571 | #, python-format |
572 | -msgid "KC" |
573 | -msgstr "GF" |
574 | +msgid "CC" |
575 | +msgstr "CF" |
576 | |
577 | #. module: sales_followup |
578 | #: report:ir.follow.up.location.report_pdf:0 |
579 | @@ -70757,10 +70749,15 @@ |
580 | msgid "Work Days" |
581 | msgstr "Jours Ouvrés" |
582 | |
583 | -#. module: product_attributes, purchase, purchase_override |
584 | +#. module: product_attributes |
585 | #: field:product.product,cold_chain:0 |
586 | +msgid "Thermosensitivity" |
587 | +msgstr "Thermosensibilité" |
588 | + |
589 | +#. modules: purchase, purchase_override, product_attributes |
590 | #: field:purchase.order.line,cold_chain:0 |
591 | #: field:purchase.order.merged.line,cold_chain:0 |
592 | +#: field:product.cold_chain,cold_chain:0 |
593 | msgid "Cold Chain" |
594 | msgstr "Chaîne du Froid" |
595 | |
596 | @@ -75905,8 +75902,8 @@ |
597 | #: field:stock.inventory.line,kc_check:0 |
598 | #: field:stock.move,kc_check:0 |
599 | #: field:stock.production.lot,kc_check:0 |
600 | -msgid "KC" |
601 | -msgstr "GF" |
602 | +msgid "CC" |
603 | +msgstr "CF" |
604 | |
605 | #. modules: product, partner_modification, procurement_cycle |
606 | #: field:res.partner,supplier_lt:0 |
607 | @@ -80838,8 +80835,8 @@ |
608 | #: help:return.ppl.processor,contains_kc:0 |
609 | #: help:stock.incoming.processor,contains_kc:0 |
610 | #: help:stock.picking.processor,contains_kc:0 |
611 | -msgid "Is at least one line contains a keep cool product." |
612 | -msgstr "Is at least one line contains a keep cool product." |
613 | +msgid "Is at least one line contains a cold chain product." |
614 | +msgstr "A-t-on au moins un produit chaîne du froid." |
615 | |
616 | #. module: procurement_request |
617 | #: model:ir.module.module,description:procurement_request.module_meta_information |
618 | @@ -82575,8 +82572,8 @@ |
619 | |
620 | #. module: msf_outgoing |
621 | #: report:labels:0 |
622 | -msgid "KC / " |
623 | -msgstr "GF / " |
624 | +msgid "CC / " |
625 | +msgstr "CF / " |
626 | |
627 | #. module: msf_homere_interface |
628 | #: code:addons/msf_homere_interface/wizard/hr_payroll_employee_import.py:572 |
629 | @@ -84067,8 +84064,8 @@ |
630 | #: field:return.ppl.processor,contains_kc:0 |
631 | #: field:stock.incoming.processor,contains_kc:0 |
632 | #: field:stock.picking.processor,contains_kc:0 |
633 | -msgid "Contains Keep Cool goods" |
634 | -msgstr "Contains Keep Cool goods" |
635 | +msgid "Contains Cold Chain goods" |
636 | +msgstr "Contient de produits Chaîne du Froid" |
637 | |
638 | #. module: product_attributes |
639 | #: model:ir.actions.act_window,name:product_attributes.product_heat_sensitive_action |
640 | |
641 | === modified file 'bin/addons/msf_profile/msf_profile.py' |
642 | --- bin/addons/msf_profile/msf_profile.py 2020-11-13 11:25:30 +0000 |
643 | +++ bin/addons/msf_profile/msf_profile.py 2020-12-02 10:15:56 +0000 |
644 | @@ -52,6 +52,19 @@ |
645 | 'model': lambda *a: 'patch.scripts', |
646 | } |
647 | |
648 | + def us_7848_cold_chain(self, cr, uid, *a, **b): |
649 | + for table in ['internal_move_processor', 'outgoing_delivery_move_processor', 'return_ppl_move_processor', 'stock_move_in_processor', 'stock_move_processor']: |
650 | + cr.execute("update %s set kc_check = '' where kc_check != ''" % (table, )) # not_a_user_entry |
651 | + cr.execute(""" update %s rel set kc_check='X' |
652 | + from product_product prod, product_cold_chain c |
653 | + where |
654 | + prod.id = rel.product_id and |
655 | + prod.cold_chain = c.id and |
656 | + c.cold_chain='t' |
657 | + """ % (table, )) # not_a_user_entry |
658 | + return True |
659 | + |
660 | + |
661 | # UF19.0 |
662 | def us_7808_ocg_rename_esc(self, cr, uid, *a, **b): |
663 | entity_obj = self.pool.get('sync.client.entity') |
664 | @@ -3570,25 +3583,25 @@ |
665 | :param b: Named parameters |
666 | :return: True |
667 | """ |
668 | - prd_obj = self.pool.get('product.product') |
669 | - data_obj = self.pool.get('ir.model.data') |
670 | - |
671 | - heat_id = data_obj.get_object_reference(cr, uid, 'product_attributes', 'heat_yes')[1] |
672 | - no_heat_id = data_obj.get_object_reference(cr, uid, 'product_attributes', 'heat_no')[1] |
673 | - |
674 | - prd_ids = prd_obj.search(cr, uid, [('heat_sensitive_item', '!=', False), ('active', 'in', ['t', 'f'])]) |
675 | - if prd_ids: |
676 | - cr.execute(""" |
677 | - UPDATE product_product SET heat_sensitive_item = %s, is_kc = True, kc_txt = 'X', show_cold_chain = True WHERE id IN %s |
678 | - """, (heat_id, tuple(prd_ids),)) |
679 | - |
680 | - no_prd_ids = prd_obj.search(cr, uid, [('heat_sensitive_item', '=', False), ('active', 'in', ['t', 'f'])]) |
681 | - if no_prd_ids: |
682 | - cr.execute(""" |
683 | - UPDATE product_product SET heat_sensitive_item = %s, is_kc = False, kc_txt = '', show_cold_chain = False WHERE id IN %s |
684 | - """, (no_heat_id, tuple(no_prd_ids),)) |
685 | - |
686 | - cr.execute('ALTER TABLE product_product ALTER COLUMN heat_sensitive_item SET NOT NULL') |
687 | + #prd_obj = self.pool.get('product.product') |
688 | + #data_obj = self.pool.get('ir.model.data') |
689 | + |
690 | + #heat_id = data_obj.get_object_reference(cr, uid, 'product_attributes', 'heat_yes')[1] |
691 | + #no_heat_id = data_obj.get_object_reference(cr, uid, 'product_attributes', 'heat_no')[1] |
692 | + |
693 | + #prd_ids = prd_obj.search(cr, uid, [('heat_sensitive_item', '!=', False), ('active', 'in', ['t', 'f'])]) |
694 | + #if prd_ids: |
695 | + # cr.execute(""" |
696 | + # UPDATE product_product SET heat_sensitive_item = %s, is_kc = True, kc_txt = 'X', show_cold_chain = True WHERE id IN %s |
697 | + # """, (heat_id, tuple(prd_ids),)) |
698 | + |
699 | + #no_prd_ids = prd_obj.search(cr, uid, [('heat_sensitive_item', '=', False), ('active', 'in', ['t', 'f'])]) |
700 | + #if no_prd_ids: |
701 | + # cr.execute(""" |
702 | + # UPDATE product_product SET heat_sensitive_item = %s, is_kc = False, kc_txt = '', show_cold_chain = False WHERE id IN %s |
703 | + # """, (no_heat_id, tuple(no_prd_ids),)) |
704 | + |
705 | + #cr.execute('ALTER TABLE product_product ALTER COLUMN heat_sensitive_item SET NOT NULL') |
706 | |
707 | return True |
708 | |
709 | |
710 | === modified file 'bin/addons/msf_supply_doc_export/report/report_pick_export_xls.mako' |
711 | --- bin/addons/msf_supply_doc_export/report/report_pick_export_xls.mako 2019-04-16 12:35:45 +0000 |
712 | +++ bin/addons/msf_supply_doc_export/report/report_pick_export_xls.mako 2020-12-02 10:15:56 +0000 |
713 | @@ -82,7 +82,7 @@ |
714 | <Column ss:AutoFitWidth="1" ss:Width="60" /> |
715 | ## Expiry Date |
716 | <Column ss:AutoFitWidth="1" ss:Width="60" /> |
717 | - ## KC |
718 | + ## CC |
719 | <Column ss:AutoFitWidth="1" ss:Width="40" /> |
720 | ## DG |
721 | <Column ss:AutoFitWidth="1" ss:Width="40" /> |
722 | @@ -157,7 +157,7 @@ |
723 | <Cell ss:StyleID="header" ><Data ss:Type="String">${_('Qty to Process')}</Data></Cell> |
724 | <Cell ss:StyleID="header" ><Data ss:Type="String">${_('Batch')}</Data></Cell> |
725 | <Cell ss:StyleID="header" ><Data ss:Type="String">${_('Expiry Date')}</Data></Cell> |
726 | - <Cell ss:StyleID="header" ><Data ss:Type="String">${_('KC')}</Data></Cell> |
727 | + <Cell ss:StyleID="header" ><Data ss:Type="String">${_('CC')}</Data></Cell> |
728 | <Cell ss:StyleID="header" ><Data ss:Type="String">${_('DG')}</Data></Cell> |
729 | <Cell ss:StyleID="header" ><Data ss:Type="String">${_('CS')}</Data></Cell> |
730 | </Row> |
731 | |
732 | === modified file 'bin/addons/product_attributes/product_attributes.py' |
733 | --- bin/addons/product_attributes/product_attributes.py 2020-11-24 14:11:46 +0000 |
734 | +++ bin/addons/product_attributes/product_attributes.py 2020-12-02 10:15:56 +0000 |
735 | @@ -180,8 +180,12 @@ |
736 | _columns = { |
737 | 'code': fields.char('Code', size=256), |
738 | 'name': fields.char('Name', size=256, required=True, translate=1), |
739 | + 'cold_chain': fields.boolean('Cold Chain'), |
740 | } |
741 | |
742 | + _defaults = { |
743 | + 'cold_chain': False, |
744 | + } |
745 | def unlink(self, cr, uid, ids, context=None): |
746 | if context is None: |
747 | context = {} |
748 | @@ -507,30 +511,15 @@ |
749 | |
750 | def _compute_is_kc(self, cr, uid, product, context=None): |
751 | """ |
752 | - Return True if the product is considered as a Keep Cool product |
753 | + Return True if the product is considered as a Cold Chain product |
754 | :param cr: Cursor to the database |
755 | :param uid: ID of the res.users that calls this method |
756 | :param product: browse_record of a product.product |
757 | :param context: Context of the call |
758 | :return: True or False |
759 | """ |
760 | - return product.heat_sensitive_item.code == 'yes' |
761 | + return product.cold_chain and product.cold_chain.cold_chain or False |
762 | |
763 | - def _compute_kc_txt(self, cr, uid, product, context=None): |
764 | - """ |
765 | - Return the character to display on views or reports ('X' or '?' or '') for Keep Cool |
766 | - :param cr: Cursor to the database |
767 | - :param uid: ID of the res.users that calls this method |
768 | - :param product: browse_record of a product.product |
769 | - :param context: Context of the call |
770 | - :return: 'X' or '?' or '' |
771 | - """ |
772 | - if product.heat_sensitive_item.code == 'no_know': |
773 | - return '?' |
774 | - elif product.heat_sensitive_item.code == 'no': |
775 | - return '' |
776 | - else: |
777 | - return 'X' |
778 | |
779 | def _compute_is_dg(self, cr, uid, product, context=None): |
780 | """ |
781 | @@ -611,7 +600,7 @@ |
782 | def _compute_kc_dg_cs_ssl_values(self, cr, uid, ids, field_names, args, context=None): |
783 | """ |
784 | Compute the character to display ('X' or '?' or '') according to product values |
785 | - for Keep Cool, Dangerous Goods, Controlled Substance and Short Shelf Life. |
786 | + for Cold Chain, Dangerous Goods, Controlled Substance and Short Shelf Life. |
787 | :param cr: Cursor to the database |
788 | :param uid: ID of the res.users that calls this method |
789 | :param ids: List of ID of product.product to compute values |
790 | @@ -745,6 +734,21 @@ |
791 | res[_id] = True |
792 | return res |
793 | |
794 | + def _get_cold_chain_products(self, cr, uid, ids, context=None): |
795 | + # do not return product ids to write to not trigger mass update |
796 | + |
797 | + for cold in self.pool.get('product.cold_chain').read(cr, uid, ids, ['cold_chain'], context=context): |
798 | + is_kc = cold['cold_chain'] |
799 | + cr.execute(''' |
800 | + update product_product set |
801 | + is_kc=%(is_kc)s |
802 | + where |
803 | + cold_chain = %(cold_id)s and |
804 | + is_kc != %(is_kc)s |
805 | + ''', {'cold_id': cold['id'], 'is_kc': is_kc}) |
806 | + logging.getLogger('cold chain').info('Cold chain id:%s, update %s products' % (cold['id'], cr.rowcount)) |
807 | + return [] |
808 | + |
809 | _columns = { |
810 | 'duplicate_ok': fields.boolean('Is a duplicate'), |
811 | 'loc_indic': fields.char('Indicative Location', size=64), |
812 | @@ -825,24 +829,12 @@ |
813 | _fnct_migrate=do_not_migrate, |
814 | method=True, |
815 | type='boolean', |
816 | - string='Is Keep Cool ?', |
817 | - multi='kc', |
818 | - readonly=True, |
819 | - store={ |
820 | - 'product.product': (lambda self, cr, uid, ids, c=None: ids, ['heat_sensitive_item'], 10), |
821 | - } |
822 | - ), |
823 | - 'kc_txt': fields.function( |
824 | - _compute_kc_dg_cs_ssl_values, |
825 | - _fnct_migrate=do_not_migrate, |
826 | - method=True, |
827 | - type='char', |
828 | - size=8, |
829 | - string='Keep Cool icon', |
830 | - multi='kc', |
831 | - readonly=True, |
832 | - store={ |
833 | - 'product.product': (lambda self, cr, uid, ids, c=None: ids, ['heat_sensitive_item'], 10), |
834 | + string='Is Cold Chain ?', |
835 | + multi='kc', |
836 | + readonly=True, |
837 | + store={ |
838 | + 'product.product': (lambda self, cr, uid, ids, c=None: ids, ['cold_chain'], 10), |
839 | + 'product.cold_chain': (_get_cold_chain_products, ['cold_chain'], 20), |
840 | } |
841 | ), |
842 | 'heat_sensitive_item': fields.many2one( |
843 | @@ -850,7 +842,7 @@ |
844 | string='Temperature sensitive item', |
845 | required=True, |
846 | ), |
847 | - 'cold_chain': fields.many2one('product.cold_chain', 'Cold Chain',), |
848 | + 'cold_chain': fields.many2one('product.cold_chain', 'Thermosensitivity'), |
849 | 'show_cold_chain': fields.boolean('Show cold chain'), |
850 | # Inverse of m2m options_ids |
851 | 'options_ids_inv': fields.many2many('product.product', 'product_options_rel', 'product_option_id', 'product_id', 'Options Inv.'), |
852 | @@ -1382,10 +1374,16 @@ |
853 | """ |
854 | heat2_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'product_attributes', 'heat_no')[1] |
855 | heat3_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'product_attributes', 'heat_no_know')[1] |
856 | + |
857 | + sensitive = heat and heat not in [heat2_id, heat3_id] |
858 | + |
859 | + values = { |
860 | + 'show_cold_chain': sensitive |
861 | + } |
862 | + if not sensitive: |
863 | + values['cold_chain'] = False |
864 | return { |
865 | - 'value': { |
866 | - 'show_cold_chain': heat and heat not in [heat2_id, heat3_id] |
867 | - } |
868 | + 'value': values |
869 | } |
870 | |
871 | def _check_gmdn_code(self, cr, uid, ids, context=None): |
872 | |
873 | === modified file 'bin/addons/product_attributes/product_attributes_data.xml' |
874 | --- bin/addons/product_attributes/product_attributes_data.xml 2020-10-09 07:31:01 +0000 |
875 | +++ bin/addons/product_attributes/product_attributes_data.xml 2020-12-02 10:15:56 +0000 |
876 | @@ -133,82 +133,102 @@ |
877 | <record model="product.cold_chain" id="cold_1"> |
878 | <field name="code">*</field> |
879 | <field name="name">* - Keep Cool: used for a kit or article containing cold chain module or item(s)</field> |
880 | + <field name="cold_chain" eval="True" /> |
881 | </record> |
882 | <record model="product.cold_chain" id="cold_2"> |
883 | <field name="code">*0</field> |
884 | <field name="name">*0 - Problem if any window blue</field> |
885 | + <field name="cold_chain" eval="True" /> |
886 | </record> |
887 | <record model="product.cold_chain" id="cold_3"> |
888 | <field name="code">*0F</field> |
889 | <field name="name">*0F - Problem if any window blue or Freeze-tag = ALARM</field> |
890 | + <field name="cold_chain" eval="True" /> |
891 | </record> |
892 | <record model="product.cold_chain" id="cold_4"> |
893 | <field name="code">*A</field> |
894 | <field name="name">*A - Problem if A, B, C and/or D blue = ALARM</field> |
895 | + <field name="cold_chain" eval="True" /> |
896 | </record> |
897 | <record model="product.cold_chain" id="cold_5"> |
898 | <field name="code">*AF</field> |
899 | <field name="name">*AF - Problem if A, B, C and/or D blue or Freeze-tag = ALARM</field> |
900 | + <field name="cold_chain" eval="True" /> |
901 | </record> |
902 | <record model="product.cold_chain" id="cold_6"> |
903 | <field name="code">*B</field> |
904 | <field name="name">*B - Problem if B, C and/or D blue = ALARM</field> |
905 | + <field name="cold_chain" eval="True" /> |
906 | </record> |
907 | <record model="product.cold_chain" id="cold_7"> |
908 | <field name="code">*BF</field> |
909 | <field name="name">*BF - Problem if B, C and/or D blue or Freeze-tag = ALARM</field> |
910 | + <field name="cold_chain" eval="True" /> |
911 | </record> |
912 | <record model="product.cold_chain" id="cold_8"> |
913 | <field name="code">*C</field> |
914 | <field name="name">*C - Problem if C and D blue</field> |
915 | + <field name="cold_chain" eval="True" /> |
916 | </record> |
917 | <record model="product.cold_chain" id="cold_9"> |
918 | <field name="code">*CF</field> |
919 | <field name="name">*CF - Problem if C and/or D blue or Freeze-tag = ALARM</field> |
920 | + <field name="cold_chain" eval="True" /> |
921 | </record> |
922 | <record model="product.cold_chain" id="cold_10"> |
923 | <field name="code">*D</field> |
924 | <field name="name">*D - Store and transport at -25°C (store in deepfreezer, transport with dry-ice)</field> |
925 | + <field name="cold_chain" eval="False" /> |
926 | </record> |
927 | <record model="product.cold_chain" id="cold_11"> |
928 | <field name="code">*F</field> |
929 | <field name="name">*F - Cannot be frozen: check FreezeWatch</field> |
930 | + <field name="cold_chain" eval="False" /> |
931 | </record> |
932 | <record model="product.cold_chain" id="cold_12"> |
933 | <field name="code">*25</field> |
934 | <field name="name">*25 - Must be kept below 25°C (but not necesseraly in cold chain)</field> |
935 | + <field name="cold_chain" eval="False" /> |
936 | </record> |
937 | <record model="product.cold_chain" id="cold_13"> |
938 | <field name="code">*25F</field> |
939 | <field name="name">*25F - Must be kept below 25°C and cannot be frozen: check FreezeWatch</field> |
940 | + <field name="cold_chain" eval="False" /> |
941 | </record> |
942 | <record model="product.cold_chain" id="cold_14"> |
943 | <field name="code">0208</field> |
944 | <field name="name">0208 - Cold Chain / Refrigerated 2-8°C</field> |
945 | + <field name="cold_chain" eval="True" /> |
946 | </record> |
947 | <record model="product.cold_chain" id="cold_15"> |
948 | <field name="code">1525</field> |
949 | <field name="name">1525 - Controlled Room Temperature 15-25°C</field> |
950 | + <field name="cold_chain" eval="False" /> |
951 | </record> |
952 | <record model="product.cold_chain" id="cold_16"> |
953 | <field name="code">CT25</field> |
954 | <field name="name">CT25 - Controlled Temperature 2-25°C</field> |
955 | + <field name="cold_chain" eval="False" /> |
956 | </record> |
957 | <record model="product.cold_chain" id="cold_17"> |
958 | <field name="code">CT30</field> |
959 | <field name="name">CT30 - Controlled Temperature 2-30°C</field> |
960 | + <field name="cold_chain" eval="False" /> |
961 | </record> |
962 | <record model="product.cold_chain" id="cold_18"> |
963 | <field name="code">F-20</field> |
964 | <field name="name">F-20 - Frozen <-20°C</field> |
965 | + <field name="cold_chain" eval="False" /> |
966 | </record> |
967 | <record model="product.cold_chain" id="cold_19"> |
968 | <field name="code">FSRT</field> |
969 | <field name="name">FSRT - Frozen for Storage, Refrigerated for Transport</field> |
970 | + <field name="cold_chain" eval="False" /> |
971 | </record> |
972 | <record model="product.cold_chain" id="cold_20"> |
973 | <field name="code">CT30</field> |
974 | <field name="name">CT30 - Controlled Temperature 2-30°C</field> |
975 | + <field name="cold_chain" eval="False" /> |
976 | </record> |
977 | |
978 | <record id="ir_cron_deactivate_ud_products" model="ir.cron"> |
979 | |
980 | === modified file 'bin/addons/product_attributes/product_attributes_view.xml' |
981 | --- bin/addons/product_attributes/product_attributes_view.xml 2020-10-30 10:39:28 +0000 |
982 | +++ bin/addons/product_attributes/product_attributes_view.xml 2020-12-02 10:15:56 +0000 |
983 | @@ -736,8 +736,9 @@ |
984 | <field name="model">product.cold_chain</field> |
985 | <field name="type">search</field> |
986 | <field name="arch" type="xml"> |
987 | - <search string="Cold chain"> |
988 | + <search string="Thermosensitivity"> |
989 | <field name="name" /> |
990 | + <field name="cold_chain" /> |
991 | </search> |
992 | </field> |
993 | </record> |
994 | @@ -746,13 +747,14 @@ |
995 | <field name="model">product.cold_chain</field> |
996 | <field name="type">tree</field> |
997 | <field name="arch" type="xml"> |
998 | - <tree string="Cold chain" editable="top" > |
999 | + <tree string="Thermosensitivity" editable="top" > |
1000 | <field name="name" /> |
1001 | + <field name="cold_chain" /> |
1002 | </tree> |
1003 | </field> |
1004 | </record> |
1005 | <record id="product_cold_chain_action" model="ir.actions.act_window"> |
1006 | - <field name="name">Cold chain</field> |
1007 | + <field name="name">Thermosensitivity</field> |
1008 | <field name="type">ir.actions.act_window</field> |
1009 | <field name="res_model">product.cold_chain</field> |
1010 | <field name="view_type">form</field> |
1011 | |
1012 | === modified file 'bin/addons/specific_rules/specific_rules.py' |
1013 | --- bin/addons/specific_rules/specific_rules.py 2020-04-23 14:09:49 +0000 |
1014 | +++ bin/addons/specific_rules/specific_rules.py 2020-12-02 10:15:56 +0000 |
1015 | @@ -38,7 +38,7 @@ |
1016 | |
1017 | def _kc_dg(self, cr, uid, ids, name, arg, context=None): |
1018 | ''' |
1019 | - return 'KC' if cold chain or 'DG' if dangerous goods |
1020 | + return 'CC' if cold chain or 'DG' if dangerous goods |
1021 | ''' |
1022 | result = {} |
1023 | for id in ids: |
1024 | @@ -46,8 +46,8 @@ |
1025 | |
1026 | for sol in self.browse(cr, uid, ids, context=context): |
1027 | if sol.product_id: |
1028 | - if sol.product_id.kc_txt: |
1029 | - result[sol.id] += sol.product_id.is_kc and _('KC') or '%s ?' % _('KC') |
1030 | + if sol.product_id.is_kc: |
1031 | + result[sol.id] += sol.product_id.is_kc and _('CC') or '' |
1032 | if sol.product_id.dg_txt: |
1033 | if result[sol.id]: |
1034 | result[sol.id] += ' / ' |
1035 | @@ -55,7 +55,7 @@ |
1036 | |
1037 | return result |
1038 | |
1039 | - _columns = {'kc_dg': fields.function(_kc_dg, method=True, string='KC/DG', type='char'),} |
1040 | + _columns = {'kc_dg': fields.function(_kc_dg, method=True, string='CC/DG', type='char'),} |
1041 | |
1042 | def product_id_change(self, cr, uid, ids, pricelist, product, qty=0, |
1043 | uom=False, qty_uos=0, uos=False, name='', partner_id=False, |
1044 | @@ -129,7 +129,7 @@ |
1045 | |
1046 | def _kc_dg(self, cr, uid, ids, name, arg, context=None): |
1047 | ''' |
1048 | - return 'KC' if cold chain or 'DG' if dangerous goods |
1049 | + return 'CC' if cold chain or 'DG' if dangerous goods |
1050 | ''' |
1051 | result = {} |
1052 | for id in ids: |
1053 | @@ -137,8 +137,8 @@ |
1054 | |
1055 | for pol in self.browse(cr, uid, ids, context=context): |
1056 | if pol.product_id: |
1057 | - if pol.product_id.kc_txt: |
1058 | - result[pol.id] += pol.product_id.is_kc and _('KC') or '%s ?' % _('KC') |
1059 | + if pol.product_id.is_kc: |
1060 | + result[pol.id] += pol.product_id.is_kc and _('CC') or '' |
1061 | if pol.product_id.dg_txt: |
1062 | if result[pol.id]: |
1063 | result[pol.id] += ' / ' |
1064 | @@ -146,7 +146,7 @@ |
1065 | |
1066 | return result |
1067 | |
1068 | - _columns = {'kc_dg': fields.function(_kc_dg, method=True, string='KC/DG', type='char'),} |
1069 | + _columns = {'kc_dg': fields.function(_kc_dg, method=True, string='CC/DG', type='char'),} |
1070 | |
1071 | |
1072 | purchase_order_line() |
1073 | @@ -780,8 +780,8 @@ |
1074 | elif product_obj.perishable: |
1075 | result.setdefault('value', {})['hidden_perishable_mandatory'] = True |
1076 | result.setdefault('value', {})['exp_check'] = True |
1077 | - # keep cool |
1078 | - result.setdefault('value', {})['kc_check'] = product_obj.kc_txt |
1079 | + # cold chain |
1080 | + result.setdefault('value', {})['kc_check'] = product_obj.is_kc and 'X' or '' |
1081 | # ssl |
1082 | result.setdefault('value', {})['ssl_check'] = product_obj.ssl_txt |
1083 | # dangerous goods |
1084 | @@ -861,7 +861,7 @@ |
1085 | |
1086 | def _get_checks_all(self, cr, uid, ids, name, arg, context=None): |
1087 | ''' |
1088 | - function for KC/SSL/DG/NP products |
1089 | + function for CC/SSL/DG/NP products |
1090 | ''' |
1091 | result = {} |
1092 | for id in ids: |
1093 | @@ -870,8 +870,8 @@ |
1094 | result[id].update({f: False,}) |
1095 | |
1096 | for obj in self.browse(cr, uid, ids, context=context): |
1097 | - # keep cool |
1098 | - result[obj.id]['kc_check'] = obj.product_id.kc_txt |
1099 | + # cold chain |
1100 | + result[obj.id]['kc_check'] = obj.product_id.is_kc and 'X' or '' |
1101 | # ssl |
1102 | result[obj.id]['ssl_check'] = obj.product_id.ssl_txt |
1103 | # dangerous goods |
1104 | @@ -992,7 +992,7 @@ |
1105 | 'kc_check': fields.function( |
1106 | _get_checks_all, |
1107 | method=True, |
1108 | - string='KC', |
1109 | + string='CC', |
1110 | type='char', |
1111 | size=8, |
1112 | readonly=True, |
1113 | |
1114 | === modified file 'bin/addons/stock/physical_inventory.py' |
1115 | --- bin/addons/stock/physical_inventory.py 2020-09-28 13:56:57 +0000 |
1116 | +++ bin/addons/stock/physical_inventory.py 2020-12-02 10:15:56 +0000 |
1117 | @@ -1304,7 +1304,7 @@ |
1118 | 'currency_id': fields.many2one('res.currency', "Currency", readonly=True), |
1119 | 'is_bn': fields.related('product_id', 'batch_management', string='BN', type='boolean', readonly=True), |
1120 | 'is_ed': fields.related('product_id', 'perishable', string='ED', type='boolean', readonly=True), |
1121 | - 'is_kc': fields.related('product_id', 'is_kc', string='KC', type='boolean', readonly=True), |
1122 | + 'is_kc': fields.related('product_id', 'is_kc', string='CC', type='boolean', readonly=True), |
1123 | 'is_dg': fields.related('product_id', 'is_dg', string='DG', type='boolean', readonly=True), |
1124 | 'is_cs': fields.related('product_id', 'is_cs', string='CS', type='boolean', readonly=True), |
1125 | |
1126 | |
1127 | === modified file 'bin/addons/stock/physical_inventory_view.xml' |
1128 | --- bin/addons/stock/physical_inventory_view.xml 2020-10-20 15:57:14 +0000 |
1129 | +++ bin/addons/stock/physical_inventory_view.xml 2020-12-02 10:15:56 +0000 |
1130 | @@ -43,7 +43,7 @@ |
1131 | <field name="uom_id"/> |
1132 | <field name="batch_management" string="BN mandatory"/> |
1133 | <field name="perishable" string="ED mandatory"/> |
1134 | - <field name="is_kc" string="KC"/> |
1135 | + <field name="is_kc" string="CC"/> |
1136 | <field name="is_dg" string="DG"/> |
1137 | <field name="is_cs" string="CS"/> |
1138 | </tree> |
1139 | @@ -71,7 +71,7 @@ |
1140 | <field name="quantity" on_change="on_change_quantity(quantity, product_uom_id)"/> |
1141 | <field name="is_bn" string="BN"/> |
1142 | <field name="is_ed" string="ED"/> |
1143 | - <field name="is_kc" string="KC"/> |
1144 | + <field name="is_kc" string="CC"/> |
1145 | <field name="is_dg" string="DG"/> |
1146 | <field name="is_cs" string="CS"/> |
1147 | </tree> |
1148 | @@ -84,7 +84,7 @@ |
1149 | <field name="quantity" on_change="on_change_quantity(quantity, product_uom_id)"/> |
1150 | <field name="is_bn" string="BN"/> |
1151 | <field name="is_ed" string="ED"/> |
1152 | - <field name="is_kc" string="KC"/> |
1153 | + <field name="is_kc" string="CC"/> |
1154 | <field name="is_dg" string="DG"/> |
1155 | <field name="is_cs" string="CS"/> |
1156 | </form> |
1157 | |
1158 | === modified file 'bin/addons/stock/report/physical_inventory_counting_sheet.py' |
1159 | --- bin/addons/stock/report/physical_inventory_counting_sheet.py 2018-06-15 12:30:42 +0000 |
1160 | +++ bin/addons/stock/report/physical_inventory_counting_sheet.py 2020-12-02 10:15:56 +0000 |
1161 | @@ -1,7 +1,7 @@ |
1162 | # -*- coding: utf-8 -*- |
1163 | from report import report_sxw |
1164 | from spreadsheet_xml.spreadsheet_xml_write import SpreadsheetReport |
1165 | - |
1166 | +from tools.translate import _ |
1167 | |
1168 | class CountingSheetParser(report_sxw.rml_parse): |
1169 | |
1170 | @@ -23,9 +23,8 @@ |
1171 | return value.format().replace(' ', 'T') |
1172 | return value |
1173 | |
1174 | - @staticmethod |
1175 | - def display_product_attributes(item): |
1176 | - attributes = {'is_kc': 'KC', 'is_dg': 'DG', 'is_cs': 'CS'} |
1177 | + def display_product_attributes(self, item): |
1178 | + attributes = {'is_kc': _('CC'), 'is_dg': _('DG'), 'is_cs': _('CS')} |
1179 | return ','.join([name for attribute, name in attributes.items() if getattr(item, attribute, False)]) |
1180 | |
1181 | @staticmethod |
1182 | |
1183 | === modified file 'bin/addons/stock/stock_move.py' |
1184 | --- bin/addons/stock/stock_move.py 2020-11-02 09:51:10 +0000 |
1185 | +++ bin/addons/stock/stock_move.py 2020-12-02 10:15:56 +0000 |
1186 | @@ -214,7 +214,7 @@ |
1187 | |
1188 | def _get_checks_all(self, cr, uid, ids, name, arg, context=None): |
1189 | ''' |
1190 | - function for KC/SSL/DG/NP products |
1191 | + function for CC/SSL/DG/NP products |
1192 | ''' |
1193 | # objects |
1194 | kit_obj = self.pool.get('composition.kit') |
1195 | @@ -231,7 +231,7 @@ |
1196 | |
1197 | product_list_dict = self.pool.get('product.product').read(cr, uid, |
1198 | list(product_ids), |
1199 | - ['kc_txt', |
1200 | + ['is_kc', |
1201 | 'ssl_txt', |
1202 | 'dg_txt', |
1203 | 'cs_txt', |
1204 | @@ -246,8 +246,8 @@ |
1205 | stock_move_id = stock_move_dict['id'] |
1206 | product_id = stock_move_dict['product_id'][0] |
1207 | product = product_dict[product_id] |
1208 | - # keep cool |
1209 | - result[stock_move_id]['kc_check'] = product['kc_txt'] |
1210 | + # cold chain |
1211 | + result[stock_move_id]['kc_check'] = product['is_kc'] and 'X' or '' |
1212 | # ssl |
1213 | result[stock_move_id]['ssl_check'] = product['ssl_txt'] |
1214 | # dangerous goods |
1215 | @@ -276,7 +276,7 @@ |
1216 | |
1217 | def _kc_dg(self, cr, uid, ids, name, arg, context=None): |
1218 | ''' |
1219 | - return 'KC' if cold chain or 'DG' if dangerous goods |
1220 | + return 'CC' if cold chain or 'DG' if dangerous goods |
1221 | ''' |
1222 | result = {} |
1223 | for id in ids: |
1224 | @@ -284,8 +284,8 @@ |
1225 | |
1226 | for move in self.browse(cr, uid, ids, context=context): |
1227 | if move.product_id: |
1228 | - if move.product_id.kc_txt: |
1229 | - result[move.id] += move.product_id.is_kc and _('KC') or '%s ?'%_('KC') |
1230 | + if move.product_id.is_kc: |
1231 | + result[move.id] += move.product_id.is_kc and _('CC') or '' |
1232 | if move.product_id.dg_txt: |
1233 | if result[move.id]: |
1234 | result[move.id] += ' / ' |
1235 | @@ -390,10 +390,10 @@ |
1236 | result[move['id']] = default_values |
1237 | if move['product_id']: |
1238 | product = product_obj.read(cr, uid, move['product_id'][0], |
1239 | - ['dg_txt', 'kc_txt', 'cs_txt'], context=context) |
1240 | + ['dg_txt', 'is_kc', 'cs_txt'], context=context) |
1241 | result[move['id']]['is_dangerous_good'] = move['product_id'] and product['dg_txt'] or '' |
1242 | - # keep cool - if heat_sensitive_item is True |
1243 | - result[move['id']]['is_keep_cool'] = move['product_id'] and product['kc_txt'] or '' |
1244 | + # cold chain |
1245 | + result[move['id']]['is_keep_cool'] = move['product_id'] and product['is_kc'] and 'X' or '' |
1246 | # narcotic |
1247 | result[move['id']]['is_narcotic'] = move['product_id'] and product['cs_txt'] or '' |
1248 | return result |
1249 | @@ -548,10 +548,10 @@ |
1250 | 'kol_lot_manual': fields.boolean(string='The batch is set manually'), |
1251 | |
1252 | # specific rule |
1253 | - 'kc_dg': fields.function(_kc_dg, method=True, string='KC/DG', type='char'), |
1254 | + 'kc_dg': fields.function(_kc_dg, method=True, string='CC/DG', type='char'), |
1255 | 'hidden_batch_management_mandatory': fields.boolean(string='Hidden Flag for Batch Management product',), |
1256 | 'hidden_perishable_mandatory': fields.boolean(string='Hidden Flag for Perishable product',), |
1257 | - 'kc_check': fields.function(_get_checks_all, method=True, string='KC', type='char', size=8, readonly=True, multi="m"), |
1258 | + 'kc_check': fields.function(_get_checks_all, method=True, string='CC', type='char', size=8, readonly=True, multi="m"), |
1259 | 'ssl_check': fields.function(_get_checks_all, method=True, string='SSL', type='char', size=8, readonly=True, multi="m"), |
1260 | 'dg_check': fields.function(_get_checks_all, method=True, string='DG', type='char', size=8, readonly=True, multi="m"), |
1261 | 'np_check': fields.function(_get_checks_all, method=True, string='CS', type='char', size=8, readonly=True, multi="m"), |
1262 | @@ -589,7 +589,7 @@ |
1263 | 'num_of_packs': fields.function(_get_num_of_pack, method=True, type='integer', string='#Packs'), # old_multi get_vals |
1264 | 'currency_id': fields.function(_vals_get, method=True, type='many2one', relation='res.currency', string='Currency', multi='get_vals',), |
1265 | 'is_dangerous_good': fields.function(_get_danger, method=True, type='char', size=8, string='Dangerous Good', multi='get_danger'), |
1266 | - 'is_keep_cool': fields.function(_get_danger, method=True, type='char', size=8, string='Keep Cool', multi='get_danger',), |
1267 | + 'is_keep_cool': fields.function(_get_danger, method=True, type='char', size=8, string='Cold Chain', multi='get_danger',), |
1268 | 'is_narcotic': fields.function(_get_danger, method=True, type='char', size=8, string='CS', multi='get_danger',), |
1269 | 'sale_order_line_number': fields.function(_vals_get, |
1270 | method=True, type='integer', string='Sale Order Line Number', |
1271 | |
1272 | === modified file 'bin/addons/stock/stock_production_lot.py' |
1273 | --- bin/addons/stock/stock_production_lot.py 2020-11-16 11:27:45 +0000 |
1274 | +++ bin/addons/stock/stock_production_lot.py 2020-12-02 10:15:56 +0000 |
1275 | @@ -243,7 +243,7 @@ |
1276 | |
1277 | def _get_checks_all(self, cr, uid, ids, name, arg, context=None): |
1278 | ''' |
1279 | - function for KC/SSL/DG/NP products |
1280 | + function for CC/SSL/DG/NP products |
1281 | ''' |
1282 | result = {} |
1283 | for id in ids: |
1284 | @@ -252,8 +252,8 @@ |
1285 | result[id].update({f: False}) |
1286 | |
1287 | for obj in self.browse(cr, uid, ids, context=context): |
1288 | - # keep cool |
1289 | - result[obj.id]['kc_check'] = obj.product_id.kc_txt |
1290 | + # cold chain |
1291 | + result[obj.id]['kc_check'] = obj.product_id.is_kc and 'X' or '' |
1292 | # ssl |
1293 | result[obj.id]['ssl_check'] = obj.product_id.ssl_txt |
1294 | # dangerous goods |
1295 | @@ -371,7 +371,7 @@ |
1296 | help="Current real quantity of products with this Batch Number in company warehouses", |
1297 | digits_compute=dp.get_precision('Product UoM'), related_uom='uom_id'), |
1298 | 'src_product_id': fields.function(_get_dummy, fnct_search=_src_product, method=True, type="boolean", string="By product"), |
1299 | - 'kc_check': fields.function(_get_checks_all, method=True, string='KC', type='char', size=8, readonly=True, multi="m"), |
1300 | + 'kc_check': fields.function(_get_checks_all, method=True, string='CC', type='char', size=8, readonly=True, multi="m"), |
1301 | 'ssl_check': fields.function(_get_checks_all, method=True, string='SSL', type='char', size=8, readonly=True, multi="m"), |
1302 | 'dg_check': fields.function(_get_checks_all, method=True, string='DG', type='char', size=8, readonly=True, multi="m"), |
1303 | 'np_check': fields.function(_get_checks_all, method=True, string='CS', type='char', size=8, readonly=True, multi="m"), |
1304 | |
1305 | === modified file 'bin/addons/stock/wizard/physical_inventory_select_products.py' |
1306 | --- bin/addons/stock/wizard/physical_inventory_select_products.py 2018-10-23 14:30:11 +0000 |
1307 | +++ bin/addons/stock/wizard/physical_inventory_select_products.py 2020-12-02 10:15:56 +0000 |
1308 | @@ -37,9 +37,9 @@ |
1309 | 'second_filter': fields.selection((('all', "All"), |
1310 | ('family', "All from a family"), |
1311 | ('productlist', "All from a product list"), |
1312 | - ('specialcare', "KC/CS/DG")), |
1313 | + ('specialcare', "CC/CS/DG")), |
1314 | "Second filter", select=True), |
1315 | - 'kc': fields.boolean('Keep cool items'), |
1316 | + 'kc': fields.boolean('Cold chain items'), |
1317 | 'cs': fields.boolean('Controlled substances'), |
1318 | 'dg': fields.boolean('Dangerous goods'), |
1319 | 'product_list': fields.many2one('product.list', 'Product List', select=True), |
1320 | |
1321 | === modified file 'bin/addons/stock/wizard/physical_inventory_select_products_view.xml' |
1322 | --- bin/addons/stock/wizard/physical_inventory_select_products_view.xml 2017-11-10 09:59:06 +0000 |
1323 | +++ bin/addons/stock/wizard/physical_inventory_select_products_view.xml 2020-12-02 10:15:56 +0000 |
1324 | @@ -59,7 +59,7 @@ |
1325 | <field name="uom_id" /> |
1326 | <field name="batch_management" string="BN mandatory" /> |
1327 | <field name="perishable" string="ED mandatory" /> |
1328 | - <field name="is_kc" string="KC" /> |
1329 | + <field name="is_kc" string="CC" /> |
1330 | <field name="is_dg" string="DG" /> |
1331 | <field name="is_cs" string="CS" /> |
1332 | </tree> |
1333 | |
1334 | === modified file 'bin/addons/stock_forecast/wizard/stock_forecast.py' |
1335 | --- bin/addons/stock_forecast/wizard/stock_forecast.py 2019-12-12 13:30:26 +0000 |
1336 | +++ bin/addons/stock_forecast/wizard/stock_forecast.py 2020-12-02 10:15:56 +0000 |
1337 | @@ -143,7 +143,7 @@ |
1338 | 'product_family_info_id': fields.function(_get_info, type='many2one', relation='product.nomenclature', method=True, string='Product Family', multi='get_info',), |
1339 | 'procurement_method': fields.function(_get_info, type='selection', selection=[('make_to_stock','Make to Stock'),('make_to_order','Make to Order')], method=True, string='Procurement Method', multi='get_info',), |
1340 | 'supply_method': fields.function(_get_info, type='selection', selection=[('produce','Produce'),('buy','Buy')], method=True, string='Supply Method', multi='get_info',), |
1341 | - 'keep_cool': fields.function(_get_info, type='boolean', method=True, string='Keep Cool', multi='get_info',), |
1342 | + 'keep_cool': fields.function(_get_info, type='boolean', method=True, string='Cold Chain', multi='get_info',), |
1343 | 'short_shelf_life': fields.function(_get_info, type='boolean', method=True, string='Short Shelf Life', multi='get_info',), |
1344 | 'dangerous_goods': fields.function(_get_info, type='boolean', method=True, string='Dangerous Goods', multi='get_info',), |
1345 | 'justification_code_id': fields.function(_get_info, type='many2one', relation='product.justification.code', method=True, string='Justification Code', multi='get_info',), |