Files
odoo_source/addons/project/views/project_collaborator_views.xml
T
Xavier BOL (xbo) e9134c71b6 [IMP] project: remove the create and edit in views of collaborators
Before this commit, the project manager could edit the collaborator
records. That is, he could change the shared project or the
collaborator.

This commit allows the user to only see or remove the collaborators for
a shared project. If the user wants to add some new collaborators, he
has to use the project share wizard.

task-2379518

closes #73341
2021-08-26 16:57:23 +02:00

54 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="project_collaborator_view_form" model="ir.ui.view">
<field name="name">project.collaborator.view.form</field>
<field name="model">project.collaborator</field>
<field name="arch" type="xml">
<form string="Project Collaborator" create="0" edit="0">
<sheet>
<group>
<field name="project_id" options="{'no_create': True}" />
<field name="partner_id" options="{'no_create': True}" />
</group>
</sheet>
</form>
</field>
</record>
<record id="project_sharing_access_view_tree" model="ir.ui.view">
<field name="name">project.collaborator.view.tree</field>
<field name="model">project.collaborator</field>
<field name="arch" type="xml">
<tree string="Project Collaborators" create="0">
<field name="project_id" options="{'no_create': True}"/>
<field name="partner_id" options="{'no_create': True}"/>
</tree>
</field>
</record>
<record id="project_collaborator_view_search" model="ir.ui.view">
<field name="name">project.collaborator.view.search</field>
<field name="model">project.collaborator</field>
<field name="arch" type="xml">
<search>
<field name="partner_id" />
<field name="project_id" />
<group expand="0" string="Group By">
<filter name="project" string="Project" context="{'group_by': 'project_id'}" />
<filter name="collaborator" string="Collaborator" context="{'group_by': 'partner_id'}" />
</group>
</search>
</field>
</record>
<record id="project_collaborator_action" model="ir.actions.act_window">
<field name="name">Project Collaborators</field>
<field name="res_model">project.collaborator</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('project_id', '=', active_id)]</field>
<field name="search_view_id" ref="project_collaborator_view_search"/>
</record>
</odoo>