Contributors mailing list archives


Re: Fixing Regression in Client

Open for Small Business, Graeme Gellatly
- 16/11/2016 01:27:17

Thanks Holger for resolving for me. Closed now.

On Tue, 15 Nov 2016 12:52 PM Graeme Gellatly <> wrote:
I'm not sure that is it Holger, but thank you for advice.  In this case buttons are absolutely a no go.

All I did as a test in frustration is revert line 473 of list_view.js such that it read (essentially reverting the commit identified in issue 3964

record.set(key, values[key], {silent: true});
// _.each(values, function (value, key) {
// if (fields[key] && fields[key].type === 'many2many')
// record.set(key + '__display', false, {silent: true});
// record.set(key, value, {silent: true});
and everything worked perfectly as expected.  So I guess my questions are now:

What exactly is this piece of code doing, i.e. how do they differ?
The commented code was introduced, so that m2m tags did not display upon deletion, is there another way of approaching this, such that the original issue is fixed without regression?

To me it looks like a simple oversight, the code looks roughly equivelant if we reduce it (assuming the if statement fails), but in the case of new records it is not displaying a value.

record.set(key, values[key], {silent: true});

.each(values, function (value, key) {

record.set(key, value, {silent: true});

On Tue, Nov 15, 2016 at 11:23 AM, Holger Brunn <> wrote:
> I'm not
> that strong on web client stuff, how to inherit, modify create widgets etc,
> but good enough that I can get started with some direction. Thanks in
> advance for any help.

the problem probably lies in the field's set_value and get_value functions, 
which only implement a subset of the available x2x commands:
I assume if you implement the missing commands, fix whatever weird problems 
this creates (I expect it will), you'll be fine.
But you should think quite hard if this is worth the trouble, and if you can't 
replace (on the UI part, not the data model) the fields by buttons. Then 
everything must be saved, but this should work with any version of odoo.

Therp - Maatwerk in open ontwikkeling

Holger Brunn - Ontwerp en implementatie


Post to: