summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkoz-odoo <koz@odoo.com>2020-02-04 06:26:12 +0000
committerBarad Mahendra <mba@openerp.com>2020-02-20 05:35:14 +0000
commit9c4b75f8a0ae7fd7a462d85763e04188b4cec63d (patch)
tree4c6f1c2cd2838da9fb665e85ef07e57a5182eda3
parentda591f5c6c500010258cf2adf0db6bc0312b1ac6 (diff)
[IMP] hr_holidays: Close the leave dialog on click of save
Currently when click on "NEW TIME OFF REQUESTS" from the dashboard, popup with save and discard buttons visible, after create/save new time off request, the dialog is not closed. the dialog is still there with footer buttons "Edit" & "Create". After this commit, The dialog will be cloased when user click on save button. Creted new form view because previous form view is used at other place so we can not add buttons directly on that view. closes odoo/odoo#45137 Task-id: 2183096 Closes: #45137 Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
-rw-r--r--addons/hr_holidays/views/hr_leave_views.xml17
1 files changed, 16 insertions, 1 deletions
diff --git a/addons/hr_holidays/views/hr_leave_views.xml b/addons/hr_holidays/views/hr_leave_views.xml
index ef2e8add6a7..2d671209c8d 100644
--- a/addons/hr_holidays/views/hr_leave_views.xml
+++ b/addons/hr_holidays/views/hr_leave_views.xml
@@ -363,6 +363,21 @@
</field>
</record>
+ <record id="hr_leave_view_form_dashboard_new_time_off" model="ir.ui.view">
+ <field name="name">hr.leave.view.form.dashboard.new.time.off</field>
+ <field name="model">hr.leave</field>
+ <field name="inherit_id" ref="hr_holidays.hr_leave_view_form_dashboard"/>
+ <field name="mode">primary</field>
+ <field name="arch" type="xml">
+ <xpath expr="//sheet" position="after">
+ <footer>
+ <button string="Save" special="save" class="oe_highlight" />
+ <button string="Discard" special="cancel" />
+ </footer>
+ </xpath>
+ </field>
+ </record>
+
<record id="hr_leave_view_form_manager" model="ir.ui.view">
<field name="name">hr.leave.view.form.manager</field>
<field name="model">hr.leave</field>
@@ -588,7 +603,7 @@
<record id="hr_leave_action_my_request_view_form" model="ir.actions.act_window.view">
<field name="view_mode">form</field>
<field name="act_window_id" ref="hr_leave_action_my_request"/>
- <field name="view_id" ref="hr_leave_view_form_dashboard"/>
+ <field name="view_id" ref="hr_leave_view_form_dashboard_new_time_off"/>
</record>
<record id="hr_leave_action_my" model="ir.actions.act_window">