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

Compatibility with core#2584 (SampleType to DX) #63

Merged
merged 4 commits into from
Aug 4, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ Changelog
2.6.0 (unreleased)
------------------

- #63 Compatibility with senaite.core#2584 (SampleType to DX)
- #61 Compatibility with senaite.core#2567 (AnalysisCategory to DX)
- #61 Compatibility with senaite.core#2471 (Department to DX)

Expand Down
2 changes: 1 addition & 1 deletion docs/crud.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Body Content type (application/json):
"hours": 0,
"minutes": 0
},
"parent_path": "/senaite/bika_setup/bika_sampletypes"
"parent_path": "/senaite/setup/sampletypes"
}


Expand Down
8 changes: 4 additions & 4 deletions src/senaite/jsonapi/tests/doctests/create.rst
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ System will fail with a 400 error when trying to create an object without a
required attribute:

>>> data = {"portal_type": "SampleType",
... "parent_path": api.get_path(setup.bika_sampletypes),
... "parent_path": api.get_path(portal.setup.sampletypes),
... "MinimumVolume": "20 ml",
... "title": "Fresh Egg",
... "Prefix": "FE"}
Expand Down Expand Up @@ -177,7 +177,7 @@ Create a Sample Type
~~~~~~~~~~~~~~~~~~~~

>>> data = {"portal_type": "SampleType",
... "parent_path": api.get_path(setup.bika_sampletypes),
... "parent_path": api.get_path(portal.setup.sampletypes),
... "title": "Fresh Egg",
... "MinimumVolume": "10 gr",
... "AdmittedStickerTemplates": [{"admitted": ["QR_1x14mmx39mm.pt"], "small_default": ["QR_1x14mmx39mm.pt"], "large_default": ["QR_1x14mmx39mm.pt"]}],
Expand All @@ -188,7 +188,7 @@ Create a Sample Type
>>> sample_type.getPrefix()
'FE'
>>> api.get_parent(sample_type)
<SampleTypes at /plone/bika_setup/bika_sampletypes>
<SampleTypes at /plone/setup/sampletypes>


Create a Laboratory Contact
Expand Down Expand Up @@ -300,7 +300,7 @@ instead of the plone's default creation.
['Ecoli', 'Sal']

>>> sample.getSampleType()
<SampleType at /plone/bika_setup/bika_sampletypes/sampletype-2>
<SampleType at /plone/setup/sampletypes/sampletype-2>

>>> sample.getClient()
<Client at /plone/clients/client-7>
Expand Down
4 changes: 2 additions & 2 deletions src/senaite/jsonapi/tests/doctests/search.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ Functional Helpers:
... api.create(portal.clients, "Client", title="Happy Hills", ClientID="HH")
... api.create(portal.clients, "Client", title="ACME", ClientID="AC")
... api.create(portal.clients, "Client", title="Fill the gap", ClientID="FG")
... api.create(setup.bika_sampletypes, "SampleType", title="Water", Prefix="W")
... api.create(setup.bika_sampletypes, "SampleType", title="Dust", Prefix="D")
... api.create(portal.setup.sampletypes, "SampleType", title="Water", Prefix="W")
... api.create(portal.setup.sampletypes, "SampleType", title="Dust", Prefix="D")
... transaction.commit()

Variables:
Expand Down
Loading