summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2017-10-24 09:11:17 +0200
committerGéry Debongnie <ged@odoo.com>2017-10-24 15:38:55 +0200
commitd58d6e270f4106d717821438490f60bc4f71306e (patch)
treef858aa6ae82beaa70d2fb69f7561530336fa3846 /addons/web/static/src/js/fields/basic_fields.js
parenta0fad8ba6d7c42a627d654b00961bb3de2803ae3 (diff)
[FIX] web: propagate view context in all x2m operations
It could happen in some cases that a rpc coming from a view was not made with the context of the view (and from the action). For example, - enable "Lots & Serial Numbers" in the inventory settings - create a stockable product tracked by lot - go to the inventory dashboard, on the "receipts" card click on the three dots and then on "planned transfer" this link forces the context key "planned_transfer" in the action https://github.com/odoo/odoo/blob/11.0/addons/stock/views/stock_picking_views.xml#L725 - now add a stock move to move some quantity of the product you just created - see that no button appears on the one2many list - save - see that a button appears on the one2many list This is an issue because the read on the o2m at the end is made with the wrong context. The reason is that when we fetch x2m, we create a new datapoint of type 'list' which did not reuse the context of its parent.
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions