summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Bouvy <dbo@odoo.com>2016-08-17 16:37:44 +0200
committerDamien Bouvy <dbo@odoo.com>2016-08-17 16:37:44 +0200
commit037a152db64f6dbdfbd89268f534a4e3bc022b23 (patch)
treea19cc69ca62db80b44ce42d6736574970b70f4da
parentcda132bba59a73aba1539094ad88d1a66e77d09e (diff)
[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]
-rw-r--r--addons/project_issue_sheet/project_issue_sheet_view.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/project_issue_sheet/project_issue_sheet_view.xml b/addons/project_issue_sheet/project_issue_sheet_view.xml
index a06bfe0cce2..677b7fd714c 100644
--- a/addons/project_issue_sheet/project_issue_sheet_view.xml
+++ b/addons/project_issue_sheet/project_issue_sheet_view.xml
@@ -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">