[FIX] project_issue_sheet: hide timesheets tab on issues w/o project
Since it is not possible to create a timesheet entry on a issue without a project_id, the timesheets page in the form view should be hidden if no project is set. This prevents the user from trying to create a timesheet entry on the issue 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:
@@ -14,7 +14,7 @@
|
||||
<attribute name="on_change">on_change_project(project_id)</attribute>
|
||||
</field>
|
||||
<xpath expr="//notebook/page[@name='extra_info']" position="before">
|
||||
<page string="Timesheets">
|
||||
<page string="Timesheets" attrs="{'invisible': [('project_id', '=', False)]}">
|
||||
<field name="timesheet_ids" colspan="4" nolabel="1" context="{'default_user_id' : uid, 'default_project_id': project_id}"
|
||||
groups="base.group_user">
|
||||
<tree editable="top" string="Timesheet Activities">
|
||||
|
||||
Reference in New Issue
Block a user