summaryrefslogtreecommitdiff
path: root/addons/account/models/res_config_settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'addons/account/models/res_config_settings.py')
-rw-r--r--addons/account/models/res_config_settings.py12
1 files changed, 0 insertions, 12 deletions
diff --git a/addons/account/models/res_config_settings.py b/addons/account/models/res_config_settings.py
index 457c00481b3..18c1ceb012b 100644
--- a/addons/account/models/res_config_settings.py
+++ b/addons/account/models/res_config_settings.py
@@ -162,15 +162,3 @@ class ResConfigSettings(models.TransientModel):
'Modify your taxes first before disabling this setting.')
}
return res
-
- @api.model
- def create(self, values):
- # Optimisation purpose, saving a res_config even without changing any values will trigger the write of all
- # related values, including the currency_id field on res_company. This in turn will trigger the recomputation
- # of account_move_line related field company_currency_id which can be slow depending on the number of entries
- # in the database. Thus, if we do not explicitly change the currency_id, we should not write it on the company
- if ('company_id' in values and 'currency_id' in values):
- company = self.env['res.company'].browse(values.get('company_id'))
- if company.currency_id.id == values.get('currency_id'):
- values.pop('currency_id')
- return super(ResConfigSettings, self).create(values)