Browse Source

Merge pull request #283 from yelizariev/10.0-pre-commit-16

💚 pre-commit run --all
pull/311/head
Denis Mudarisov 5 years ago
committed by GitHub
parent
commit
c6cd4e0cf7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 26
      mail_attachment_popup/static/src/xml/mail_attachment_popup.xml
  2. 18
      mail_move_message/mail_move_message_views.xml
  3. 9
      mail_private/full_composer_wizard.xml
  4. 3
      mail_private/static/src/xml/mail_private.xml
  5. 22
      mail_to/static/src/xml/recipient.xml
  6. 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-att-data-mimetype="attachment.mimetype"
t-attf-data-src="/web/image/#{attachment.id}/100x80" 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> </div>
</span> </span>
<div class="g-hidden"> <div class="g-hidden">
@ -28,13 +28,19 @@
t-attf-src="/web/image/#{attachment.id}" t-attf-src="/web/image/#{attachment.id}"
/> />
<ul class="box-modal-li"> <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' t-att-href='attachment.url'
target="_blank" target="_blank"
>Download</a></span></li>
>Download</a>
</span>
</li>
</ul> </ul>
</div> </div>
</div> </div>
@ -49,7 +55,9 @@
t-att-data-mimetype="attachment.mimetype" t-att-data-mimetype="attachment.mimetype"
t-attf-data-src="/web/image/#{attachment.id}/100x80" 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> </a>
</t> </t>
</t> </t>

18
mail_move_message/mail_move_message_views.xml

@ -1,7 +1,11 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<openerp><data>
<template id="assets_backend" name="custom bar assets" inherit_id="web.assets_backend">
<openerp>
<data>
<template
id="assets_backend"
name="custom bar assets"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside"> <xpath expr="." position="inside">
<link <link
rel="stylesheet" rel="stylesheet"
@ -13,20 +17,17 @@
/> />
</xpath> </xpath>
</template> </template>
<record id="view_wizard" model="ir.ui.view"> <record id="view_wizard" model="ir.ui.view">
<field name="name">mail_move_message.wizard.view</field> <field name="name">mail_move_message.wizard.view</field>
<field name="model">mail_move_message.wizard</field> <field name="model">mail_move_message.wizard</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Move Message"> <form string="Move Message">
<field name="can_move" invisible="1" /> <field name="can_move" invisible="1" />
<field name="message_is_moved" invisible="1" /> <field name="message_is_moved" invisible="1" />
<field name="message_name_from" invisible="1" /> <field name="message_name_from" invisible="1" />
<field name="message_email_from" invisible="1" /> <field name="message_email_from" invisible="1" />
<field name="message_to_read" invisible="1" /> <field name="message_to_read" invisible="1" />
<field name="uid" invisible="1" /> <field name="uid" invisible="1" />
<p <p
attrs="{'invisible':[('can_move', '!=', False)]}" 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> >You cannot move this message. It was already moved with a message bellow. Open one and apply changes there.</p>
@ -43,7 +44,6 @@
class="oe_highlight" class="oe_highlight"
/> />
</group> </group>
<group attrs="{'invisible':[('can_move', '=', False)]}" colspan="2"> <group attrs="{'invisible':[('can_move', '=', False)]}" colspan="2">
<label for="model" /> <label for="model" />
<div> <div>
@ -147,7 +147,6 @@
</form> </form>
</field> </field>
</record> </record>
<!-- Relocation config wizard --> <!-- Relocation config wizard -->
<record id="view_mail_move_message_config_settings" model="ir.ui.view"> <record id="view_mail_move_message_config_settings" model="ir.ui.view">
<field name="name">relocation settings</field> <field name="name">relocation settings</field>
@ -179,7 +178,6 @@
</form> </form>
</field> </field>
</record> </record>
<record id="action_mail_move_message_config" model="ir.actions.act_window"> <record id="action_mail_move_message_config" model="ir.actions.act_window">
<field name="name">Mail Relocation</field> <field name="name">Mail Relocation</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
@ -188,7 +186,6 @@
<field name="view_mode">form</field> <field name="view_mode">form</field>
<field name="target">inline</field> <field name="target">inline</field>
</record> </record>
<!-- Add menu entry in Settings/Email --> <!-- Add menu entry in Settings/Email -->
<menuitem <menuitem
name="Mail Relocation" name="Mail Relocation"
@ -197,6 +194,5 @@
sequence="99" sequence="99"
action="action_mail_move_message_config" action="action_mail_move_message_config"
/> />
</data> </data>
</openerp> </openerp>

9
mail_private/full_composer_wizard.xml

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

3
mail_private/static/src/xml/mail_private.xml

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

22
mail_to/static/src/xml/recipient.xml

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

6
res_partner_company_messages/views.xml

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