diff options
| author | David Monjoie <dmo@odoo.com> | 2017-07-18 11:33:09 +0200 |
|---|---|---|
| committer | David Monjoie <dmo@odoo.com> | 2017-07-18 15:59:48 +0200 |
| commit | efd158523438cebd96f9f2e7243873f222a97fea (patch) | |
| tree | 072aa9561443b1e5b578dc933b84d458d78ba11b /addons/web/static/src/js/views | |
| parent | 1ceb201d5e8221d5fb9e1059bede515a07c577c3 (diff) | |
[FIX] web: fix action context
Previously, we had to filter the context values to exclude some
erroneous values we propagated earlier.
This commit removes the earlier propagation of wrong values (the
current record context when executing an action) and thus also
removes the filtering of those values, which was actually removing
useful values from the action context.
The bug could be seen by following these steps:
- Install crm and sale
- Go to My Pipeline
- Open an opportunity which has a customer set
- Click on "New Quotation" action button
- See that the customer is not set on the new quotation, it should
be set by the default_partner_id value in the action context
Diffstat (limited to 'addons/web/static/src/js/views')
| -rw-r--r-- | addons/web/static/src/js/views/basic/basic_model.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_model.js b/addons/web/static/src/js/views/basic/basic_model.js index eead1b0aaed..75a0ad02971 100644 --- a/addons/web/static/src/js/views/basic/basic_model.js +++ b/addons/web/static/src/js/views/basic/basic_model.js @@ -2369,8 +2369,8 @@ var BasicModel = AbstractModel.extend({ * if given, this field's context is added to the context, instead of * the element's context (except if options.full is true) * @param {boolean} [options.full=false] - * if true and fieldName given in options, the element's context - * is added to the context + * if true or nor fieldName or additionalContext given in options, + * the element's context is added to the context * @returns {Object} the evaluated context */ _getContext: function (element, options) { @@ -2378,7 +2378,7 @@ var BasicModel = AbstractModel.extend({ var context = new Context(session.user_context); context.set_eval_context(this._getEvalContext(element)); - if (options.full || !options.fieldName) { + if (options.full || !(options.fieldName || options.additionalContext)) { context.add(element.context); } if (options.fieldName) { |
