Skip to content

Commit 0859a0b

Browse files
Pau Solivaxispa
Pau Soliva
authored andcommitted
Unable to Deactivate Doctors (senaite#141)
* New transition permissions for Doctor * New states, transitions and formating for Doctor object * Upgrade step + delete state * clean import section * Not allow Analysts, Samplers and Preservers to modify a Doctor * Fix typo and upgrade step * Update CHANGES.rst
1 parent 4d92f67 commit 0859a0b

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGES.rst

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Changelog
1717

1818
**Fixed**
1919

20+
- #141 Unable to Deactivate Doctors
2021
- #137 Client reference widget does not work in Add Patient overlay
2122
- #133 System clearing patient first name on editing patient
2223
- #132 Autofill Batch field in Sample Add form when Batch defined in request

bika/health/profiles/default/workflows/senaite_health_doctor_workflow/definition.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
<transition transition_id="deactivate" title="Deactivate" new_state="inactive" trigger="USER" before_script="" after_script="" i18n:attributes="title">
9999
<action url="" category="workflow" icon="">Deactivate</action>
100100
<guard>
101-
<guard-permission>senaite.core: Transition: Deactivate Doctor</guard-permission>
101+
<guard-permission>senaite.health: Transition: Deactivate Doctor</guard-permission>
102102
<guard-expression>python:here.guard_handler("deactivate")</guard-expression>
103103
</guard>
104104
</transition>

bika/health/upgrade/v01_02_002.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def upgrade(tool):
4444
version))
4545

4646
# -------- ADD YOUR STUFF BELOW --------
47+
setup.runImportStepFromProfile(profile, 'rolemap')
4748
setup.runImportStepFromProfile(profile, 'workflow')
4849

4950
apply_doctor_permissions_for_clients(portal, ut)
@@ -54,7 +55,7 @@ def upgrade(tool):
5455

5556
def apply_doctor_permissions_for_clients(portal, ut):
5657
workflow_tool = api.get_tool("portal_workflow")
57-
workflow = workflow_tool.getWorkflowById('bika_doctor_workflow')
58+
workflow = workflow_tool.getWorkflowById('senaite_health_doctor_workflow')
5859
catalog = api.get_tool('portal_catalog')
5960

6061
brains = catalog(portal_type='Doctor')

0 commit comments

Comments
 (0)