diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2019-11-19 15:20:12 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2019-11-26 07:11:27 +0000 |
| commit | b15b6e30e11e151f520202dcc7d823d709ec2dc3 (patch) | |
| tree | ed70c968b49ca4cc1d2eade915e28019cddda10f /addons | |
| parent | 3460b3ca15a1086d034cc00120d0130e4c8401ed (diff) | |
[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>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/sale_timesheet/models/sale_order.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/sale_timesheet/models/sale_order.py b/addons/sale_timesheet/models/sale_order.py index b110cd082c4..78181dc3479 100644 --- a/addons/sale_timesheet/models/sale_order.py +++ b/addons/sale_timesheet/models/sale_order.py @@ -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: |
