[FIX] sale: onchange task_work

The unticked option in Sales settings "Prepare invoices based on task's activities"  doesn't
have to uninstall the options "Record timesheet lines per tasks" and "Generate tasks from sale orders"
in Project settings.
When "Prepare invoices based on task's activities" is unticked, this fix avoid to uninstall these options each
time we go to Sales settings because "onchange_task_work" is triggered each time we go to Sales settings.

opw:645833
This commit is contained in:
Goffin Simon 2015-07-30 13:56:56 +02:00
parent b4de311b0c
commit f10c03ac68
1 changed files with 2 additions and 0 deletions

View File

@ -119,6 +119,8 @@ Example: Product: this product is deprecated, do not purchase more than 5.
return {}
def onchange_task_work(self, cr, uid, ids, task_work, context=None):
if not task_work:
return {'value': {}}
return {'value': {
'module_project_timesheet': task_work,
'module_project_mrp': task_work,