[FIX] partner_profiles_portal: issue with structure writing rights
It was impossible to read or edit structure profiles from the portal. Solved with: - the add of a dependency to "partner_contact_in_several_companies" add-on - the modification of a security rule to consider the structure public profile
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "partner_profiles",
|
"name": "partner_profiles",
|
||||||
"version": "12.0.1.0.0",
|
"version": "12.0.1.0.1",
|
||||||
"author": "Elabore",
|
"author": "Elabore",
|
||||||
"website": "https://elabore.coop",
|
"website": "https://elabore.coop",
|
||||||
"maintainer": "Stéphan Sainléger",
|
"maintainer": "Stéphan Sainléger",
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"name": "partner_profiles_portal",
|
"name": "partner_profiles_portal",
|
||||||
"version": "12.0.1.0.0",
|
"version": "12.0.1.0.1",
|
||||||
"author": "Elabore",
|
"author": "Elabore",
|
||||||
"website": "https://elabore.coop",
|
"website": "https://elabore.coop",
|
||||||
"maintainer": "Stéphan Sainléger",
|
"maintainer": "Stéphan Sainléger",
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
# any module necessary for this one to work correctly
|
# any module necessary for this one to work correctly
|
||||||
"depends": [
|
"depends": [
|
||||||
"base",
|
"base",
|
||||||
|
"partner_contact_in_several_companies",
|
||||||
"partner_profiles",
|
"partner_profiles",
|
||||||
"portal",
|
"portal",
|
||||||
"website",
|
"website",
|
||||||
|
@@ -39,6 +39,9 @@ class res_partner(models.Model):
|
|||||||
"other_contact_ids",
|
"other_contact_ids",
|
||||||
"other_contact_ids.edit_structure_main_profile",
|
"other_contact_ids.edit_structure_main_profile",
|
||||||
"other_contact_ids.edit_structure_public_profile",
|
"other_contact_ids.edit_structure_public_profile",
|
||||||
|
"child_ids",
|
||||||
|
"child_ids.edit_structure_main_profile",
|
||||||
|
"child_ids.edit_structure_public_profile",
|
||||||
)
|
)
|
||||||
def _compute_can_edit(self):
|
def _compute_can_edit(self):
|
||||||
for partner in self:
|
for partner in self:
|
||||||
|
@@ -5,8 +5,10 @@
|
|||||||
<field name="model_id" ref="base.model_res_partner" />
|
<field name="model_id" ref="base.model_res_partner" />
|
||||||
<field name="domain_force">['|','|',('contact_id', '=', user.partner_id.id),
|
<field name="domain_force">['|','|',('contact_id', '=', user.partner_id.id),
|
||||||
('can_edit_main_profile_ids', 'in', [user.partner_id.id]),
|
('can_edit_main_profile_ids', 'in', [user.partner_id.id]),
|
||||||
('can_edit_public_profile_ids', 'in', [user.partner_id.id])]</field>
|
('contact_id.can_edit_public_profile_ids', 'in', [user.partner_id.id])]</field>
|
||||||
<field name="groups" eval="[(4, ref('base.group_portal'))]" />
|
<field name="groups" eval="[(4, ref('base.group_portal'))]" />
|
||||||
|
<field name="perm_read" eval="True" />
|
||||||
|
<field name="perm_write" eval="True" />
|
||||||
<field name="perm_create" eval="False" />
|
<field name="perm_create" eval="False" />
|
||||||
<field name="perm_unlink" eval="False" />
|
<field name="perm_unlink" eval="False" />
|
||||||
</record>
|
</record>
|
||||||
|
Reference in New Issue
Block a user