Files
odoo_source/addons/mail/views/mail_blacklist_views.xml
T
3fea5b2136 [REF] mail, *: refactor messaging with OWL
This commit is a significant rewriting of client-side discuss, chatter,
chat window, and messaging menu using OWL. The behavior should be broadly
the same, with some slight functional changes here and there.

From a technical standpoint, the code of messaging is mainly organized in 2
main groups of modules:

- models, which are logical entities that depict the client-side state of
  messaging as a whole.
- components, which are in charge of displaying information from models.

This refactoring also introduces new JS guidelines regarding folder structure
(/static) and naming rules for JS modules.

Community PR: https://github.com/odoo/odoo/pull/39023
Enterprise PR: https://github.com/odoo/enterprise/pull/6249

Task-1914207

This PR is a collaborative work by Alexandre, Julien, Sébastien and Xavier,
with the precious help of Lucas to speed it up towards the end.

closes odoo/odoo#39023

Related: odoo/enterprise#6249
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
Co-authored-by: Alexandre Kühn <aku@odoo.com>
Co-authored-by: Julien Giannone <jgi@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
Co-authored-by: Xavier Dubuc <xdu@odoo.com>
2020-06-15 18:12:21 +00:00

78 lines
3.2 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<record id="mail_blacklist_view_tree" model="ir.ui.view">
<field name="name">mail.blacklist.view.tree</field>
<field name="model">mail.blacklist</field>
<field name="arch" type="xml">
<tree string="Email Blacklist">
<field name="create_date" string="Blacklist Date"/>
<field name="email"/>
</tree>
</field>
</record>
<record id="mail_blacklist_view_form" model="ir.ui.view">
<field name="name">mail.blacklist.view.form</field>
<field name="model">mail.blacklist</field>
<field name="arch" type="xml">
<form string="Add Email Blacklist" duplicate="false" edit="false">
<header>
<button name="mail_action_blacklist_remove" string="Unblacklist"
type="object" class="oe_highlight" context="{'default_email': email}"
attrs="{'invisible': ['|', ('active', '=', False), ('email', '=', False)]}"/>
<button name="action_add" string="Blacklist"
type="object" class="oe_highlight"
attrs="{'invisible': ['|', ('active', '=', True), ('email', '=', False)]}"/>
</header>
<sheet>
<widget name="web_ribbon" title="Archived" bg_color="bg-danger" attrs="{'invisible': [('active', '=', True)]}"/>
<group>
<group>
<field name="email"/>
<field name="active" readonly="1"/>
<br/>
</group>
</group>
</sheet>
<div class="oe_chatter">
<field name="message_follower_ids" groups="base.group_user"/>
<field name="message_ids"/>
</div>
</form>
</field>
</record>
<record id="mail_blacklist_view_search" model="ir.ui.view">
<field name="name">mail.blacklist.view.search</field>
<field name="model">mail.blacklist</field>
<field name="arch" type="xml">
<search>
<field name="email"/>
<filter string="Archived" name="inactive" domain="[('active','=',False)]"/>
</search>
</field>
</record>
<record id="mail_blacklist_action" model="ir.actions.act_window">
<field name="name">Blacklisted Email Addresses</field>
<field name="res_model">mail.blacklist</field>
<field name="view_id" ref="mail_blacklist_view_tree"/>
<field name="search_view_id" ref="mail_blacklist_view_search"/>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Add an email address in the blacklist
</p><p>
Email addresses that are blacklisted means that the recipient won't receive mass mailing anymore.
</p>
</field>
</record>
<!-- Technical Menu -->
<menuitem id="mail_blacklist_menu"
name="Email Blacklist"
action="mail_blacklist_action"
parent="mail.mail_menu_technical"
sequence="22"/>
</odoo>