@@ 2347-2364 (lines=18) @@ | ||
2344 | ||
2345 | self.load_analysis_interims(obj) |
|
2346 | ||
2347 | def load_analysis_interims(self, analysis): |
|
2348 | sheetname = 'Reference Analysis Interims' |
|
2349 | if not hasattr(self, 'interim_worksheet'): |
|
2350 | worksheet = self.workbook[sheetname] |
|
2351 | if not worksheet: |
|
2352 | return |
|
2353 | self.interim_worksheet = worksheet |
|
2354 | interims = [] |
|
2355 | for row in self.get_rows(3, worksheet=self.interim_worksheet): |
|
2356 | if row['ReferenceAnalysis_id'] != analysis.getId(): |
|
2357 | continue |
|
2358 | interims.append({ |
|
2359 | 'keyword': row['keyword'], |
|
2360 | 'title': row['title'], |
|
2361 | 'value': row['value'], |
|
2362 | 'unit': row['unit'], |
|
2363 | 'hidden': row['hidden']}) |
|
2364 | analysis.setInterimFields(interims) |
|
2365 | ||
2366 | def Import(self): |
|
2367 | client_cat = api.get_tool(CLIENT_CATALOG) |
|
@@ 2255-2272 (lines=18) @@ | ||
2252 | ||
2253 | self.load_reference_analysis_interims(obj) |
|
2254 | ||
2255 | def load_reference_analysis_interims(self, analysis): |
|
2256 | sheetname = 'Reference Analysis Interims' |
|
2257 | if not hasattr(self, 'interim_worksheet'): |
|
2258 | worksheet = self.workbook[sheetname] |
|
2259 | if not worksheet: |
|
2260 | return |
|
2261 | self.interim_worksheet = worksheet |
|
2262 | interims = [] |
|
2263 | for row in self.get_rows(3, worksheet=self.interim_worksheet): |
|
2264 | if row['ReferenceAnalysis_id'] != analysis.getId(): |
|
2265 | continue |
|
2266 | interims.append({ |
|
2267 | 'keyword': row['keyword'], |
|
2268 | 'title': row['title'], |
|
2269 | 'value': row['value'], |
|
2270 | 'unit': row['unit'], |
|
2271 | 'hidden': row['hidden']}) |
|
2272 | analysis.setInterimFields(interims) |
|
2273 | ||
2274 | def Import(self): |
|
2275 | bsc = getToolByName(self.context, SETUP_CATALOG) |