Browse Source

Merge pull request #285 from yelizariev/12.0-pre-commit-16

💚 pre-commit run --all
pull/291/head
Denis Mudarisov 5 years ago
committed by GitHub
parent
commit
eb5aefebfe
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 17
      mail_all/views/templates.xml
  2. 8
      mail_check_immediately/static/src/xml/main.xml
  3. 8
      mail_move_message/data/mail_move_message_data.xml
  4. 216
      mail_move_message/mail_move_message_views.xml
  5. 39
      mail_private/full_composer_wizard.xml
  6. 7
      mail_private/static/src/xml/mail_private.xml
  7. 12
      mail_private/template.xml
  8. 10
      mail_recovery/data.xml
  9. 8
      mail_to/static/src/xml/recipient.xml
  10. 24
      mailgun/data/ir_cron_data.xml
  11. 6
      res_partner_company_messages/views.xml

17
mail_all/views/templates.xml

@ -4,21 +4,18 @@
# Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# License MIT (https://opensource.org/licenses/MIT). -->
<odoo>
<template
<template
id="mail_all_assets_backend"
name="mail_all_assets_backend"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside">
<link rel="stylesheet" href="/mail_all/static/src/css/mail_all.css" />
<script
src="/mail_all/static/src/js/mail_all.js"
type="text/javascript"
/>
<script
<xpath expr="." position="inside">
<link rel="stylesheet" href="/mail_all/static/src/css/mail_all.css" />
<script src="/mail_all/static/src/js/mail_all.js" type="text/javascript" />
<script
src="/mail_all/static/src/js/test_mail_all.js"
type="text/javascript"
/>
</xpath>
</template>
</xpath>
</template>
</odoo>

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>

8
mail_move_message/data/mail_move_message_data.xml

@ -3,8 +3,8 @@
# Copyright 2017 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# License MIT (https://opensource.org/licenses/MIT).-->
<odoo>
<record id="mail_relocation_models" model="ir.config_parameter">
<field name="key">mail_relocation_models</field>
<field name="value">crm.lead,project.task</field>
</record>
<record id="mail_relocation_models" model="ir.config_parameter">
<field name="key">mail_relocation_models</field>
<field name="value">crm.lead,project.task</field>
</record>
</odoo>

216
mail_move_message/mail_move_message_views.xml

@ -4,62 +4,61 @@
# Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
# License MIT (https://opensource.org/licenses/MIT).-->
<odoo>
<template id="assets_backend" name="custom bar assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<link
<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_record" />
<div>
<field name="model_record" class="oe_inline" />
<field name="model" invisible="1" />
<field name="res_id" invisible="1" />
</div>
<label for="filter_by_partner" />
<div>
<field name="filter_by_partner" class="oe_inline" />
<field name="partner_id" class="oe_inline" />
<button
</group>
<group attrs="{'invisible':[('can_move', '=', False)]}" colspan="2">
<label for="model_record" />
<div>
<field name="model_record" class="oe_inline" />
<field name="model" invisible="1" />
<field name="res_id" invisible="1" />
</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"
@ -68,46 +67,46 @@
field="partner_id"
context="{'force_email':True,'default_email':message_email_from,'default_name':message_name_from, 'update_message_author':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>
<footer>
<footer>
<button
name="read_close"
string="Mark as read and Close"
@ -126,59 +125,56 @@
attrs="{'invisible':[('uid','!=',1)]}"
/>
</footer>
</form>
</field>
</record>
<!-- Relocation config wizard -->
<record id="view_mail_move_message_config_settings" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="55" />
<field name="inherit_id" ref="base.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//div[hasclass('settings')]" position="inside">
<div
</form>
</field>
</record>
<!-- Relocation config wizard -->
<record id="view_mail_move_message_config_settings" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit</field>
<field name="model">res.config.settings</field>
<field name="priority" eval="55" />
<field name="inherit_id" ref="base.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//div[hasclass('settings')]" position="inside">
<div
class="app_settings_block"
data-string="Mail Relocation"
string="Mail Relocation"
data-key="mail_move_message"
>
<h2>Mail Relocation</h2>
<div class="row mt16 o_settings_container">
<div class="col-xs-12 col-md-6 o_setting_box" id="crm_lead">
<div class="o_setting_left_pane">
<h2>Mail Relocation</h2>
<div class="row mt16 o_settings_container">
<div class="col-xs-12 col-md-6 o_setting_box" id="crm_lead">
<div class="o_setting_left_pane">
</div>
<div class="o_setting_right_pane">
<label for="model_ids" />
<div class="text-muted">
<div class="o_setting_right_pane">
<label for="model_ids" />
<div class="text-muted">
Add models to be used for message relocation
</div>
<field name="model_ids" widget="many2many_tags" />
</div>
</div>
<div class="col-xs-12 col-md-6 o_setting_box" id="crm_lead">
<div class="o_setting_left_pane">
<field name="move_followers" />
<field name="model_ids" widget="many2many_tags" />
</div>
</div>
<div class="o_setting_right_pane">
<label for="move_followers" />
<div class="col-xs-12 col-md-6 o_setting_box" id="crm_lead">
<div class="o_setting_left_pane">
<field name="move_followers" />
</div>
<div class="o_setting_right_pane">
<label for="move_followers" />
</div>
</div>
</div>
</div>
</div>
</xpath>
</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>
<field name="res_model">res.config.settings</field>
<field name="view_id" ref="view_mail_move_message_config_settings" />
<field name="view_mode">form</field>
<field name="target">inline</field>
<field name="context">{'module' : 'mail_move_message'}</field>
</record>
</xpath>
</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>
<field name="res_model">res.config.settings</field>
<field name="view_id" ref="view_mail_move_message_config_settings" />
<field name="view_mode">form</field>
<field name="target">inline</field>
<field name="context">{'module' : 'mail_move_message'}</field>
</record>
</odoo>

39
mail_private/full_composer_wizard.xml

@ -3,31 +3,24 @@
Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/>
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

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

12
mail_private/template.xml

@ -3,20 +3,20 @@
Copyright 2019 Artem Rafailov <https://it-projects.info/team/Ommo73/>
License MIT (https://opensource.org/licenses/MIT).-->
<odoo>
<template
<template
id="assets_backend"
name="mail_private_assets_backend"
inherit_id="web.assets_backend"
>
<xpath expr="." position="inside">
<script
<xpath expr="." position="inside">
<script
type="text/javascript"
src="/mail_private/static/src/js/mail_private.js"
/>
<script
<script
type="text/javascript"
src="/mail_private/static/src/js/test_private.js"
/>
</xpath>
</template>
</xpath>
</template>
</odoo>

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>

8
mail_to/static/src/xml/recipient.xml

@ -2,11 +2,9 @@
<template>
<t t-extend="mail.widget.Thread.Message">
<t t-jquery="p.o_mail_info" t-operation="append">
<span class="recipients_info">
<t t-set="partner_ids" t-value="message.getCustomerEmailData()" />
<t t-if="partner_ids">
<t t-if="partner_ids.length > 0">To: </t>
<t t-foreach="partner_ids.length" t-as="i">
<t t-if="i &lt; 4">
@ -14,9 +12,8 @@
t-att-href="_.str.sprintf('/web?#id=%s&amp;view_type=form&amp;model=res.partner', partner_ids[i][0])"
class="recipient_link"
>
<i t-esc="partner_ids[i][1]" /><t
t-if="i &lt; partner_ids.length - 1"
>; </t>
<i t-esc="partner_ids[i][1]" />
<t t-if="i &lt; partner_ids.length - 1">; </t>
</a>
</t>
</t>
@ -25,7 +22,6 @@
and <t t-esc="partner_ids.length - 4" /> more
</span>
</t>
</t>
</span>
</t>

24
mailgun/data/ir_cron_data.xml

@ -1,15 +1,15 @@
<?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 request</field>
<field name="model_id" ref="model_ir_config_parameter" />
<field name="interval_number">10</field>
<field name="interval_type">minutes</field>
<field name="numbercall">10</field>
<field name="state">code</field>
<field name="code">model.mailgun_verify()</field>
<field name="doall" eval="True" />
</record>
</data>
<data noupdate="1">
<record id="mailgun_domain_verification" model="ir.cron">
<field name="name">Mailgun - domain verification request</field>
<field name="model_id" ref="model_ir_config_parameter" />
<field name="interval_number">10</field>
<field name="interval_type">minutes</field>
<field name="numbercall">10</field>
<field name="state">code</field>
<field name="code">model.mailgun_verify()</field>
<field name="doall" eval="True" />
</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