[FIX] sale_timesheet: remove group_by
- Group the SO list view by Analytic Account - Go to a SO - Click on the stat button 'Timesheets' Traceback because the field `analytic_account_id` is not on Timesheets. opw-2124539 closes odoo/odoo#40840 X-original-commit: 3f17dd36e8369c21e55009e5492438cb9f9ea53d Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This commit is contained in:
@@ -138,7 +138,9 @@ class SaleOrder(models.Model):
|
||||
def action_view_timesheet(self):
|
||||
self.ensure_one()
|
||||
action = self.env.ref('sale_timesheet.timesheet_action_from_sales_order').read()[0]
|
||||
action['context'] = self.env.context # erase default filters
|
||||
ctx = dict(self.env.context or {})
|
||||
ctx.pop('group_by', None)
|
||||
action['context'] = ctx # erase default filters
|
||||
if self.timesheet_count > 0:
|
||||
action['domain'] = [('so_line', 'in', self.order_line.ids)]
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user