[FIX] web: remove dead code
Cleaning dead code from these commits that have been reverted: 41fe7f9d1113d026b226b136b4477aaaf9f1f638#diff-54fd886cc58f994ad518ee72df4d3edeR50 2a5488619da22cfd901963dd141e722b195e82ab#diff-f96b339a9374f74489f1f98755e9787bL9253 41fe7f9d1113d026b226b136b4477aaaf9f1f638#diff-86d6d41b5bb7499bf055258d05549d59R3111 With these final changes, we hope to stop the many issues that have occured with binary fields, from these commits:255e8ca3d97813a8e71441fe7f9d112a5488619dWhat remains is the format of binary fields in list views without widgets, which shows the bin_size instead of the base64 string representation... ... Rest assured, the computation is in JS, so there are no 'bin_size' shenaningans!
This commit is contained in:
@@ -44,11 +44,6 @@ var AbstractField = Widget.extend({
|
||||
navigation_move: '_onNavigationMove',
|
||||
},
|
||||
|
||||
/**
|
||||
* fields can extend the context, e.g. binary fields add {bin_size: true}
|
||||
*/
|
||||
context: null,
|
||||
|
||||
/**
|
||||
* An object representing fields to be fetched by the model eventhough not present in the view
|
||||
* This object contains "field name" as key and an object as value.
|
||||
|
||||
@@ -3092,16 +3092,13 @@ var BasicModel = AbstractModel.extend({
|
||||
id: {type: 'integer'},
|
||||
}, params.fields);
|
||||
|
||||
// datapoint context is extended by fields widgets
|
||||
var context = _.extend({}, params.context);
|
||||
|
||||
var dataPoint = {
|
||||
_cache: type === 'list' ? {} : undefined,
|
||||
_changes: null,
|
||||
_domains: {},
|
||||
_rawChanges: {},
|
||||
aggregateValues: params.aggregateValues || {},
|
||||
context: context,
|
||||
context: params.context,
|
||||
count: params.count || res_ids.length,
|
||||
data: data,
|
||||
domain: params.domain || [],
|
||||
|
||||
@@ -9251,7 +9251,7 @@ QUnit.module('relational_fields', {
|
||||
'</tree>',
|
||||
mockRPC: function (route, args) {
|
||||
if (args.method === 'read' && args.model === 'partner_type') {
|
||||
assert.deepEqual(args.kwargs.context.take, 'five',
|
||||
assert.deepEqual(args.kwargs.context, {take: 'five'},
|
||||
'The context should be passed to the RPC');
|
||||
}
|
||||
return this._super.apply(this, arguments);
|
||||
|
||||
Reference in New Issue
Block a user