Skip to content

Commit 6ed5d8d

Browse files
author
Brett Wood
committed
[WIP] website_portal_medical_insurance: Fix security.
1 parent fc7aae9 commit 6ed5d8d

4 files changed

Lines changed: 6 additions & 1 deletion

File tree

website_portal_medical_insurance_us/controllers/main.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ def insurance_plan_create_form(self, redirect=None, **kwargs):
8181
values = {
8282
'error': {},
8383
'error_message': [],
84-
'success_page': kwargs.get('success_page', '/my/medical')
84+
'success_page': kwargs.get(
85+
'success_page', '/medical/insurance/plans'
86+
)
8587
}
8688
plan = request.env['medical.insurance.plan'].browse()
8789
values.update({

website_portal_medical_insurance_us/data/ir_model_data.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
'plan_id',
2929
'patient_name',
3030
'insurance_company_name',
31+
'create_uid'
3132
]"/>
3233
</function>
3334

website_portal_medical_insurance_us/demo/res_groups_demo.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<odoo>
66

77
<record id="group_medical_insurance_website" model="res.groups">
8+
<field name="name">Group Medical Insurance Website</field>
89
<field name="users" eval="[(4, ref('portal.demo_user0'))]" />
910
</record>
1011

website_portal_medical_insurance_us/wizards/website_medical_insurance_wizard.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def _compute_insurance_company_id(self):
8383
if not company:
8484
company = InsuranceCompanies.create({
8585
'name': record.insurance_company_name,
86+
'create_uid': self.env.user.id,
8687
})
8788
record.insurance_company_id = company[:1]
8889

0 commit comments

Comments
 (0)