[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:

255e8ca3d9
7813a8e714
41fe7f9d11
2a5488619d

What 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:
Alexandre Kühn
2018-01-17 11:23:23 +01:00
parent a63f6092fc
commit 290e247e82
3 changed files with 2 additions and 10 deletions
@@ -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);