Skip to content

Commit

Permalink
Merge branch '2.x' into recalculate-dependanty-if-uncertainty-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
xispa authored Feb 12, 2025
2 parents 81c69e2 + a7a4bc2 commit e3eb309
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 18 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Changelog
------------------

- #2673 Trigger recalculation of dependants if uncertainty changes
- #2674 Fix partitions not displayed correctly in batch samples listing
- #2672 Fix rejected sample analyses are re-added on profile removal
- #2670 Flush calculated result if dependency is flushed
- #2667 Specifications support for multi-result analyses
Expand Down
15 changes: 5 additions & 10 deletions src/bika/lims/browser/batch/analysisrequests.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,10 @@
# Copyright 2018-2024 by it's authors.
# Some rights reserved, see README and LICENSE.

from bika.lims import api
from bika.lims.browser.analysisrequest import AnalysisRequestsView as BaseView
# flake8: noqa

from senaite.core.browser.batches.samples import \
SamplesView as AnalysisRequestsView
from zope import deprecation

class AnalysisRequestsView(BaseView):

def __init__(self, context, request):
super(AnalysisRequestsView, self).__init__(context, request)
self.contentFilter = {"portal_type": "AnalysisRequest",
"getBatchUID": api.get_uid(self.context),
"sort_on": "created",
"sort_order": "reverse"}
deprecation.deprecated("AnalysisRequestsView", "Moved to senaite.core.browser.batches.samples.SamplesView")
8 changes: 0 additions & 8 deletions src/bika/lims/browser/batch/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@
xmlns:i18n="http://namespaces.zope.org/i18n"
i18n_domain="senaite.core">

<browser:page
for="bika.lims.interfaces.IBatch"
name="analysisrequests"
class="bika.lims.browser.batch.analysisrequests.AnalysisRequestsView"
permission="zope2.View"
layer="bika.lims.interfaces.IBikaLIMS"
/>

<browser:page
for="bika.lims.interfaces.IBatch"
name="batchbook"
Expand Down
Empty file.
14 changes: 14 additions & 0 deletions src/senaite/core/browser/batches/configure.zcml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:browser="http://namespaces.zope.org/browser">

<browser:page
for="bika.lims.interfaces.IBatch"
name="analysisrequests"
class=".samples.SamplesView"
permission="zope2.View"
layer="senaite.core.interfaces.ISenaiteCore"
/>

</configure>
19 changes: 19 additions & 0 deletions src/senaite/core/browser/batches/samples.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-

from bika.lims import api
from senaite.core.browser.samples.view import SamplesView as BaseView


class SamplesView(BaseView):
"""Samples listing inside Batches
"""

def __init__(self, context, request):
super(SamplesView, self).__init__(context, request)
self.contentFilter = {
"portal_type": "AnalysisRequest",
"getBatchUID": api.get_uid(self.context),
"sort_on": "created",
"sort_order": "reverse",
"isRootAncestor": True, # only root ancestors
}
1 change: 1 addition & 0 deletions src/senaite/core/browser/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

<!-- Package includes -->
<include package=".attachment"/>
<include package=".batches"/>
<include package=".batching"/>
<include package=".bootstrap"/>
<include package=".clients"/>
Expand Down

0 comments on commit e3eb309

Please sign in to comment.