|
@ -4,62 +4,61 @@ |
|
|
# 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> |
|
|
|
|
|
|
|
|
<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" |
|
|
rel="stylesheet" |
|
|
href="/mail_move_message/static/src/css/mail_move_message.css" |
|
|
href="/mail_move_message/static/src/css/mail_move_message.css" |
|
|
/> |
|
|
/> |
|
|
<script |
|
|
|
|
|
|
|
|
<script |
|
|
type="text/javascript" |
|
|
type="text/javascript" |
|
|
src="/mail_move_message/static/src/js/mail_move_message.js" |
|
|
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)]}" |
|
|
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> |
|
|
<group attrs="{'invisible':[('can_move', '!=', False)]}"> |
|
|
|
|
|
<field |
|
|
|
|
|
|
|
|
<group attrs="{'invisible':[('can_move', '!=', False)]}"> |
|
|
|
|
|
<field |
|
|
name="message_moved_by_message_id" |
|
|
name="message_moved_by_message_id" |
|
|
context="{'extended_name':1}" |
|
|
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" |
|
|
name="open_moved_by_message_id" |
|
|
string="Open message" |
|
|
string="Open message" |
|
|
type="object" |
|
|
type="object" |
|
|
class="oe_highlight" |
|
|
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" |
|
|
string="Create Partner" |
|
|
attrs="{'invisible':[('partner_id','!=',False)]}" |
|
|
attrs="{'invisible':[('partner_id','!=',False)]}" |
|
|
class="oe_highlight oe_inline ml32" |
|
|
class="oe_highlight oe_inline ml32" |
|
@ -68,46 +67,46 @@ |
|
|
field="partner_id" |
|
|
field="partner_id" |
|
|
context="{'force_email':True,'default_email':message_email_from,'default_name':message_name_from, 'update_message_author':True}" |
|
|
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" |
|
|
for="move_back" |
|
|
attrs="{'invisible':[('message_is_moved','=',False)]}" |
|
|
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" |
|
|
name="move" |
|
|
string="Move" |
|
|
string="Move" |
|
|
type="object" |
|
|
type="object" |
|
|
class="oe_highlight" |
|
|
class="oe_highlight" |
|
|
attrs="{'invisible':[('can_move', '=', False)]}" |
|
|
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> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<footer> |
|
|
|
|
|
|
|
|
<footer> |
|
|
<button |
|
|
<button |
|
|
name="read_close" |
|
|
name="read_close" |
|
|
string="Mark as read and Close" |
|
|
string="Mark as read and Close" |
|
@ -126,59 +125,56 @@ |
|
|
attrs="{'invisible':[('uid','!=',1)]}" |
|
|
attrs="{'invisible':[('uid','!=',1)]}" |
|
|
/> |
|
|
/> |
|
|
</footer> |
|
|
</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" |
|
|
class="app_settings_block" |
|
|
data-string="Mail Relocation" |
|
|
data-string="Mail Relocation" |
|
|
string="Mail Relocation" |
|
|
string="Mail Relocation" |
|
|
data-key="mail_move_message" |
|
|
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> |
|
|
<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 |
|
|
Add models to be used for message relocation |
|
|
</div> |
|
|
</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> |
|
|
<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> |
|
|
</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> |
|
|
</odoo> |