diff --git a/CHANGES.rst b/CHANGES.rst index eb88f13818..db09a156b8 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -6,6 +6,7 @@ Changelog **Added** +- #1588 Dynamic Analysis Specs: Lookup dynamic spec only when the specification is set - #1586 Allow to configure the variables for IDServer with an Adapter - #1584 Date (yymmdd) support in IDs generation - #1582 Allow to retest analyses without the need of retraction @@ -14,6 +15,7 @@ Changelog **Changed** +- #1588 Dynamic Analysis Specs: Hide compliance viewlets - #1579 Remove classic mode in folderitems - #1577 Do not force available workflow transitions in batches listing - #1573 Do not display top-level "Clients" folder to non-lab users diff --git a/bika/lims/browser/viewlets/analysisrequest.py b/bika/lims/browser/viewlets/analysisrequest.py index a1e32397e6..7cdb19e7b3 100644 --- a/bika/lims/browser/viewlets/analysisrequest.py +++ b/bika/lims/browser/viewlets/analysisrequest.py @@ -97,6 +97,13 @@ class ResultsRangesOutOfDateViewlet(ViewletBase): specification ranges will be used instead of the new ones. """ + def available(self): + spec = self.context.getSpecification() + if spec: + dynamic_spec = spec.getDynamicAnalysisSpec() + return not dynamic_spec + return True + def is_specification_editable(self): """Returns whether the Specification field is editable or not """ @@ -136,6 +143,13 @@ class SpecificationNotCompliantViewlet(ViewletBase): analyses are different from the Specification initially set. """ + def available(self): + spec = self.context.getSpecification() + if spec: + dynamic_spec = spec.getDynamicAnalysisSpec() + return not dynamic_spec + return True + def is_specification_editable(self): """Returns whether the Specification field is editable or not """ diff --git a/bika/lims/browser/viewlets/templates/resultsranges_out_of_date_viewlet.pt b/bika/lims/browser/viewlets/templates/resultsranges_out_of_date_viewlet.pt index dfe1b31dcd..d2b1ee88e8 100644 --- a/bika/lims/browser/viewlets/templates/resultsranges_out_of_date_viewlet.pt +++ b/bika/lims/browser/viewlets/templates/resultsranges_out_of_date_viewlet.pt @@ -1,15 +1,14 @@
-
-
+ alert_class python: 'portlet-alert-item alert {} alert-dismissible'.format(alert_class); + out_of_date python:view.is_results_ranges_out_of_date()" + tal:condition="out_of_date">