mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[FIX] web_widget_one2many_product_picker: Set product_id using the context
This commit is contained in:
@@ -249,23 +249,21 @@ odoo.define("web_widget_one2many_product_picker.One2ManyProductPickerRecord", fu
|
||||
var context = {};
|
||||
context["default_" + this.options.basicFieldParams.relation_field] =
|
||||
this.options.basicFieldParams.state.id || null;
|
||||
context["default_" + this.options.fieldMap.product] =
|
||||
this.recordSearch.id || null;
|
||||
return context;
|
||||
},
|
||||
|
||||
/**
|
||||
* Forced data used in virtual states.
|
||||
* Be careful with the onchanges sequence. Think as user interaction, not as CRUD operation.
|
||||
* Be careful with the onchanges sequence. Think as user interaction ("ADD", "DELETE", ... commands), not as CRUD operation.
|
||||
*
|
||||
* @private
|
||||
* @returns {Object}
|
||||
*/
|
||||
_getInternalVirtualRecordData: function () {
|
||||
var data = {};
|
||||
data[this.options.fieldMap.product] = {
|
||||
operation: 'ADD',
|
||||
id: this.recordSearch.id,
|
||||
};
|
||||
return data;
|
||||
_getInternalVirtualRecordData: function() {
|
||||
// To be overwritten
|
||||
return {};
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user