Planning date format and save template true updated

This commit is contained in:
projectsodoo 2021-01-08 15:06:21 +05:30
parent 866c25fcae
commit 468b0b010f
2 changed files with 3 additions and 3 deletions

View File

@ -78,7 +78,7 @@ class Planning(models.Model):
# template dummy fields (only for UI purpose)
template_creation = fields.Boolean("Save as a Template", default=False, store=False, inverse='_inverse_template_creation')
template_autocomplete_ids = fields.Many2many('planning.slot.template', store=False, compute='_compute_template_autocomplete_ids')
template_id = fields.Many2one('planning.slot.template', string='Planning Templates', store=False)
template_id = fields.Many2one('planning.slot.template', string='Planning Templates', store=True)
# Recurring (`repeat_` fields are none stored, only used for UI purpose)
recurrency_id = fields.Many2one('planning.recurrency', readonly=True, index=True, ondelete="set null", copy=False)

View File

@ -181,8 +181,8 @@
<div class="row no-gutters">
<div class="col">
<ul class="pl-1 mb-0">
<li><strong>Start Date: </strong> <t t-esc="userTimezoneStartDate.format('YYYY-MM-DD hh:mm:ss A')"/></li>
<li><strong>Stop Date: </strong> <t t-esc="userTimezoneStopDate.format('YYYY-MM-DD hh:mm:ss A')"/></li>
<li><strong>Start Date: </strong> <t t-esc="userTimezoneStartDate.format('DD-MM-YYYY hh:mm:ss A')"/></li>
<li><strong>Stop Date: </strong> <t t-esc="userTimezoneStopDate.format('DD-MM-YYYY hh:mm:ss A')"/></li>
<li id="allocated_hours"><strong>Allocated Hours: </strong> <t t-esc="'' + Math.floor(allocated_hours) + ':' + ((allocated_hours % 1) * 60 >= 10 ? (allocated_hours % 1) * 60 : '0'+(allocated_hours % 1) * 60)"/></li>
</ul>
<t t-if="publication_warning">