Files
odoo_source/addons/mail/views/mail_channel_views.xml
T
Michael Mattiello (mcm) 785b304876 [IMP] *: reduce shift in form views (xml)
* account, analytic, calendar, coupon, crm, crm_iap_lead_website,
  delivery, digest, event, event_crm, fleet, gamification, hr,
  hr_expense, hr_skills, im_livechat, lunch, mail, maintenance,
  mass_mailing, membership, mrp, point_of_sale, pos_mercury, product,
  purchase, purchase_requisition, sale_management, sales_team, sms,
  stock, stock_landed_costs, survey, website_crm_partner_assign,
  website_event_exhibitor, website_event_track, website_forum,
  website_slides, base

This commit removes oe_edit_only labels and adds placeholder
on fields in form views from a lot of apps to minimize the
shift when switching mode.

task 2330101
2021-02-02 12:40:22 +00:00

158 lines
9.1 KiB
XML

<?xml version="1.0"?>
<odoo>
<data>
<!-- mail.channel -->
<record id="mail_channel_view_kanban" model="ir.ui.view">
<field name="name">mail.channel.kanban</field>
<field name="model">mail.channel</field>
<field name="priority" eval="10"/>
<field name="arch" type="xml">
<kanban>
<field name="id"/>
<field name="description"/>
<field name="is_subscribed"/>
<field name="group_ids"/>
<field name="public"/>
<templates>
<t t-name="kanban-description">
<div class="oe_group_description" t-if="record.description.raw_value">
<field name="description"/>
</div>
</t>
<t t-name="kanban-box">
<div class="oe_module_vignette oe_kanban_global_click">
<img t-att-src="kanban_image('mail.channel', 'image_128', record.id.raw_value)" class="oe_module_icon" alt="Channel"/>
<div class="oe_module_desc">
<h4 class="o_kanban_record_title">#<field name="name"/></h4>
<p class="oe_module_name">
<field name="description"/>
</p>
<button type="object" attrs="{'invisible':['|', ('is_subscribed','=',True), ('group_ids', '!=', [])]}" class="btn btn-primary float-right" name="channel_join_and_get_info">Join</button>
<button type="object" attrs="{'invisible':['|', ('is_subscribed','=',False), ('group_ids', '!=', [])]}" class="btn btn-secondary float-right" name="action_unfollow">Leave</button>
</div>
</div>
</t>
</templates>
</kanban>
</field>
</record>
<record id="mail_channel_view_form" model="ir.ui.view">
<field name="name">mail.channel.form</field>
<field name="model">mail.channel</field>
<field name="priority" eval="10"/>
<field name="arch" type="xml">
<form string="Mail Channel Form">
<header>
<button name="send_guidelines" type="object" string="Send guidelines" confirm="You are going to send the guidelines to all the subscribers. Do you confirm the action?" attrs="{'invisible':['|',('moderation_guidelines','=',False), ('is_moderator', '=', False)]}"/>
</header>
<sheet>
<div class="oe_button_box" name="button_box">
<field name="is_moderator" invisible="1"/>
<button class="btn oe_stat_button" name="mail.mail_moderation_action" type="action" attrs="{'invisible':[('is_moderator', '=', False)]}" icon="fa-bars" context="{'search_default_channel_id': active_id}">
<field string="Moderation List" name="moderation_count" widget="statinfo"/>
</button>
</div>
<div class="oe_button_box" name="button_box"/>
<field name="image_128" widget="image" class="oe_avatar" options="{'size': [90, 90]}"/>
<div class="oe_title">
<label for="name" string="Group Name"/>
<h1>
#<field name="name" class="oe_inline" default_focus="1" placeholder="e.g. support" readonly="0"/>
</h1>
</div>
<group class="o_label_nowrap">
<field name="active" invisible="1"/>
<field name="email_send"/>
<field name="moderation" attrs="{'invisible': [('email_send', '=', False)]}"/>
<field name="description" placeholder="Topics discussed in this group..."/>
</group>
<group name="group_alias" attrs="{'invisible': [('alias_domain', '=', False)]}">
<label for="alias_id" string=" " class="fa fa-envelope-o" style="min-width: 20px;" aria-label="Email" title="Email" role="img"/>
<div name="alias_def">
<field name="alias_id" class="oe_read_only oe_inline"
string="Email Alias" required="0"/>
<div class="oe_edit_only oe_inline" name="edit_alias" style="display: inline;" >
<field name="alias_name" class="oe_inline"/>@<field name="alias_domain" class="oe_inline" readonly="1"/>
</div>
</div>
<field name="alias_contact" class="oe_inline" invisible="1"/>
</group>
<notebook>
<page string="Privacy" name="privacy">
<group class="o_label_nowrap">
<field name="public" widget="radio" string="Who can follow the group's activities?"/>
<field name="group_public_id"
attrs="{'invisible': [('public','!=','groups')], 'required': [('public','=','groups')]}"
/>
<field name="group_ids" widget="many2many_tags"
string="Auto Subscribe Groups"/>
</group>
</page>
<page string="Members" name="members">
<field name="channel_last_seen_partner_ids" mode="tree" context="{'active_test': False}">
<tree string="Members" editable="bottom">
<field name="partner_id" required="1"/>
<field name="partner_email" readonly="1"/>
</tree>
</field>
</page>
<page string="Moderation" name="moderation" attrs="{'invisible': [('moderation', '=', False)]}">
<group>
<field name="moderator_ids" widget="many2many_tags"/>
<field name="moderation_notify"/>
<field name="moderation_notify_msg" attrs="{'invisible': [('moderation_notify', '=', False)]}"/>
<field name="moderation_guidelines"/>
<field name="moderation_guidelines_msg" attrs="{'invisible':[('moderation_guidelines', '=', False)]}"/>
</group>
</page>
<page string="Integrations" invisible="1" name="mail_channel_integrations"></page>
</notebook>
<div class="oe_chatter" groups="base.group_no_one">
<field name="message_follower_ids"/>
</div>
</sheet>
</form>
</field>
</record>
<record id="mail_channel_view_tree" model="ir.ui.view">
<field name="name">mail.channel.tree</field>
<field name="model">mail.channel</field>
<field name="priority" eval="10"/>
<field name="arch" type="xml">
<tree string="Groups">
<field name="name"/>
</tree>
</field>
</record>
<record id="mail_channel_view_search" model="ir.ui.view">
<field name="name">mail.channel.search</field>
<field name="model">mail.channel</field>
<field name="priority" eval="10"/>
<field name="arch" type="xml">
<search string="Search Groups">
<field name="name"/>
<filter string="Archived" name="inactive" domain="[('active', '=', False)]"/>
</search>
</field>
</record>
<record id="mail_channel_action_view" model="ir.actions.act_window">
<field name="name">Join a group</field>
<field name="res_model">mail.channel</field>
<field name="view_mode">kanban,tree,form</field>
<field name="search_view_id" ref="mail_channel_view_search"/>
</record>
<record id="action_discuss" model="ir.actions.client">
<field name="name">Discuss</field>
<field name="tag">mail.widgets.discuss</field>
<field name="res_model">mail.channel</field>
<field name="params" eval="&quot;{ 'default_active_id': 'mail.box_inbox' }&quot;"/>
</record>
</data>
</odoo>