From 873dc0370d7a006156cbfeb2ee793ddd67437777 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 30 Jul 2014 15:26:43 +0200 Subject: [PATCH] [FIX] sale: config, timesheet if module account_analytic_analysis In Settings > Sales, the onchange_timesheet ensure that if you check timesheet, it checks module_account_analytic_analysis. Therefore, if module_account_analytic_analysis is installed, timesheet should be checked by default Until now, it worked "luckily", because the onchange_timesheet of the field module_account_analytic_analysis was triggered before the onchange_timesheet of the timesheet field. Nevertheless, we shouldn't trust the onchange calls order. --- addons/sale/res_config.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/sale/res_config.py b/addons/sale/res_config.py index f4239b0e1a2..164213f1f59 100644 --- a/addons/sale/res_config.py +++ b/addons/sale/res_config.py @@ -91,6 +91,7 @@ Example: Product: this product is deprecated, do not purchase more than 5. except ValueError: # keep default value in that case _logger.warning("Product with xml_id 'product.product_product_consultant' not found") + res['timesheet'] = res.get('module_account_analytic_analysis') return res def _get_default_time_unit(self, cr, uid, context=None):