diff options
| author | Nicolas Martinelli <nim@odoo.com> | 2020-06-19 08:32:51 +0000 |
|---|---|---|
| committer | Nicolas Martinelli <nim@odoo.com> | 2020-06-19 14:10:00 +0000 |
| commit | d5ba35cb7cd2cebbd53b11cbd8b9c73808e88ad5 (patch) | |
| tree | 779c564218ee4556d7bfcefa3e85067646f3ef3a | |
| parent | 584b76d70ba60c8725108a40f85629f8ca8d0dd9 (diff) | |
[FIX] sale_timesheet: clean context
- Modify `timesheet_action_all` to display the tree view before the grid
view
- In the quotation tree view, order by Status, group by Salesman and
save as filter
- Open a SO with timesheets
- Clck on the 'Timesheets' stat button
An error occurs because the `orderedBy` context key is added in the
action context.
The purpose of replacing the action context is to remove the default
filters. We can simply set an empty dict to avoid any unwanted keys.
opw-2278618
closes odoo/odoo#53339
X-original-commit: 4a0348fed0c7c5b9557d1c9ae2dbf2bbfafcc3a2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
| -rw-r--r-- | addons/sale_timesheet/models/sale_order.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/addons/sale_timesheet/models/sale_order.py b/addons/sale_timesheet/models/sale_order.py index 9ae4af48edd..bcc5859899f 100644 --- a/addons/sale_timesheet/models/sale_order.py +++ b/addons/sale_timesheet/models/sale_order.py @@ -53,9 +53,7 @@ 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] - ctx = dict(self.env.context or {}) - ctx.pop('group_by', None) - action['context'] = ctx # erase default filters + action['context'] = {} # erase default filters if self.timesheet_count > 0: action['domain'] = [('so_line', 'in', self.order_line.ids)] else: |
