Skip to content

Commit

Permalink
[FIX] website_sale_medical_prescription: Fix LABS-451 portal and publ…
Browse files Browse the repository at this point in the history
…ic permissions

* Remove public permissions from most things - user is portal by the time Rx checkout is happening
* Update public permission domain for res partner to fix LABS-451
  • Loading branch information
lasley committed Jul 29, 2017
1 parent 9e5bd5c commit c52b8bb
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 70 deletions.
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_medical_physician_portal,medical.physician.portal,medical_physician.model_medical_physician,base.group_portal,1,0,0,0
access_medical_physician_public,medical.physician.public,medical_physician.model_medical_physician,base.group_public,1,0,0,0
access_medical_patient_public,medical.patient.public,medical.model_medical_patient,base.group_public,1,0,0,0
access_medical_patient_portal,medical.patient.portal,medical.model_medical_patient,base.group_portal,1,0,0,0
access_res_partner_portal,res.partner.portal,base.model_res_partner,base.group_portal,1,0,0,0
access_res_partner_public,res.partner.public,base.model_res_partner,base.group_public,1,0,0,0
access_medical_prescription_order_portal,medical.prescription.order.portal,medical_prescription.model_medical_prescription_order,base.group_portal,1,0,0,0
access_medical_prescription_order_public,medical.prescription.order.public,medical_prescription.model_medical_prescription_order,base.group_public,1,0,0,0
access_medical_prescription_order_line_portal,medical.prescription.order.line.portal,medical_prescription.model_medical_prescription_order_line,base.group_portal,1,0,0,0
access_medical_prescription_order_line_public,medical.prescription.order.line.public,medical_prescription.model_medical_prescription_order_line,base.group_public,1,0,0,0
access_medical_pharmacy_portal,medical.pharmacy.portal,medical_pharmacy.model_medical_pharmacy,base.group_portal,1,0,0,0
access_medical_pharmacy_public,medical.pharmacy.public,medical_pharmacy.model_medical_pharmacy,base.group_public,1,0,0,0
access_medical_patient_medication_portal,medical.patient.medication.portal,medical_medication.model_medical_patient_medication,base.group_portal,1,0,0,0
access_medical_patient_medication_public,medical.patient.medication.public,medical_medication.model_medical_patient_medication,base.group_public,1,0,0,0
access_medical_medication_dosage_portal,medical.medication.dosage.portal,medical_medication.model_medical_medication_dosage,base.group_portal,1,0,0,0
access_medical_medication_dosage_public,medical.medication.dosage.public,medical_medication.model_medical_medication_dosage,base.group_public,1,0,0,0
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,5 @@
('patient_id.partner_id', 'child_of', [user.commercial_partner_id.id]),
]</field>
</record>

<record model="ir.rule" id="medical_patient_medication_rule_public">
<field name="name">Medical Patient Medication Rule Public</field>
<field name="model_id" ref="medical_medication.model_medical_patient_medication"/>
<field name="groups" eval="[(4, ref('base.group_public'))]"/>
<field name="domain_force">[
('patient_id.partner_id', 'child_of', [user.commercial_partner_id.id]),
]</field>
</record>


</odoo>
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,4 @@
]</field>
</record>

<record model="ir.rule" id="medical_patient_public_rule">
<field name="name">medical.patient.public.rule</field>
<field name="model_id" ref="medical.model_medical_patient"/>
<field name="groups" eval="[(4, ref('base.group_public'))]"/>
<field name="domain_force">[
('partner_id', 'child_of', [user.commercial_partner_id.id]),
]</field>
</record>

</odoo>
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@

<odoo>

<record model="ir.rule" id="medical_pharmacy_rule_public">
<field name="name">medical.pharmacy.rule.public</field>
<field name="model_id" ref="medical_pharmacy.model_medical_pharmacy"/>
<field name="groups" eval="[(4, ref('base.group_public'))]"/>
<field name="domain_force">['|',
('is_verified', '=', True),
('create_uid', '=', user.id),
]</field>
</record>

<record model="ir.rule" id="medical_pharmacy_rule_portal">
<field name="name">medical.pharmacy.rule.portal</field>
<field name="model_id" ref="medical_pharmacy.model_medical_pharmacy"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@
-->

<odoo>

<record model="ir.rule" id="medical_physician_rule_public">
<field name="name">medical.physician.rule.public</field>
<field name="model_id" ref="medical_physician.model_medical_physician"/>
<field name="groups" eval="[(4, ref('base.group_public'))]"/>
<field name="domain_force">['|',
('is_verified', '=', True),
('create_uid', '=', user.id),
]</field>
</record>

<record model="ir.rule" id="medical_physician_rule_portal">
<field name="name">medical.physician.rule.portal</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,5 @@
('patient_id.partner_id', 'child_of', [user.commercial_partner_id.id]),
]</field>
</record>

<record model="ir.rule" id="medical_prescription_order_rule_public">
<field name="name">Medical Prescription Order Rule Public</field>
<field name="model_id" ref="medical_prescription.model_medical_prescription_order"/>
<field name="groups" eval="[(4, ref('base.group_public'))]"/>
<field name="domain_force">[
('patient_id.partner_id', 'child_of', [user.commercial_partner_id.id]),
]</field>
</record>


</odoo>
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,7 @@
<field name="name">res.partner.portal.rule</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="groups" eval="[(4, ref('base.group_portal'))]"/>
<field name="domain_force">['|',
('id', 'child_of', [user.commercial_partner_id.id]),
('parent_id', 'child_of', [user.commercial_partner_id.id]),
('type', '=', 'medical.physician'),
('type', '=', 'medical.pharmacy'),
('create_uid', '=', user.id),
]</field>
</record>
<record model="ir.rule" id="res_partner_public_rule">
<field name="name">res.partner.public.rule</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="groups" eval="[(4, ref('base.group_public'))]"/>
<field name="domain_force">['|',
<field name="domain_force">['|', '|', '|', '|',
('id', 'child_of', [user.commercial_partner_id.id]),
('parent_id', 'child_of', [user.commercial_partner_id.id]),
('type', '=', 'medical.physician'),
Expand Down

0 comments on commit c52b8bb

Please sign in to comment.