summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Delavallée <tde@openerp.com>2013-10-08 13:35:45 +0200
committerThibault Delavallée <tde@openerp.com>2013-10-08 13:35:45 +0200
commite541755ae46bb4ccf2354ce5b7d6e32aa354b8bd (patch)
tree09bcb438b0edacff29e766de71fb624a30cc9410
parent567765166882f5d28031aec4e75b231d30553e35 (diff)
[MOV] portal: moved portal group into base.
Updated security rules. Basic res_partner rules are moved into base. Added rule with website_published. bzr revid: tde@openerp.com-20131008113545-gpqydx0b199lcqpy
-rw-r--r--addons/crm_partner_assign/portal_data.xml10
-rw-r--r--addons/crm_partner_assign/wizard/crm_forward_to_partner.py2
-rw-r--r--addons/event/event_view.xml2
-rw-r--r--addons/portal/__openerp__.py1
-rw-r--r--addons/portal/portal_data.xml2
-rw-r--r--addons/portal/portal_demo.xml2
-rw-r--r--addons/portal/portal_view.xml8
-rw-r--r--addons/portal/security/ir.model.access.csv11
-rw-r--r--addons/portal/security/portal_security.xml16
-rw-r--r--addons/portal/tests/test_portal.py2
-rw-r--r--addons/portal_claim/security/ir.model.access.csv4
-rw-r--r--addons/portal_claim/security/portal_security.xml2
-rw-r--r--addons/portal_event/security/ir.model.access.csv4
-rw-r--r--addons/portal_event/security/portal_security.xml4
-rw-r--r--addons/portal_hr_employees/security/ir.model.access.csv2
-rw-r--r--addons/portal_project/security/ir.model.access.csv12
-rw-r--r--addons/portal_project/security/portal_security.xml4
-rw-r--r--addons/portal_project/tests/test_access_rights.py2
-rw-r--r--addons/portal_project_issue/security/ir.model.access.csv4
-rw-r--r--addons/portal_project_issue/security/portal_security.xml2
-rw-r--r--addons/portal_project_long_term/security/ir.model.access.csv2
-rw-r--r--addons/portal_project_long_term/security/portal_security.xml2
-rw-r--r--addons/portal_sale/security/ir.model.access.csv38
-rw-r--r--addons/portal_sale/security/portal_security.xml8
-rw-r--r--addons/portal_stock/security/ir.model.access.csv8
-rw-r--r--addons/portal_stock/security/portal_security.xml4
-rw-r--r--addons/website_partner/__openerp__.py1
-rw-r--r--addons/website_partner/security/website_partner_security.xml18
28 files changed, 89 insertions, 88 deletions
diff --git a/addons/crm_partner_assign/portal_data.xml b/addons/crm_partner_assign/portal_data.xml
index 0d4a5b30abd..6544f3f9d4e 100644
--- a/addons/crm_partner_assign/portal_data.xml
+++ b/addons/crm_partner_assign/portal_data.xml
@@ -6,7 +6,7 @@
<record id="res_partner_access" model="ir.model.access">
<field name="name">openerp.portal.res.partner</field>
<field name="model_id" ref="base.model_res_partner"/>
- <field name="group_id" ref="portal.group_portal"/>
+ <field name="group_id" ref="base.group_portal"/>
<field name="perm_read" eval="1"/>
<field name="perm_create" eval="0"/>
<field name="perm_write" eval="0"/>
@@ -15,13 +15,13 @@
<record id="res_partner_rule" model="ir.rule">
<field name="name">openerp.portal.res.partner</field>
<field name="model_id" ref="base.model_res_partner"/>
- <field name="groups" eval="[(6,0,[ref('portal.group_portal')])]"/>
+ <field name="groups" eval="[(6,0,[ref('base.group_portal')])]"/>
<field name="domain_force">[('id','child_of',user.commercial_partner_id.id)]</field>
</record>
<record id="res_partner_grade_access" model="ir.model.access">
<field name="name">openerp.portal.res.partner.grade</field>
<field name="model_id" ref="crm_partner_assign.model_res_partner_grade"/>
- <field name="group_id" ref="portal.group_portal"/>
+ <field name="group_id" ref="base.group_portal"/>
<field name="perm_read" eval="1"/>
<field name="perm_create" eval="0"/>
<field name="perm_write" eval="0"/>
@@ -32,13 +32,13 @@
<record id="assigned_lead_portal_rule_1" model="ir.rule">
<field name="name">openerp.portal.crm.lead</field>
<field name="model_id" ref="crm.model_crm_lead"/>
- <field name="groups" eval="[(6,0,[ref('portal.group_portal')])]"/>
+ <field name="groups" eval="[(6,0,[ref('base.group_portal')])]"/>
<field name="domain_force">[('partner_assigned_id','child_of',user.commercial_partner_id.id)]</field>
</record>
<record id="lead_portal_access" model="ir.model.access">
<field name="name">openerp.portal.crm.lead</field>
<field name="model_id" ref="crm.model_crm_lead"/>
- <field name="group_id" ref="portal.group_portal"/>
+ <field name="group_id" ref="base.group_portal"/>
<field name="perm_read" eval="1"/>
<field name="perm_create" eval="0"/>
<field name="perm_write" eval="1"/>
diff --git a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
index 80fa2f28b04..ba2ffd68c53 100644
--- a/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
+++ b/addons/crm_partner_assign/wizard/crm_forward_to_partner.py
@@ -87,7 +87,7 @@ class crm_lead_forward_to_partner(osv.TransientModel):
raise osv.except_osv(_('Email Template Error'),
_('The Forward Email Template is not in the database'))
try:
- portal_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'portal', 'group_portal')[1]
+ portal_id = self.pool.get('ir.model.data').get_object_reference(cr, uid, 'base', 'group_portal')[1]
except ValueError:
raise osv.except_osv(_('Portal Group Error'),
_('The Portal group cannot be found'))
diff --git a/addons/event/event_view.xml b/addons/event/event_view.xml
index 01994694e43..e1ea6e95af9 100644
--- a/addons/event/event_view.xml
+++ b/addons/event/event_view.xml
@@ -227,7 +227,7 @@
</i>
</t>
</p>
- <div groups="base.group_user,portal.group_portal">
+ <div groups="base.group_user,base.group_portal">
<t t-if="record.register_avail.raw_value gt 0 and record.register_avail.raw_value lt 9999">
<t t-if="!record.is_subscribed.raw_value">
<input t-att-id="record.id.raw_value" type="text" name="subscribe" class="no_of_seats" value="1" onchange="document.getElementById('btn_sub' +this.id).setAttribute('data-context',JSON.stringify({'ticket':this.value}))"/>
diff --git a/addons/portal/__openerp__.py b/addons/portal/__openerp__.py
index e2bdde949f9..c747409207a 100644
--- a/addons/portal/__openerp__.py
+++ b/addons/portal/__openerp__.py
@@ -49,7 +49,6 @@ very handy when used in combination with the module 'share'.
'wizard/share_wizard_view.xml',
'acquirer_view.xml',
'security/ir.model.access.csv',
- 'security/portal_security.xml',
],
'demo': ['portal_demo.xml'],
'css': ['static/src/css/portal.css'],
diff --git a/addons/portal/portal_data.xml b/addons/portal/portal_data.xml
index 633a3fc0fbd..3fec4d7e1ee 100644
--- a/addons/portal/portal_data.xml
+++ b/addons/portal/portal_data.xml
@@ -3,7 +3,7 @@
<data noupdate="1">
<!-- The portal group -->
- <record id="group_portal" model="res.groups">
+ <record id="base.group_portal" model="res.groups">
<field name="name">Portal</field>
<field name="comment">Portal members have specific access rights (such as record rules and restricted menus).
They usually do not belong to the usual OpenERP groups.</field>
diff --git a/addons/portal/portal_demo.xml b/addons/portal/portal_demo.xml
index 2f61c997e08..81118b52c73 100644
--- a/addons/portal/portal_demo.xml
+++ b/addons/portal/portal_demo.xml
@@ -22,7 +22,7 @@ Mr Demo Portal</field>
</record>
<!-- Add the demo user to the portal (and therefore to the portal member group) -->
- <record id="group_portal" model="res.groups">
+ <record id="base.group_portal" model="res.groups">
<field name="users" eval="[(4,ref('demo_user0'))]"/>
</record>
diff --git a/addons/portal/portal_view.xml b/addons/portal/portal_view.xml
index 1c6c18bca08..bd2b6a251b2 100644
--- a/addons/portal/portal_view.xml
+++ b/addons/portal/portal_view.xml
@@ -5,10 +5,10 @@
<!-- Top menu item -->
<menuitem name="Portal"
id="portal_menu"
- groups="portal.group_portal"
+ groups="base.group_portal"
sequence="15"/>
- <menuitem name="Messaging" id="portal_messages" parent="portal_menu" sequence="10" groups="portal.group_portal"/>
+ <menuitem name="Messaging" id="portal_messages" parent="portal_menu" sequence="10" groups="base.group_portal"/>
<record id="action_mail_inbox_feeds_portal" model="ir.actions.client">
<field name="name">Inbox</field>
@@ -99,9 +99,9 @@
</record>
<menuitem name="Inbox" id="portal_inbox" parent="portal_messages"
- action="action_mail_inbox_feeds_portal" sequence="10" groups="portal.group_portal"/>
+ action="action_mail_inbox_feeds_portal" sequence="10" groups="base.group_portal"/>
<menuitem name="Archives" id="portal_mail_archivesfeeds" parent="portal_messages"
- action="action_mail_archives_feeds_portal" sequence="30" groups="portal.group_portal"/>
+ action="action_mail_archives_feeds_portal" sequence="30" groups="base.group_portal"/>
<!--
Create menu items that we'll leave empty for now - they'll be
diff --git a/addons/portal/security/ir.model.access.csv b/addons/portal/security/ir.model.access.csv
index 26b0b4895e8..7676f0a9d2b 100644
--- a/addons/portal/security/ir.model.access.csv
+++ b/addons/portal/security/ir.model.access.csv
@@ -1,9 +1,8 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_mail_message_portal,mail.message.portal,mail.model_mail_message,group_portal,1,1,1,1
-access_mail_mail_portal,mail.mail.portal,mail.model_mail_mail,group_portal,1,1,1,0
-access_mail_notification_portal,mail.notification.portal,mail.model_mail_notification,group_portal,1,1,1,0
-access_mail_followers_portal,mail.followers.portal,mail.model_mail_followers,group_portal,1,1,0,0
-access_res_partner_portal,res.partner.portal,base.model_res_partner,portal.group_portal,1,0,0,0
+access_mail_message_portal,mail.message.portal,mail.model_mail_message,base.group_portal,1,1,1,1
+access_mail_mail_portal,mail.mail.portal,mail.model_mail_mail,base.group_portal,1,1,1,0
+access_mail_notification_portal,mail.notification.portal,mail.model_mail_notification,base.group_portal,1,1,1,0
+access_mail_followers_portal,mail.followers.portal,mail.model_mail_followers,base.group_portal,1,1,0,0
access_acquirer,portal.payment.acquirer,portal.model_portal_payment_acquirer,,1,0,0,0
access_acquirer_all,portal.payment.acquirer,portal.model_portal_payment_acquirer,base.group_system,1,1,1,1
-access_ir_attachment_group_portal,ir.attachment group_portal,base.model_ir_attachment,portal.group_portal,1,0,1,0 \ No newline at end of file
+access_ir_attachment_group_portal,ir.attachment group_portal,base.model_ir_attachment,base.group_portal,1,0,1,0 \ No newline at end of file
diff --git a/addons/portal/security/portal_security.xml b/addons/portal/security/portal_security.xml
deleted file mode 100644
index 303be6cd32b..00000000000
--- a/addons/portal/security/portal_security.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<openerp>
- <data noupdate="1">
-
- <record id="portal_read_own_res_partner" model="ir.rule">
- <field name="name">res_partner: read access on my partner</field>
- <field name="model_id" ref="base.model_res_partner"/>
- <field name="domain_force">[('id', 'child_of', user.commercial_partner_id.id)]</field>
- <field name="groups" eval="[(4, ref('group_portal')), (4, ref('base.group_public'))]"/>
- <field name="perm_create" eval="False"/>
- <field name="perm_unlink" eval="False"/>
- <field name="perm_write" eval="False"/>
- </record>
-
- </data>
-</openerp>
diff --git a/addons/portal/tests/test_portal.py b/addons/portal/tests/test_portal.py
index 4d301458365..364c1a1ccef 100644
--- a/addons/portal/tests/test_portal.py
+++ b/addons/portal/tests/test_portal.py
@@ -31,7 +31,7 @@ class test_portal(TestMail):
cr, uid = self.cr, self.uid
# Find Portal group
- group_portal = self.registry('ir.model.data').get_object(cr, uid, 'portal', 'group_portal')
+ group_portal = self.registry('ir.model.data').get_object(cr, uid, 'base', 'group_portal')
self.group_portal_id = group_portal.id
# Create Chell (portal user)
diff --git a/addons/portal_claim/security/ir.model.access.csv b/addons/portal_claim/security/ir.model.access.csv
index 4fcfd0f947f..8be58df4124 100644
--- a/addons/portal_claim/security/ir.model.access.csv
+++ b/addons/portal_claim/security/ir.model.access.csv
@@ -1,3 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_crm_claim,crm.claim,crm_claim.model_crm_claim,portal.group_portal,1,0,1,0
-access_crm_claim_stage,crm.claim.stage,crm_claim.model_crm_claim_stage,portal.group_portal,1,0,0,0
+access_crm_claim,crm.claim,crm_claim.model_crm_claim,base.group_portal,1,0,1,0
+access_crm_claim_stage,crm.claim.stage,crm_claim.model_crm_claim_stage,base.group_portal,1,0,0,0
diff --git a/addons/portal_claim/security/portal_security.xml b/addons/portal_claim/security/portal_security.xml
index af5261c408b..de6d5cd9894 100644
--- a/addons/portal_claim/security/portal_security.xml
+++ b/addons/portal_claim/security/portal_security.xml
@@ -6,7 +6,7 @@
<field name="name">Portal Personal Claims</field>
<field ref="crm_claim.model_crm_claim" name="model_id"/>
<field name="domain_force">[('message_follower_ids','in', [user.partner_id.id])]</field>
- <field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
+ <field name="groups" eval="[(4, ref('base.group_portal'))]"/>
<field eval="1" name="perm_unlink"/>
<field eval="1" name="perm_write"/>
<field eval="1" name="perm_read"/>
diff --git a/addons/portal_event/security/ir.model.access.csv b/addons/portal_event/security/ir.model.access.csv
index f09ba8f6454..9d3b05d9d5d 100644
--- a/addons/portal_event/security/ir.model.access.csv
+++ b/addons/portal_event/security/ir.model.access.csv
@@ -1,5 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_event,event,event.model_event_event,portal.group_portal,1,0,0,0
-access_registration,registration,event.model_event_registration,portal.group_portal,1,1,1,1
+access_event,event,event.model_event_event,base.group_portal,1,0,0,0
+access_registration,registration,event.model_event_registration,base.group_portal,1,1,1,1
access_event,event,event.model_event_event,base.group_public,1,0,0,0
access_registration,registration,event.model_event_registration,base.group_public,1,1,1,1
diff --git a/addons/portal_event/security/portal_security.xml b/addons/portal_event/security/portal_security.xml
index df0c1c5ef07..52674c82c43 100644
--- a/addons/portal_event/security/portal_security.xml
+++ b/addons/portal_event/security/portal_security.xml
@@ -10,14 +10,14 @@
('message_follower_ids', 'in', [user.partner_id.id])
]
</field>
- <field name="groups" eval="[(4, ref('portal.group_portal')), (4, ref('base.group_public'))]"/>
+ <field name="groups" eval="[(4, ref('base.group_portal')), (4, ref('base.group_public'))]"/>
</record>
<record model="ir.rule" id="event_registration_website_rule">
<field name="name">Event/Registration: portal and public users: personal only</field>
<field name="model_id" ref="event.model_event_registration"/>
<field name="domain_force">[('user_id', '=', user.id)]</field>
- <field name="groups" eval="[(4, ref('portal.group_portal')), (4, ref('base.group_public'))]"/>
+ <field name="groups" eval="[(4, ref('base.group_portal')), (4, ref('base.group_public'))]"/>
</record>
</data>
diff --git a/addons/portal_hr_employees/security/ir.model.access.csv b/addons/portal_hr_employees/security/ir.model.access.csv
index 7f7daf7ed0b..d75b49f791e 100644
--- a/addons/portal_hr_employees/security/ir.model.access.csv
+++ b/addons/portal_hr_employees/security/ir.model.access.csv
@@ -1,3 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_hr_employee_portal,hr.employee user,hr.model_hr_employee,portal.group_portal,1,0,0,0
+access_hr_employee_portal,hr.employee user,hr.model_hr_employee,base.group_portal,1,0,0,0
access_hr_employee_public,hr.employee user,hr.model_hr_employee,base.group_public,1,0,0,0
diff --git a/addons/portal_project/security/ir.model.access.csv b/addons/portal_project/security/ir.model.access.csv
index 020671e3ce6..d2a7287e355 100644
--- a/addons/portal_project/security/ir.model.access.csv
+++ b/addons/portal_project/security/ir.model.access.csv
@@ -1,10 +1,10 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_project,project,project.model_project_project,portal.group_portal,1,0,0,0
-access_task,task,project.model_project_task,portal.group_portal,1,0,0,0
-access_task_type,task_type,project.model_project_task_type,portal.group_portal,1,0,0,0
-access_task_work,task_work,project.model_project_task_work,portal.group_portal,1,0,0,0
-access_project_category,project_category,project.model_project_category,portal.group_portal,1,0,0,0
-access_account_analytic_account,account_analytic_account,analytic.model_account_analytic_account,portal.group_portal,1,0,0,0
+access_project,project,project.model_project_project,base.group_portal,1,0,0,0
+access_task,task,project.model_project_task,base.group_portal,1,0,0,0
+access_task_type,task_type,project.model_project_task_type,base.group_portal,1,0,0,0
+access_task_work,task_work,project.model_project_task_work,base.group_portal,1,0,0,0
+access_project_category,project_category,project.model_project_category,base.group_portal,1,0,0,0
+access_account_analytic_account,account_analytic_account,analytic.model_account_analytic_account,base.group_portal,1,0,0,0
access_project_public,project,project.model_project_project,base.group_public,1,0,0,0
access_task_public,task,project.model_project_task,base.group_public,1,0,0,0
access_task_type_public,task_type,project.model_project_task_type,base.group_public,1,0,0,0
diff --git a/addons/portal_project/security/portal_security.xml b/addons/portal_project/security/portal_security.xml
index fa48a57fe8e..f6adf6b1391 100644
--- a/addons/portal_project/security/portal_security.xml
+++ b/addons/portal_project/security/portal_security.xml
@@ -22,7 +22,7 @@
('privacy_visibility', '=', 'followers'),
('message_follower_ids', 'in', [user.partner_id.id]),
]</field>
- <field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
+ <field name="groups" eval="[(4, ref('base.group_portal'))]"/>
</record>
<record model="ir.rule" id="project_public_rule">
@@ -54,7 +54,7 @@
('project_id.privacy_visibility', '=', 'followers'),
('message_follower_ids', 'in', [user.partner_id.id]),
]</field>
- <field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
+ <field name="groups" eval="[(4, ref('base.group_portal'))]"/>
</record>
<record model="ir.rule" id="task_public_rule">
diff --git a/addons/portal_project/tests/test_access_rights.py b/addons/portal_project/tests/test_access_rights.py
index ffafcfee77e..d536b5891e2 100644
--- a/addons/portal_project/tests/test_access_rights.py
+++ b/addons/portal_project/tests/test_access_rights.py
@@ -31,7 +31,7 @@ class TestPortalProjectBase(TestProjectBase):
cr, uid = self.cr, self.uid
# Find Portal group
- group_portal_ref = self.registry('ir.model.data').get_object_reference(cr, uid, 'portal', 'group_portal')
+ group_portal_ref = self.registry('ir.model.data').get_object_reference(cr, uid, 'base', 'group_portal')
self.group_portal_id = group_portal_ref and group_portal_ref[1] or False
# Find Public group
diff --git a/addons/portal_project_issue/security/ir.model.access.csv b/addons/portal_project_issue/security/ir.model.access.csv
index 53f5ad4469d..360e0ccd997 100644
--- a/addons/portal_project_issue/security/ir.model.access.csv
+++ b/addons/portal_project_issue/security/ir.model.access.csv
@@ -1,4 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_issues,project_issue,project_issue.model_project_issue,portal.group_portal,1,0,0,0
-access_case_section,crm_case_section,crm.model_crm_case_section,portal.group_portal,1,0,0,0
+access_issues,project_issue,project_issue.model_project_issue,base.group_portal,1,0,0,0
+access_case_section,crm_case_section,crm.model_crm_case_section,base.group_portal,1,0,0,0
access_issues_public,project_issue,project_issue.model_project_issue,base.group_public,1,0,0,0 \ No newline at end of file
diff --git a/addons/portal_project_issue/security/portal_security.xml b/addons/portal_project_issue/security/portal_security.xml
index 5e74836faa1..c41b26afe71 100644
--- a/addons/portal_project_issue/security/portal_security.xml
+++ b/addons/portal_project_issue/security/portal_security.xml
@@ -14,7 +14,7 @@
('project_id.privacy_visibility', '=', 'followers'),
('message_follower_ids', 'in', [user.partner_id.id]),
]</field>
- <field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
+ <field name="groups" eval="[(4, ref('base.group_portal'))]"/>
</record>
<record model="ir.rule" id="project_issue.issue_user_rule">
diff --git a/addons/portal_project_long_term/security/ir.model.access.csv b/addons/portal_project_long_term/security/ir.model.access.csv
index 48cc7a95549..0cc108be689 100644
--- a/addons/portal_project_long_term/security/ir.model.access.csv
+++ b/addons/portal_project_long_term/security/ir.model.access.csv
@@ -1,3 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_issues,project_phase,project_long_term.model_project_phase,portal.group_portal,1,0,0,0
+access_issues,project_phase,project_long_term.model_project_phase,base.group_portal,1,0,0,0
access_issues_public,project_phase_public,project_long_term.model_project_phase,base.group_public,1,0,0,0
diff --git a/addons/portal_project_long_term/security/portal_security.xml b/addons/portal_project_long_term/security/portal_security.xml
index 2407efc7e12..642855c2386 100644
--- a/addons/portal_project_long_term/security/portal_security.xml
+++ b/addons/portal_project_long_term/security/portal_security.xml
@@ -6,7 +6,7 @@
<field name="name">Project/Phase: portal users: public or (portal and colleagues following) or (followers and following)</field>
<field name="model_id" ref="project_long_term.model_project_phase"/>
<field name="domain_force">[('project_id.privacy_visibility', 'in', ['public', 'portal'])]</field>
- <field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
+ <field name="groups" eval="[(4, ref('base.group_portal'))]"/>
</record>
<record model="ir.rule" id="project_phase_public_rule">
diff --git a/addons/portal_sale/security/ir.model.access.csv b/addons/portal_sale/security/ir.model.access.csv
index 37e27c54d36..191b2bd82a0 100644
--- a/addons/portal_sale/security/ir.model.access.csv
+++ b/addons/portal_sale/security/ir.model.access.csv
@@ -1,20 +1,20 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_sale_order,sale.order,sale.model_sale_order,portal.group_portal,1,0,0,0
-access_sale_order_line,sale.order.line,sale.model_sale_order_line,portal.group_portal,1,0,0,0
-access_account_invoice,account.invoice,account.model_account_invoice,portal.group_portal,1,0,0,0
-access_account_invoice_tax,account.invoice.tax,account.model_account_invoice_tax,portal.group_portal,1,0,0,0
-access_account_invoice_line,account.invoice.line,account.model_account_invoice_line,portal.group_portal,1,0,0,0
-access_account_journal,account.journal,account.model_account_journal,portal.group_portal,1,0,0,0
-access_account_voucher,account.voucher,account_voucher.model_account_voucher,portal.group_portal,1,0,0,0
-access_account_voucher_line,account.voucher.line,account_voucher.model_account_voucher_line,portal.group_portal,1,0,0,0
-access_account_move,account.move,account.model_account_move,portal.group_portal,1,0,0,0
-access_account_move_line,account.move.line,account.model_account_move_line,portal.group_portal,1,0,0,0
-access_account_move_reconcile,account.move.reconcile,account.model_account_move_reconcile,portal.group_portal,1,0,0,0
-access_account_fiscalyear,account.sequence.fiscalyear,account.model_account_sequence_fiscalyear,portal.group_portal,1,0,0,0
-access_product_list,product.pricelist,product.model_product_pricelist,portal.group_portal,1,0,0,0
-access_res_partner,res.partner,base.model_res_partner,portal.group_portal,1,0,0,0
-access_account_tax,account.tax,account.model_account_tax,portal.group_portal,1,0,0,0
-access_account_fiscalyear,account.fiscalyear,account.model_account_fiscalyear,portal.group_portal,1,0,0,0
-access_res_partner_category,res.partner.category,base.model_res_partner_category,portal.group_portal,1,0,0,0
-access_account_period,account.period,account.model_account_period,portal.group_portal,1,0,0,0
-access_account_account,account.account,account.model_account_account,portal.group_portal,1,0,0,0
+access_sale_order,sale.order,sale.model_sale_order,base.group_portal,1,0,0,0
+access_sale_order_line,sale.order.line,sale.model_sale_order_line,base.group_portal,1,0,0,0
+access_account_invoice,account.invoice,account.model_account_invoice,base.group_portal,1,0,0,0
+access_account_invoice_tax,account.invoice.tax,account.model_account_invoice_tax,base.group_portal,1,0,0,0
+access_account_invoice_line,account.invoice.line,account.model_account_invoice_line,base.group_portal,1,0,0,0
+access_account_journal,account.journal,account.model_account_journal,base.group_portal,1,0,0,0
+access_account_voucher,account.voucher,account_voucher.model_account_voucher,base.group_portal,1,0,0,0
+access_account_voucher_line,account.voucher.line,account_voucher.model_account_voucher_line,base.group_portal,1,0,0,0
+access_account_move,account.move,account.model_account_move,base.group_portal,1,0,0,0
+access_account_move_line,account.move.line,account.model_account_move_line,base.group_portal,1,0,0,0
+access_account_move_reconcile,account.move.reconcile,account.model_account_move_reconcile,base.group_portal,1,0,0,0
+access_account_fiscalyear,account.sequence.fiscalyear,account.model_account_sequence_fiscalyear,base.group_portal,1,0,0,0
+access_product_list,product.pricelist,product.model_product_pricelist,base.group_portal,1,0,0,0
+access_res_partner,res.partner,base.model_res_partner,base.group_portal,1,0,0,0
+access_account_tax,account.tax,account.model_account_tax,base.group_portal,1,0,0,0
+access_account_fiscalyear,account.fiscalyear,account.model_account_fiscalyear,base.group_portal,1,0,0,0
+access_res_partner_category,res.partner.category,base.model_res_partner_category,base.group_portal,1,0,0,0
+access_account_period,account.period,account.model_account_period,base.group_portal,1,0,0,0
+access_account_account,account.account,account.model_account_account,base.group_portal,1,0,0,0
diff --git a/addons/portal_sale/security/portal_security.xml b/addons/portal_sale/security/portal_security.xml
index 428474487fe..e1328fa7cf2 100644
--- a/addons/portal_sale/security/portal_security.xml
+++ b/addons/portal_sale/security/portal_security.xml
@@ -10,7 +10,7 @@ on Sale Orders and Customer Invoices. These options are meant for customers who
their documents through the portal.</field>
</record>
<!-- Make the payment_options group implied for all portal users -->
- <record id="portal.group_portal" model="res.groups">
+ <record id="base.group_portal" model="res.groups">
<field name="implied_ids" eval="[(4,ref('group_payment_options'))]"/>
</record>
@@ -19,7 +19,7 @@ their documents through the portal.</field>
<field name="name">Portal Personal Quotations/Sales Orders</field>
<field name="model_id" ref="sale.model_sale_order"/>
<field name="domain_force">[('message_follower_ids','in',[user.partner_id.id])]</field>
- <field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
+ <field name="groups" eval="[(4, ref('base.group_portal'))]"/>
<field eval="1" name="perm_unlink"/>
<field eval="1" name="perm_write"/>
<field eval="1" name="perm_read"/>
@@ -30,7 +30,7 @@ their documents through the portal.</field>
<field name="name">Portal Personal Account Invoices</field>
<field name="model_id" ref="account.model_account_invoice"/>
<field name="domain_force">[('message_follower_ids','in',[user.partner_id.id])]</field>
- <field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
+ <field name="groups" eval="[(4, ref('base.group_portal'))]"/>
</record>
<record id="portal_personal_contact" model="ir.rule">
@@ -38,7 +38,7 @@ their documents through the portal.</field>
<field name="model_id" ref="base.model_res_partner"/>
<field name="domain_force">[('message_follower_ids','in',[user.partner_id.id])]</field>
<field eval="0" name="perm_read"/>
- <field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
+ <field name="groups" eval="[(4, ref('base.group_portal'))]"/>
</record>
</data>
diff --git a/addons/portal_stock/security/ir.model.access.csv b/addons/portal_stock/security/ir.model.access.csv
index 2cf3f3f13b7..d365f0c6544 100644
--- a/addons/portal_stock/security/ir.model.access.csv
+++ b/addons/portal_stock/security/ir.model.access.csv
@@ -1,5 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
-access_stock_picking,stock.picking,stock.model_stock_picking,portal.group_portal,1,0,0,0
-access_stock_picking.out,stock.picking.out,stock.model_stock_picking_out,portal.group_portal,1,0,0,0
-access_stock_move,stock.move,stock.model_stock_move,portal.group_portal,1,0,0,0
-access_stock_warehouse_orderpoint,stock.warehouse.orderpoint,procurement.model_stock_warehouse_orderpoint,portal.group_portal,1,0,0,0
+access_stock_picking,stock.picking,stock.model_stock_picking,base.group_portal,1,0,0,0
+access_stock_picking.out,stock.picking.out,stock.model_stock_picking_out,base.group_portal,1,0,0,0
+access_stock_move,stock.move,stock.model_stock_move,base.group_portal,1,0,0,0
+access_stock_warehouse_orderpoint,stock.warehouse.orderpoint,procurement.model_stock_warehouse_orderpoint,base.group_portal,1,0,0,0
diff --git a/addons/portal_stock/security/portal_security.xml b/addons/portal_stock/security/portal_security.xml
index c5587453e40..162fecbd39d 100644
--- a/addons/portal_stock/security/portal_security.xml
+++ b/addons/portal_stock/security/portal_security.xml
@@ -7,14 +7,14 @@
<field name="name">Portal Personal Pickings</field>
<field name="model_id" ref="stock.model_stock_picking"/>
<field name="domain_force">[('message_follower_ids','in',[user.partner_id.id])]</field>
- <field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
+ <field name="groups" eval="[(4, ref('base.group_portal'))]"/>
</record>
<record id="portal_stock_picking_out_user_rule" model="ir.rule">
<field name="name">Portal Personal Out Pickings</field>
<field name="model_id" ref="stock.model_stock_picking_out"/>
<field name="domain_force">[('message_follower_ids','in',[user.partner_id.id])]</field>
- <field name="groups" eval="[(4, ref('portal.group_portal'))]"/>
+ <field name="groups" eval="[(4, ref('base.group_portal'))]"/>
</record>
</data>
diff --git a/addons/website_partner/__openerp__.py b/addons/website_partner/__openerp__.py
index caf1feca6a5..be318efa541 100644
--- a/addons/website_partner/__openerp__.py
+++ b/addons/website_partner/__openerp__.py
@@ -30,6 +30,7 @@
'data': [
'views/res_partner_view.xml',
'views/website_partner_view.xml',
+ 'security/website_partner_security.xml',
],
'css': [
],
diff --git a/addons/website_partner/security/website_partner_security.xml b/addons/website_partner/security/website_partner_security.xml
new file mode 100644
index 00000000000..a0bb2846413
--- /dev/null
+++ b/addons/website_partner/security/website_partner_security.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+ <!-- <data noupdate="1"> -->
+ <data>
+
+ <!-- res_partner related security rules -->
+ <record id="res_partner_public_website_rule" model="ir.rule">
+ <field name="name">res_partner: public: child of commercial_partner + website_published partners</field>
+ <field name="model_id" ref="base.model_res_partner"/>
+ <field name="domain_force">['|', ('id', 'child_of', user.commercial_partner_id.id), ('website_published', '=', True)]</field>
+ <field name="groups" eval="[(4, ref('base.group_public'))]"/>
+ <field name="perm_create" eval="False"/>
+ <field name="perm_unlink" eval="False"/>
+ <field name="perm_write" eval="False"/>
+ </record>
+
+ </data>
+</openerp>