[FIX] sale_timesheet: project task invoice wizard daterange

saas-16.3

Steps To reproduce:
 - install project, sales, and timesheets
 -  open the project module and select any project created from SO
 - click on any task
 - click on the Sales Order smart button
 - to set the end date hover beside the start date

Issue:
 - end date should not be optional to select.

Cause:
 - the unification of datetime, daterange, and date happened in task 3121497
   where daterange widget has the end date by default optional.

Solution:
 - I have added attrs and Timesheets Period label to have the same behavior as it was in saas-16.2.

task-3506482

closes odoo/odoo#145115

X-original-commit: 1525c426b47c01a950da7f5d1e15d2839bdc8c93
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
This commit is contained in:
dhda-odoo
2023-12-06 17:27:43 +00:00
committed by Xavier Bol (xbo)
parent 962d4324fb
commit 0629e34715
2 changed files with 8 additions and 0 deletions
@@ -1205,6 +1205,11 @@ msgstr ""
msgid "Timesheet Encoding Unit"
msgstr ""
#. module: sale_timesheet
#: model_terms:ir.ui.view,arch_db:sale_timesheet.sale_advance_payment_inv_timesheet_view_form
msgid "Timesheets Period"
msgstr ""
#. module: sale_timesheet
#: model:ir.model.fields,field_description:sale_timesheet.field_project_project__timesheet_product_id
#: model:ir.model.fields,field_description:sale_timesheet.field_project_task__timesheet_product_id
@@ -15,8 +15,11 @@
name="timesheet_invoice_date_range"
invisible="not invoicing_timesheet_enabled or advance_payment_method != 'delivered'">
<field
class="w-75 w-md-50 w-lg-25"
name="date_start_invoice_timesheet"
string="Timesheets Period"
widget="daterange"
required="date_start_invoice_timesheet or date_end_invoice_timesheet"
options="{'end_date_field': 'date_end_invoice_timesheet'}"
title="Only timesheets not yet invoiced (and validated, if applicable) from this period will be invoiced. If the period is not indicated, all timesheets not yet invoiced (and validated, if applicable) will be invoiced without distinction."
/>