diff options
| author | nia-odoo <nia@odoo.com> | 2020-03-09 09:38:16 +0000 |
|---|---|---|
| committer | Barad Mahendra <mba@openerp.com> | 2020-03-27 10:12:23 +0000 |
| commit | 5cc42022fc159e71ccd2dde122ddde80dd66e23e (patch) | |
| tree | 9e0f799fbfc4873bd1724c6c584865b2b173147e /addons/hr_holidays/views | |
| parent | fbd1d7584a0c7c505c1af8a18ae245ac2aac52a6 (diff) | |
[IMP] hr_holidays: Allow to select start date for accruals for allocation
Currently it was not possible select start date for accruals
leave allocation. it was default taken as today's date.
So purpose of this task is to make start date field of accrual
time off visible so user do not have to wait until day to add a day off
In this commit, we make start date field of accrual time off visible with
default value as today and also check for the start date in cron method.
closes odoo/odoo#46811
Taskid: 2199326
Closes: #46811
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Diffstat (limited to 'addons/hr_holidays/views')
| -rw-r--r-- | addons/hr_holidays/views/hr_leave_allocation_views.xml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/addons/hr_holidays/views/hr_leave_allocation_views.xml b/addons/hr_holidays/views/hr_leave_allocation_views.xml index 68212af9c7f..e2d66fb694b 100644 --- a/addons/hr_holidays/views/hr_leave_allocation_views.xml +++ b/addons/hr_holidays/views/hr_leave_allocation_views.xml @@ -159,13 +159,14 @@ <attribute name="invisible">0</attribute> </xpath> <xpath expr="//field[@name='allocation_type']" position="after"> - <label for="date_to" string="" - attrs="{'invisible': [('allocation_type', '=', 'regular')]}"/> + <label for="date_from" attrs="{'invisible': [('allocation_type', '=', 'regular')]}"/> + <div class="o_row" attrs="{'invisible': [('allocation_type', '=', 'regular')]}"> + <field name="date_from" widget="date" required="1" class="mr-2"/> + Run until <field name="date_to" help="If no value set, runs indefinitely" class="ml-2" widget="date"/> + </div> + <label for="date_from" invisible="1"/> <div attrs="{'invisible': [('allocation_type', '=', 'regular')]}"> <div class="o_row"> - Run until <field name="date_to" string="Run Until" help="If no value set, runs indefinitely" class="ml-2" widget="date"/> - </div> - <div class="o_row"> <span>Add</span> <field name="number_per_interval" class="ml8" attrs="{'required': [('allocation_type', '=', 'accrual')]}"/> |
