155 lines
7.5 KiB
XML
155 lines
7.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<!-- Form view for the portal.access model -->
|
|
<record id="view_portal_access_form" model="ir.ui.view">
|
|
<field name="name">portal.access.form</field>
|
|
<field name="model">portal.access</field>
|
|
<field name="arch" type="xml">
|
|
<form string="Portal Access Configuration">
|
|
<sheet>
|
|
<div class="oe_button_box" name="button_box">
|
|
<button name="toggle_active" type="object" class="oe_stat_button" icon="fa-archive">
|
|
<field name="active" widget="boolean_button" options="{'terminology': 'archive'}"/>
|
|
</button>
|
|
</div>
|
|
<div class="oe_title">
|
|
<h1>
|
|
<field name="name" placeholder="Configuration Name"/>
|
|
</h1>
|
|
</div>
|
|
<group>
|
|
<group>
|
|
<field name="partner_id" options="{'no_create': True}"/>
|
|
<field name="allow_edit"/>
|
|
<field name="allow_add_contacts"/>
|
|
</group>
|
|
<group>
|
|
<field name="portal_user_ids" widget="many2many_tags"/>
|
|
</group>
|
|
</group>
|
|
<notebook>
|
|
<page string="Allowed Fields" name="allowed_fields">
|
|
<field name="allowed_fields_ids" domain="[('model', '=', 'res.partner')]">
|
|
<list>
|
|
<field name="name"/>
|
|
<field name="ttype"/>
|
|
</list>
|
|
</field>
|
|
<div class="alert alert-info" role="alert">
|
|
<p>If no field is selected, the default fields will be used.</p>
|
|
</div>
|
|
</page>
|
|
<page string="Access Log" name="logs">
|
|
<div class="alert alert-info" role="alert">
|
|
<p>Les journaux d'accès sont maintenant disponibles dans le menu Administration > Portal Partner > Portal Activity Logs.</p>
|
|
<p>Le nouveau système de journalisation centralise tous les journaux d'activité pour une meilleure gestion.</p>
|
|
</div>
|
|
</page>
|
|
</notebook>
|
|
</sheet>
|
|
<div class="oe_chatter">
|
|
<field name="message_follower_ids" widget="mail_followers"/>
|
|
<field name="activity_ids" widget="mail_activity"/>
|
|
<field name="message_ids" widget="mail_thread"/>
|
|
</div>
|
|
</form>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Tree view for the portal.access model -->
|
|
<record id="view_portal_access_tree" model="ir.ui.view">
|
|
<field name="name">portal.access.tree</field>
|
|
<field name="model">portal.access</field>
|
|
<field name="arch" type="xml">
|
|
<list string="Portal Access Configurations">
|
|
<field name="name"/>
|
|
<field name="partner_id"/>
|
|
<field name="allow_edit"/>
|
|
<field name="allow_add_contacts"/>
|
|
<field name="active"/>
|
|
</list>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Search view for the portal.access model -->
|
|
<record id="view_portal_access_search" model="ir.ui.view">
|
|
<field name="name">portal.access.search</field>
|
|
<field name="model">portal.access</field>
|
|
<field name="arch" type="xml">
|
|
<search string="Search a portal access configuration">
|
|
<field name="name"/>
|
|
<field name="partner_id"/>
|
|
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
|
|
<filter string="Edit Allowed" name="allow_edit" domain="[('allow_edit', '=', True)]"/>
|
|
<filter string="Contact Addition Allowed" name="allow_add_contacts" domain="[('allow_add_contacts', '=', True)]"/>
|
|
<group expand="0" string="Group by">
|
|
<filter string="Company" name="group_by_partner" context="{'group_by': 'partner_id'}"/>
|
|
</group>
|
|
</search>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Les vues pour l'ancien modèle portal.access.log ont été supprimées car elles ont été remplacées par
|
|
le nouveau système de journalisation basé sur portal.activity.log -->
|
|
|
|
|
|
<!-- Action for the portal.access model -->
|
|
<record id="action_portal_access" model="ir.actions.act_window">
|
|
<field name="name">Portal Access Configurations</field>
|
|
<field name="res_model">portal.access</field>
|
|
<field name="view_mode">list,form</field>
|
|
<field name="help" type="html">
|
|
<p class="o_view_nocontent_smiling_face">
|
|
Create a new portal access configuration
|
|
</p>
|
|
<p>
|
|
Portal access configurations allow you to define which portal users
|
|
can edit which companies' information and which fields they can edit.
|
|
</p>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- L'action pour l'ancien modèle portal.access.log a été supprimée car elle a été remplacée par
|
|
le nouveau système de journalisation basé sur portal.activity.log -->
|
|
|
|
|
|
<!-- Inherited form view for res.partner -->
|
|
<record id="view_partner_form_inherit_portal_manager" model="ir.ui.view">
|
|
<field name="name">res.partner.form.inherit.portal.manager</field>
|
|
<field name="model">res.partner</field>
|
|
<field name="inherit_id" ref="base.view_partner_form"/>
|
|
<field name="arch" type="xml">
|
|
<xpath expr="//page[@name='sales_purchases']" position="after">
|
|
<page string="Portal Access" name="portal_access" invisible="is_company == False">
|
|
<group>
|
|
<group>
|
|
<field name="allow_portal_parent_edit"/>
|
|
<field name="portal_last_update" readonly="1"/>
|
|
<field name="portal_updated_by" readonly="1" options="{'no_create': True, 'no_open': True}"/>
|
|
</group>
|
|
</group>
|
|
<div class="oe_clear"/>
|
|
<div class="oe_button_box" name="portal_button_box">
|
|
<button name="%(portal_partner_manager.action_portal_access)d" type="action"
|
|
string="Access Configurations" class="oe_stat_button" icon="fa-cogs"
|
|
context="{'default_partner_id': id}"/>
|
|
</div>
|
|
</page>
|
|
</xpath>
|
|
</field>
|
|
</record>
|
|
|
|
<!-- Menu items -->
|
|
<menuitem id="menu_portal_access_root" name="Portal Access"
|
|
parent="contacts.menu_contacts"
|
|
groups="base.group_no_one"
|
|
sequence="20"/>
|
|
|
|
<menuitem id="menu_portal_access" name="Access Configurations"
|
|
parent="menu_portal_access_root"
|
|
action="action_portal_access"
|
|
sequence="10"/>
|
|
|
|
<!-- Le menu pour les anciens logs d'accès a été supprimé car il a été remplacé par
|
|
le nouveau système de journalisation accessible via Administration > Portal Partner > Portal Activity Logs -->
|
|
</odoo>
|