[FIX] hr_timesheet: Hide timesheets on tasks w/o project
Since it is not possible to create a timesheet entry on a task without a project_id, the timesheets page on the task form view will be hidden on such tasks. This prevents the user from trying to create a timesheet entry on such a task and receive a not so transparent message like: mandatory field is not set: [object with reference: account_id - account.id]
This commit is contained in:
@@ -75,7 +75,7 @@
|
||||
<field name="subtask_project_id" invisible="1" />
|
||||
</field>
|
||||
<xpath expr="//notebook/page[@name='description_page']" position="after">
|
||||
<page string="Timesheets">
|
||||
<page string="Timesheets" attrs="{'invisible': [('project_id', '=', False)]}">
|
||||
<field name="timesheet_ids" context="{'default_project_id': project_id}">
|
||||
<tree editable="bottom" string="Timesheet Activities" default_order="date">
|
||||
<field name="date"/>
|
||||
|
||||
Reference in New Issue
Block a user