summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addons/sale_timesheet/views/hr_timesheet_views.xml6
-rw-r--r--addons/sale_timesheet/views/project_task_views.xml2
2 files changed, 4 insertions, 4 deletions
diff --git a/addons/sale_timesheet/views/hr_timesheet_views.xml b/addons/sale_timesheet/views/hr_timesheet_views.xml
index 31a02c6eedb..b3f34e8db5c 100644
--- a/addons/sale_timesheet/views/hr_timesheet_views.xml
+++ b/addons/sale_timesheet/views/hr_timesheet_views.xml
@@ -10,8 +10,8 @@
<field name="timesheet_invoice_type"/>
</xpath>
<xpath expr="//filter[@name='month']" position="before">
- <filter name="billable_timesheet" string="Billable" domain="[('non_allow_billable', '=', False)]"/>
- <filter name="non_billable_timesheet" string="Non Billable" domain="[('non_allow_billable', '=', True)]"/>
+ <filter name="billable_timesheet" string="Billable" domain="[('so_line', '!=', False), ('non_allow_billable', '=', False)]"/>
+ <filter name="non_billable_timesheet" string="Non Billable" domain="['|', ('so_line', '=', False), ('non_allow_billable', '=', True)]"/>
<separator/>
<filter name="billable_time" string="Billed on Timesheets" domain="[('timesheet_invoice_type', '=', 'billable_time')]"/>
<filter name="billable_fixed" string="Billed at a Fixed Price" domain="[('timesheet_invoice_type', '=', 'billable_fixed')]"/>
@@ -42,7 +42,7 @@
<field name="inherit_id" ref="hr_timesheet.timesheet_view_tree_user"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='user_id']" position="after">
- <field name="non_allow_billable" optional="hide"/>
+ <field name="non_allow_billable" attrs="{'invisible': [('non_allow_billable', '=', False)]}"/>
</xpath>
</field>
</record>
diff --git a/addons/sale_timesheet/views/project_task_views.xml b/addons/sale_timesheet/views/project_task_views.xml
index ec3b928291c..5f7e9ee6920 100644
--- a/addons/sale_timesheet/views/project_task_views.xml
+++ b/addons/sale_timesheet/views/project_task_views.xml
@@ -137,7 +137,7 @@
<xpath expr="//field[@name='timesheet_ids']/tree" position="inside">
<field name="timesheet_invoice_id" invisible="1"/>
<field name="so_line" readonly="1" context="{'with_remaining_hours': True}" optional="hide"/>
- <field name="non_allow_billable" attrs="{'column_invisible': ['|', '&amp;', '&amp;', '|', ('parent.bill_type', '!=', 'customer_project'), ('parent.pricing_type', '!=', 'employee_rate'), ('parent.timesheet_product_id', '=', False), ('parent.sale_line_id', '=', False), '&amp;', ('parent.bill_type', '=', 'customer_project'), ('parent.pricing_type', '=', 'employee_rate')]}" optional="hide"/>
+ <field name="non_allow_billable" attrs="{'column_invisible': ['|', '&amp;', '&amp;', '|', ('parent.bill_type', '!=', 'customer_project'), ('parent.pricing_type', '!=', 'employee_rate'), ('parent.timesheet_product_id', '=', False), ('parent.sale_line_id', '=', False), '&amp;', ('parent.bill_type', '=', 'customer_project'), ('parent.pricing_type', '=', 'employee_rate')]}" invisible="1"/>
</xpath>
</field>
</record>