Skip to content

Commit

Permalink
Merge pull request #47 from akretion/14-timesheet-task-mandatory
Browse files Browse the repository at this point in the history
[IMP] Make task mandatory in timesheet line views because invoicing w…
  • Loading branch information
florian-dacosta authored Apr 25, 2024
2 parents 817f4d0 + 8fdcab8 commit 961d7be
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 961d7be

Please sign in to comment.