Skip to content
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

PHWAY-13 Decimal point not visible after edition #149

Merged
merged 1 commit into from
Jun 30, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions bika/lims/browser/analyses.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ def __init__(self, context, request, **kwargs):
self.rc = getToolByName(context, REFERENCE_CATALOG)
# Initializing the deximal mark variable
self.dmk = ''
self.scinot = ''
request.set('disable_plone.rightcolumn', 1)

# each editable item needs it's own allow_edit
Expand Down Expand Up @@ -666,15 +667,15 @@ def folderitem(self, obj, item, index):
if can_view_result:
full_obj = full_obj if full_obj else obj.getObject()
item['Result'] = result
scinot = self.context.bika_setup.getScientificNotationResults()
item['formatted_result'] = \
full_obj.getFormattedResult(
sciformat=int(scinot), decimalmark=self.dmk)
sciformat=int(self.scinot), decimalmark=self.dmk)

# LIMS-1379 Allow manual uncertainty value input
# https://jira.bikalabs.com/browse/LIMS-1379
fu = format_uncertainty(
full_obj, result, decimalmark=self.dmk, sciformat=int(scinot))
full_obj, result, decimalmark=self.dmk, sciformat=int(
self.scinot))
fu = fu if fu else ''
if can_edit_analysis and full_obj.getAllowManualUncertainty():
unc = full_obj.getUncertainty(result)
Expand Down Expand Up @@ -947,11 +948,11 @@ def folderitems(self):
# Getting the multi-verification type of bika_setup
self.mv_type = self.context.bika_setup.getTypeOfmultiVerification()
self.show_methodinstr_columns = False
self.dmk = self.context.bika_setup.getResultsDecimalMark()
self.scinot = self.context.bika_setup.getScientificNotationResults()
# Gettin all the items
items = super(AnalysesView, self).folderitems(classic=False)

self.dmk = self.context.bika_setup.getResultsDecimalMark()

# the TAL requires values for all interim fields on all
# items, so we set blank values in unused cells
for item in items:
Expand Down