diff options
| author | Goffin Simon <sig@odoo.com> | 2020-12-22 12:30:34 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2020-12-22 13:42:09 +0000 |
| commit | 8d658abc9c60149b0ac63772cdb76dcbd8080cde (patch) | |
| tree | ea63dbf3ba05c53c4bd9b3a7644a2d3e7a60d8ae | |
| parent | ee2ca9cb4c4172479fb949ad7a9726c7aaac6021 (diff) | |
[FIX] sale_timesheet: Record rule not updated
Steps to reproduce the bug:
- Install Accounting, Sales, Project and Timesheet apps
- Enable Analytic accounting in Accounting settings
- Uninstall Timesheet app
Bug:
The domain_force of was account.analytic.line.billing.user still equal to
[('project_id', '=', False)] but the field project_id didn't exist
on model account_analytic_line.
opw:2420177
closes odoo/odoo#63687
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
| -rw-r--r-- | addons/sale_timesheet/__init__.py | 7 | ||||
| -rw-r--r-- | addons/sale_timesheet/__manifest__.py | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/addons/sale_timesheet/__init__.py b/addons/sale_timesheet/__init__.py index 7d7e07d0b8c..211c0d74460 100644 --- a/addons/sale_timesheet/__init__.py +++ b/addons/sale_timesheet/__init__.py @@ -4,3 +4,10 @@ from . import controllers from . import models from . import wizard from . import report + +from odoo import api, SUPERUSER_ID + +def uninstall_hook(cr, registry): + env = api.Environment(cr, SUPERUSER_ID, {}) + + env.ref("account.account_analytic_line_rule_billing_user").write({'domain_force': "[(1, '=', 1)]"}) diff --git a/addons/sale_timesheet/__manifest__.py b/addons/sale_timesheet/__manifest__.py index 577e5cba62c..e27005cf5f6 100644 --- a/addons/sale_timesheet/__manifest__.py +++ b/addons/sale_timesheet/__manifest__.py @@ -41,4 +41,5 @@ have real delivered quantities in sales orders. 'data/sale_service_demo.xml', ], 'auto_install': True, + 'uninstall_hook': 'uninstall_hook', } |
