Browse Source

💚 pre-commit run --all

pull/283/head
Ivan Yelizariev 5 years ago
parent
commit
854d897968
No known key found for this signature in database GPG Key ID: C034D49D267D42C0
  1. 26
      mail_attachment_popup/static/src/xml/mail_attachment_popup.xml
  2. 8
      mail_check_immediately/static/src/xml/main.xml
  3. 154
      mail_move_message/mail_move_message_views.xml
  4. 39
      mail_private/full_composer_wizard.xml
  5. 7
      mail_private/static/src/xml/mail_private.xml
  6. 10
      mail_recovery/data.xml
  7. 50
      mail_to/static/src/xml/recipient.xml
  8. 22
      mailgun/data/cron.xml
  9. 6
      res_partner_company_messages/views.xml

26
mail_attachment_popup/static/src/xml/mail_attachment_popup.xml

@ -15,9 +15,9 @@
t-att-data-mimetype="attachment.mimetype"
t-attf-data-src="/web/image/#{attachment.id}/100x80"
>
<span class='o_attachment_name'><t
t-esc='attachment.name'
/></span>
<span class='o_attachment_name'>
<t t-esc='attachment.name' />
</span>
</div>
</span>
<div class="g-hidden">
@ -28,13 +28,19 @@
t-attf-src="/web/image/#{attachment.id}"
/>
<ul class="box-modal-li">
<li><span class='o_attachment_name'><t
t-esc='attachment.name'
/></span></li>
<li><span class='oe_download_original_img'><a
<li>
<span class='o_attachment_name'>
<t t-esc='attachment.name' />
</span>
</li>
<li>
<span class='oe_download_original_img'>
<a
t-att-href='attachment.url'
target="_blank"
>Download</a></span></li>
>Download</a>
</span>
</li>
</ul>
</div>
</div>
@ -49,7 +55,9 @@
t-att-data-mimetype="attachment.mimetype"
t-attf-data-src="/web/image/#{attachment.id}/100x80"
>
<span class='o_attachment_name'><t t-esc='attachment.name' /></span>
<span class='o_attachment_name'>
<t t-esc='attachment.name' />
</span>
</a>
</t>
</t>

8
mail_check_immediately/static/src/xml/main.xml

@ -5,14 +5,14 @@
<td t-att-colspan="colspan or '3'">
<div class="oe_view_manager_fetch_mail_imm">
<em>
<span>Mails fetched:</span>
<a
<span>Mails fetched:</span>
<a
href="#"
class="oe_fetch_new_mails"
title="Click to fetch mails now"
>
<span class="oe_view_manager_fetch_mail_imm_field" />
</a>
<span class="oe_view_manager_fetch_mail_imm_field" />
</a>
</em>
</div>
</td>

154
mail_move_message/mail_move_message_views.xml

@ -1,64 +1,64 @@
<?xml version="1.0" encoding="utf-8" ?>
<openerp><data>
<template id="assets_backend" name="custom bar assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link
<openerp>
<data>
<template
id="assets_backend"
name="custom bar assets"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside">
<link
rel="stylesheet"
href="/mail_move_message/static/src/css/mail_move_message.css"
/>
<script
<script
type="text/javascript"
src="/mail_move_message/static/src/js/mail_move_message.js"
/>
</xpath>
</template>
<record id="view_wizard" model="ir.ui.view">
<field name="name">mail_move_message.wizard.view</field>
<field name="model">mail_move_message.wizard</field>
<field name="arch" type="xml">
<form string="Move Message">
<field name="can_move" invisible="1" />
<field name="message_is_moved" invisible="1" />
<field name="message_name_from" invisible="1" />
<field name="message_email_from" invisible="1" />
<field name="message_to_read" invisible="1" />
<field name="uid" invisible="1" />
<p
</xpath>
</template>
<record id="view_wizard" model="ir.ui.view">
<field name="name">mail_move_message.wizard.view</field>
<field name="model">mail_move_message.wizard</field>
<field name="arch" type="xml">
<form string="Move Message">
<field name="can_move" invisible="1" />
<field name="message_is_moved" invisible="1" />
<field name="message_name_from" invisible="1" />
<field name="message_email_from" invisible="1" />
<field name="message_to_read" invisible="1" />
<field name="uid" invisible="1" />
<p
attrs="{'invisible':[('can_move', '!=', False)]}"
>You cannot move this message. It was already moved with a message bellow. Open one and apply changes there.</p>
<group attrs="{'invisible':[('can_move', '!=', False)]}">
<field
<group attrs="{'invisible':[('can_move', '!=', False)]}">
<field
name="message_moved_by_message_id"
context="{'extended_name':1}"
/>
<field name="message_moved_by_user_id" />
<button
<field name="message_moved_by_user_id" />
<button
name="open_moved_by_message_id"
string="Open message"
type="object"
class="oe_highlight"
/>
</group>
<group attrs="{'invisible':[('can_move', '=', False)]}" colspan="2">
<label for="model" />
<div>
<field
</group>
<group attrs="{'invisible':[('can_move', '=', False)]}" colspan="2">
<label for="model" />
<div>
<field
name="model"
widget="polymorphic"
polymorphic="res_id"
class="oe_inline"
/>
</div>
<label for="filter_by_partner" />
<div>
<field name="filter_by_partner" class="oe_inline" />
<field name="partner_id" class="oe_inline" />
<button
</div>
<label for="filter_by_partner" />
<div>
<field name="filter_by_partner" class="oe_inline" />
<field name="partner_id" class="oe_inline" />
<button
string="Create Partner"
attrs="{'invisible':[('partner_id','!=',False)]}"
class="oe_highlight oe_inline ml32"
@ -66,17 +66,17 @@
field="partner_id"
context="{'force_email':True,'default_email':message_email_from,'default_name':message_name_from, 'update_message_author':True}"
/>
</div>
<label for="res_id" />
<div>
<field
</div>
<label for="res_id" />
<div>
<field
name="res_id"
context="{'extended_name_with_contact':1}"
widget="many2one"
attrs="{'readonly': [('model','=',False)]}"
class="oe_inline"
/>
<button
<button
string="Create new record"
name="create_record"
type="object"
@ -86,46 +86,46 @@
field="res_id"
use_for_mail_move_message="True"
/>
</div>
<label
</div>
<label
for="move_back"
attrs="{'invisible':[('message_is_moved','=',False)]}"
/>
<div attrs="{'invisible':[('message_is_moved','=',False)]}">
<field name="move_back" />
</div>
<label for="move_followers" />
<div>
<field name="move_followers" />
</div>
</group>
<button
<div attrs="{'invisible':[('message_is_moved','=',False)]}">
<field name="move_back" />
</div>
<label for="move_followers" />
<div>
<field name="move_followers" />
</div>
</group>
<button
name="move"
string="Move"
type="object"
class="oe_highlight"
attrs="{'invisible':[('can_move', '=', False)]}"
/>
<button string="Close" class="" special="cancel" />
<separator string="Message" />
<group>
<field name="message_subject" />
<field name="message_from" />
<field name="message_id" invisible="1" />
</group>
<div class="openerp mail_move_message">
<div class="oe_mail">
<div class="oe_msg">
<div class="oe_msg_content">
<div class="oe_msg_body">
<!-- use built-in css for messages -->
<field name="message_body" />
<button string="Close" class="" special="cancel" />
<separator string="Message" />
<group>
<field name="message_subject" />
<field name="message_from" />
<field name="message_id" invisible="1" />
</group>
<div class="openerp mail_move_message">
<div class="oe_mail">
<div class="oe_msg">
<div class="oe_msg_content">
<div class="oe_msg_body">
<!-- use built-in css for messages -->
<field name="message_body" />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<footer>
<footer>
<button
name="read_close"
string="Mark as read and Close"
@ -144,10 +144,9 @@
attrs="{'invisible':[('uid','!=',1)]}"
/>
</footer>
</form>
</field>
</record>
</form>
</field>
</record>
<!-- Relocation config wizard -->
<record id="view_mail_move_message_config_settings" model="ir.ui.view">
<field name="name">relocation settings</field>
@ -179,7 +178,6 @@
</form>
</field>
</record>
<record id="action_mail_move_message_config" model="ir.actions.act_window">
<field name="name">Mail Relocation</field>
<field name="type">ir.actions.act_window</field>
@ -188,7 +186,6 @@
<field name="view_mode">form</field>
<field name="target">inline</field>
</record>
<!-- Add menu entry in Settings/Email -->
<menuitem
name="Mail Relocation"
@ -197,6 +194,5 @@
sequence="99"
action="action_mail_move_message_config"
/>
</data>
</openerp>

39
mail_private/full_composer_wizard.xml

@ -3,31 +3,24 @@
Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
License MIT (https://opensource.org/licenses/MIT).-->
<odoo>
<record model="ir.ui.view" id="email_compose_message_wizard_form_private">
<field name="name">mail.compose.message.form.private</field>
<field name="model">mail.compose.message</field>
<field name="groups_id" eval="[(4,ref('base.group_user'))]" />
<field name="inherit_id" ref="mail.email_compose_message_wizard_form" />
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='active_domain']" position="after">
<field name="is_private" invisible="1" />
</xpath>
<xpath
<record model="ir.ui.view" id="email_compose_message_wizard_form_private">
<field name="name">mail.compose.message.form.private</field>
<field name="model">mail.compose.message</field>
<field name="groups_id" eval="[(4,ref('base.group_user'))]" />
<field name="inherit_id" ref="mail.email_compose_message_wizard_form" />
<field name="arch" type="xml">
<data>
<xpath expr="//field[@name='active_domain']" position="after">
<field name="is_private" invisible="1" />
</xpath>
<xpath
expr="//div[@groups='base.group_user']/span[2]"
position="attributes"
>
<attribute
name="attrs"
>{'invisible': [('is_private', '=', True)]}
<attribute name="attrs">{'invisible': [('is_private', '=', True)]}
</attribute>
</xpath>
</data>
</field>
</record>
</xpath>
</data>
</field>
</record>
</odoo>

7
mail_private/static/src/xml/mail_private.xml

@ -6,7 +6,6 @@
Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/>
License MIT (https://opensource.org/licenses/MIT).-->
<template>
<t t-extend="mail.Chatter">
<t t-jquery="button[title='Send a message']" t-operation="after">
<button
@ -16,8 +15,7 @@
>Send internal message</button>
</t>
</t>
<t t-extend="mail.chatter.ChatComposer">
<t t-extend="mail.chatter.ChatComposer">
<t t-jquery="span[class='o_chatter_composer_info']" t-operation="replace">
<span class="o_chatter_composer_info" t-if="!widget.options.is_private">
To: Followers of
@ -47,6 +45,5 @@
t-if="widget.options.is_private"
>Uncheck all</button>
</t>
</t>
</t>
</template>

10
mail_recovery/data.xml

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<openerp>
<data>
<template
<template
id="assets_backend"
name="message storage"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside">
<script
<xpath expr="." position="inside">
<script
type="text/javascript"
src="/mail_recovery/static/src/js/mail_recovery.js"
/>
</xpath>
</template>
</xpath>
</template>
</data>
</openerp>

50
mail_to/static/src/xml/recipient.xml

@ -6,51 +6,53 @@
<template>
<t t-extend="mail.ChatThread.Message">
<t t-jquery="p[class=o_mail_info] span:last" t-operation="after">
<span class="recipients_info"><t t-if="message.partner_ids">
<t t-if="message.partner_ids.length > 0">To: </t>
<t t-else="message.channel_ids.length > 0">To: </t>
<t t-foreach="message.partner_ids.length" t-as="i">
<t t-if="i &lt; message.more_recipients_value">
<a
<span class="recipients_info">
<t t-if="message.partner_ids">
<t t-if="message.partner_ids.length > 0">To: </t>
<t t-else="message.channel_ids.length > 0">To: </t>
<t t-foreach="message.partner_ids.length" t-as="i">
<t t-if="i &lt; message.more_recipients_value">
<a
t-att-href="_.str.sprintf('/web?#id=%s&amp;view_type=form&amp;model=res.partner', message.partner_ids[i][0])"
class="recipient_link"
>
<i t-esc="message.partner_ids[i][1]" /><t
t-if="i &lt; message.partner_ids.length - 1"
>; </t><t
<i t-esc="message.partner_ids[i][1]" />
<t t-if="i &lt; message.partner_ids.length - 1">; </t>
<t
t-else="message.channel_ids.length > 0 and message.partner_ids.length &lt; 4"
>; </t>
</a>
</a>
</t>
</t>
</t>
<t t-if="message.channel_names">
<t t-foreach="message.channel_ids.length" t-as="i">
<t
<t t-if="message.channel_names">
<t t-foreach="message.channel_ids.length" t-as="i">
<t
t-if="message.partner_ids.length &lt; message.more_recipients_value and (message.partner_ids.length + i) &lt; message.more_recipients_value"
>
<a
<a
t-if="message.channel_names[i]"
t-att-href="_.str.sprintf('/web?#id=%s&amp;view_type=form&amp;model=mail.channel', message.channel_names[i][0])"
class="recipient_link"
>
<i t-esc="message.channel_names[i][1]" /><t
<i t-esc="message.channel_names[i][1]" />
<t
t-if="i &lt; message.channel_ids.length - 1"
>; </t>
</a>
</a>
</t>
</t>
</t>
</t>
<t t-if="message.recipients.length &gt; message.more_recipients_value">
<span t-att-title="message.more_recipients">
<t
t-if="message.recipients.length &gt; message.more_recipients_value"
>
<span t-att-title="message.more_recipients">
and <t
t-esc="message.recipients.length - message.more_recipients_value"
/> more
</span>
</t>
</t>
</t></span>
</span>
</t>
</t>
</template>

22
mailgun/data/cron.xml

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<openerp>
<data noupdate="1">
<record id="mailgun_domain_verification" model="ir.cron">
<field name="name">Mailgun - domain verification</field>
<field name='interval_number'>10</field>
<field name='interval_type'>minutes</field>
<field name="numbercall">288</field>
<field name="active">True</field>
<field name="model">ir.config_parameter</field>
<field name="function">mailgun_verify</field>
</record>
</data>
<data noupdate="1">
<record id="mailgun_domain_verification" model="ir.cron">
<field name="name">Mailgun - domain verification</field>
<field name='interval_number'>10</field>
<field name='interval_type'>minutes</field>
<field name="numbercall">288</field>
<field name="active">True</field>
<field name="model">ir.config_parameter</field>
<field name="function">mailgun_verify</field>
</record>
</data>
</openerp>

6
res_partner_company_messages/views.xml

@ -1,3 +1,5 @@
<?xml version="1.0" encoding="utf-8" ?>
<openerp><data>
</data></openerp>
<openerp>
<data>
</data>
</openerp>
Loading…
Cancel
Save