-
-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove deprecation warnings. #353
Changes from all commits
c839618
d5e82be
334d860
8dbdc74
622b5c4
5f481e8
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -540,7 +540,7 @@ def get_mail_subject(self, ar): | |
css = [] | ||
blanks_found = False | ||
if ai: | ||
ais.append(ar.getRequestID()) | ||
ais.append(ar.getId()) | ||
if co: | ||
if ar.getClientOrderNumber(): | ||
if not ar.getClientOrderNumber() in cos: | ||
|
@@ -1183,7 +1183,6 @@ def _sampler_data(self, sample=None): | |
'home_phone': contact.getHomePhone() if contact else '', | ||
'mobile_phone': contact.getMobilePhone() if contact else '', | ||
'job_title': to_utf8(contact.getJobTitle()) if contact else '', | ||
'department': to_utf8(contact.getDepartment()) if contact else '', | ||
'physical_address': physical_address, | ||
'postal_address': postal_address, | ||
'home_page': to_utf8(mhomepage)} | ||
|
@@ -1280,7 +1279,7 @@ def _analyses_data(self, ar, analysis_states=None): | |
showhidden = self.isHiddenAnalysesVisible() | ||
|
||
catalog = get_tool(CATALOG_ANALYSIS_LISTING) | ||
brains = catalog({'getAnalysisRequestUID': ar.UID(), | ||
brains = catalog({'getRequestUID': ar.UID(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no index There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please note there is an index There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Forget about this... I've seen now you already changed the index names in catalog. |
||
'review_state': analysis_states, | ||
'sort_on': 'sortable_title'}) | ||
for brain in brains: | ||
|
@@ -1569,4 +1568,4 @@ def _format_address(address): | |
keys = ['address', 'city', 'district', 'state', 'zip', 'country'] | ||
addr = ''.join(["<span>%s</span>" % address.get(v) for v in keys | ||
if address.get(v, None)]) | ||
return "<div class='address'>%s</div>" % addr | ||
return "<div class='address'>%s</div>" % addr |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,7 +88,7 @@ def __call__(self): | |
self.request, | ||
getPointOfCapture=poc, | ||
show_categories=self.context.bika_setup.getCategoriseAnalysisServices(), | ||
getAnalysisRequestUID=self.context.UID()) | ||
getRequestUID=self.context.UID()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See comments above re |
||
t.allow_edit = True | ||
t.form_id = "%s_analyses" % poc | ||
t.review_states[0]['transitions'] = [{'id': 'submit'}, | ||
|
@@ -140,7 +140,7 @@ def __call__(self): | |
'listed here for trace-ability purposes. Please follow ' | ||
'the link to the retest') | ||
if childar: | ||
message = (message + " %s.") % childar.getRequestID() | ||
message = (message + " %s.") % childar.getId() | ||
else: | ||
message = message + "." | ||
self.addMessage(message, 'warning') | ||
|
@@ -153,7 +153,7 @@ def __call__(self): | |
'generated automatically due to ' | ||
'the retraction of the Analysis ' | ||
'Request ${retracted_request_id}.', | ||
mapping={'retracted_request_id': par.getRequestID()}) | ||
mapping={'retracted_request_id': par.getId()}) | ||
self.addMessage(message, 'info') | ||
self.renderMessages() | ||
return self.template() | ||
|
@@ -314,7 +314,7 @@ def SelectedServices(self): | |
bac = getToolByName(self.context, 'bika_analysis_catalog') | ||
res = [] | ||
for analysis in bac(portal_type="Analysis", | ||
getRequestID=self.context.RequestID): | ||
getRequestID=self.context.getId()): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good catch!. Was this working before? (because |
||
analysis = analysis.getObject() | ||
res.append([analysis.getPointOfCapture(), | ||
analysis.getCategoryUID(), | ||
|
@@ -458,7 +458,7 @@ def get_custom_fields(self): | |
if workflow.getInfoFor(ar, 'review_state') == 'invalid': | ||
childar = hasattr(ar, 'getChildAnalysisRequest') \ | ||
and ar.getChildAnalysisRequest() or None | ||
anchor = childar and ("<a href='%s'>%s</a>" % (childar.absolute_url(), childar.getRequestID())) or None | ||
anchor = childar and ("<a href='%s'>%s</a>" % (childar.absolute_url(), childar.getId())) or None | ||
if anchor: | ||
custom['ChildAR'] = { | ||
'title': t(_("AR for retested results")), | ||
|
@@ -469,7 +469,7 @@ def get_custom_fields(self): | |
if hasattr(ar, 'getParentAnalysisRequest') \ | ||
and ar.getParentAnalysisRequest(): | ||
par = ar.getParentAnalysisRequest() | ||
anchor = "<a href='%s'>%s</a>" % (par.absolute_url(), par.getRequestID()) | ||
anchor = "<a href='%s'>%s</a>" % (par.absolute_url(), par.getId()) | ||
custom['ParentAR'] = { | ||
'title': t(_("Invalid AR retested")), | ||
'value': anchor | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait,
getRequestUID
is used inAnalysesView
as a content filter key-value: https://github.com/senaite/bika.lims/blob/senaite-integration/bika/lims/browser/analyses.py#L45But there is no index
getRequestUID
inbika_analysis_catalog
. Keep the old onegetAnalysisRequestUID
instead: https://github.com/senaite/bika.lims/blob/senaite-integration/bika/lims/catalog/analysis_catalog.py#L26There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please note there is an index
getRequestID
though (noteID
notUID
): https://github.com/senaite/bika.lims/blob/senaite-integration/bika/lims/catalog/analysis_catalog.py#L36 .... ummm.... mental note for future @xispa we need to avoid missunderstandings here and better to only have two indexes with the same patterngetRequestUID
+getRequestID
instead ofgetAnalysisRequestUID
+getRequestID
.... confusing storyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forget about this... I've seen now you already changed the index names in catalog.