mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]pms: refactor workflow mails
This commit is contained in:
@@ -1,73 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record model="ir.ui.view" id="pms_automated_mails_view">
|
||||
<field name="name">pms.automated_mails_view_form</field>
|
||||
<field name="model">pms.automated.mails</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Automated Mails" class="pt-1">
|
||||
<sheet>
|
||||
<div class="col-5">
|
||||
<label for="name" />
|
||||
<group>
|
||||
<h2><field name="name" /></h2>
|
||||
</group>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-5">
|
||||
<group>
|
||||
<field name="active" widget="boolean_toggle" />
|
||||
<field name="template_id" />
|
||||
<field name="action" />
|
||||
<field
|
||||
name="pms_property_ids"
|
||||
widget="many2many_tags"
|
||||
options="{'no_create': True,'no_open': True}"
|
||||
/>
|
||||
</group>
|
||||
</div>
|
||||
<div class="col-5">
|
||||
<group>
|
||||
<field name="moment" />
|
||||
<field
|
||||
name="time"
|
||||
attrs="{'invisible':[('moment','=','in_act')]}"
|
||||
/>
|
||||
<field
|
||||
name="time_type"
|
||||
attrs="{'invisible':[('moment','=','in_act')]}"
|
||||
/>
|
||||
</group>
|
||||
</div>
|
||||
</div>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
<record id="view_automated_mails_tree" model="ir.ui.view">
|
||||
<field name="name">pms.automated.mails.tree</field>
|
||||
<field name="model">pms.automated.mails</field>
|
||||
<field name="arch" type="xml">
|
||||
<tree string="Automated Mails">
|
||||
<field name="name" />
|
||||
<field name="action" />
|
||||
<field name="template_id" />
|
||||
<field name="moment" />
|
||||
<field name="time" />
|
||||
<field name="time_type" />
|
||||
</tree>
|
||||
</field>
|
||||
</record>
|
||||
<record model="ir.actions.act_window" id="open_pms_automated_mails_tree">
|
||||
<field name="name">Automated Mails</field>
|
||||
<field name="res_model">pms.automated.mails</field>
|
||||
<field name="view_id" ref="view_automated_mails_tree" />
|
||||
<field name="view_mode">tree,form</field>
|
||||
</record>
|
||||
<menuitem
|
||||
name="Automated Mails"
|
||||
id="menu_pms_automated_mails"
|
||||
action="open_pms_automated_mails_tree"
|
||||
sequence="40"
|
||||
parent="pms.pms_configuration_menu"
|
||||
/>
|
||||
</odoo>
|
||||
@@ -281,6 +281,8 @@
|
||||
</group>
|
||||
<group>
|
||||
<group string="General Info" name="contact_details">
|
||||
<field name="days_to_checkin" />
|
||||
<field name="days_to_checkout" />
|
||||
<field
|
||||
name="document_type"
|
||||
attrs="{'invisible':[('reservation_type','in',('out'))]}"
|
||||
|
||||
@@ -44,32 +44,35 @@
|
||||
type="object"
|
||||
/>
|
||||
<button
|
||||
name="action_open_mail_composer"
|
||||
name="action_open_confirmation_mail_composer"
|
||||
string="Send Confirmation Email "
|
||||
type="object"
|
||||
attrs="{'invisible':['|','|','|',('to_send_mail', '=', False),('is_modified_reservation', '=', True),('state', 'not in', 'confirm'),('reservation_type', 'in', 'out')]}"
|
||||
attrs="{'invisible':[('to_send_confirmation_mail', '=', False)]}"
|
||||
/>
|
||||
<button
|
||||
name="action_open_mail_composer"
|
||||
name="action_open_modification_mail_composer"
|
||||
string="Send Modification Email "
|
||||
type="object"
|
||||
attrs="{'invisible':['|','|','|',('to_send_mail', '=', False), ('is_modified_reservation', '=', False), ('state', 'in', 'cancel'),('reservation_type', 'in', 'out')]}"
|
||||
attrs="{'invisible':[('to_send_modification_mail', '=', False)]}"
|
||||
/>
|
||||
<button
|
||||
name="action_open_mail_composer"
|
||||
name="action_open_exit_mail_composer"
|
||||
string="Send Exit Email "
|
||||
type="object"
|
||||
attrs="{'invisible':['|','|',('to_send_mail', '=', False), ('state', 'not in', 'done'),('reservation_type', 'in', 'out')]}"
|
||||
attrs="{'invisible':[('to_send_exit_mail', '=', False)]}"
|
||||
/>
|
||||
<button
|
||||
name="action_open_mail_composer"
|
||||
name="action_open_cancelation_mail_composer"
|
||||
string="Send Cancellation Email "
|
||||
type="object"
|
||||
attrs="{'invisible':['|','|',('to_send_mail', '=', False), ('state', 'not in', 'cancel'),('reservation_type', 'in', 'out')]}"
|
||||
attrs="{'invisible':[('to_send_cancelation_mail', '=', False)]}"
|
||||
/>
|
||||
|
||||
<field name="state" widget="statusbar" />
|
||||
<field name="to_send_mail" invisible="1" />
|
||||
<field name="is_modified_reservation" invisible="1" />
|
||||
<field name="to_send_confirmation_mail" invisible="1" />
|
||||
<field name="to_send_modification_mail" invisible="1" />
|
||||
<field name="to_send_exit_mail" invisible="1" />
|
||||
<field name="to_send_cancelation_mail" invisible="1" />
|
||||
</header>
|
||||
<div
|
||||
class="alert alert-info"
|
||||
@@ -567,7 +570,11 @@
|
||||
<field name="price_tax" optional="hide" />
|
||||
<field name="discount" />
|
||||
<field name="price_total" />
|
||||
<field name="service_line_ids" invisible="1">
|
||||
<field
|
||||
name="service_line_ids"
|
||||
invisible="1"
|
||||
readonly="1"
|
||||
>
|
||||
<tree string="Days">
|
||||
<field name="date" />
|
||||
<field name="day_qty" />
|
||||
|
||||
Reference in New Issue
Block a user