[IMP] website_profile: add karma_profile_min field to view

before this commit, currently the field karma_profile_min
field in website model is not added in any views and
the default value set for the field is 150, as it is
not added in any views, the end users have no option to
change the value of this field.

this field value is used in _check_user_profile_access
function and thus the non logged in users or logged in
users with karma less than 150(default value) is not
able to open any public profiles.

after this commit, end users is not able to change
the default value set for the field and also default
value is changed to 0.

closes odoo/odoo#123411

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
niyasraphy
2023-07-14 15:34:41 +02:00
parent 69d6715491
commit 538f9222e1
2 changed files with 16 additions and 0 deletions
+1
View File
@@ -15,6 +15,7 @@
'data/mail_template_data.xml',
'views/gamification_badge_views.xml',
'views/website_profile.xml',
'views/website_views.xml',
'security/ir.model.access.csv',
],
'assets': {
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="website_view_form" model="ir.ui.view">
<field name="name">website.form.view</field>
<field name="model">website</field>
<field name="inherit_id" ref="website.view_website_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='default_lang_id']" position="after">
<field name="karma_profile_min"/>
</xpath>
</field>
</record>
</odoo>