Skip to content

Commit

Permalink
[IMP] Make task mandatory in timesheet line views because invoicing w…
Browse files Browse the repository at this point in the history
…ill fail if not set
  • Loading branch information
florian-dacosta committed Apr 23, 2024
1 parent 817f4d0 commit 8fdcab8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions project_invoicing_subcontractor/views/hr_timesheet_sheet.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,17 @@
>
<field name="discount" />
</xpath>
<field name="add_line_task_id" position="attributes">
<attribute
name="attrs"
>{'required': [('add_line_project_id', '!=', False)]}</attribute>
</field>
<xpath
expr="//field[@name='timesheet_ids']/tree/field[@name='task_id']"
position="attributes"
>
<attribute name="required">1</attribute>
</xpath>
</field>
</record>

Expand Down
3 changes: 3 additions & 0 deletions project_invoicing_subcontractor/views/hr_timesheet_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@
<field name="project_id" position="before">
<field name="partner_id" optional="show" />
</field>
<field name="task_id" position="attributes">
<attribute name="required">1</attribute>
</field>
<field name="task_id" position="after">
<field name="parent_task_id" optional="hide" />
<field name="task_stage_id" optional="show" />
Expand Down

0 comments on commit 8fdcab8

Please sign in to comment.