summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorYannick Tivisse <yti@odoo.com>2017-11-29 17:01:26 +0100
committerYannick Tivisse <yti@odoo.com>2018-04-13 16:54:28 +0200
commit71c568686aa7615b7f59e750b845414a4675c0a1 (patch)
treeee567a45c0d264815e5affe564d25d429246e5b4 /addons/web/static/src/js/views/basic/basic_controller.js
parent4868ba78ff5caa4cfa724ada5f3834f1512e44cd (diff)
[IMP] base: Deprecate 'compute' and introduce '_convert'
Purpose ======= The method compute is annoying for the following reasons: - 'compute' is difficult to grep - Developers don't understand that they can specify the company and the date on which we want to convert the amount. This is quite error prone because if these parameters aren't specified, they are set by default to the company of the current user and the current date (today). - Passing parameters is the context is not a correct way to call a method. Furthermore, using with_context is not really good for the performance too, as the record as to be rebrowsed, the computed fields have to be re-evaluated Specification ============= - Introduce a new method '_convert'. This method takes 2 more parameters: 'company' and 'date'. - Deprecate 'compute' and '_compute'. Log a warning to notify that we should use '_convert'.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
0 files changed, 0 insertions, 0 deletions