[MERGE] forward port of branch 7.0 up to 419d934

This commit is contained in:
Christophe Simonis 2014-12-01 15:33:48 +01:00
commit e1e7dc0af9
2 changed files with 4 additions and 2 deletions

View File

@ -781,7 +781,7 @@
<group>
<field name="partner_id" on_change="onchange_partner_in(partner_id)"/>
<field name="backorder_id" readonly="1" attrs="{'invisible': [('backorder_id','=',False)]}"/>
<field name="invoice_state" string="Invoice Control" groups="account.group_account_invoice" attrs="{'invisible':[('invoice_state', '=', 'none')]}"/>
<field name="invoice_state" string="Invoice Control" groups="account.group_account_invoice"/>
<field name="stock_journal_id" widget="selection" groups="account.group_account_user"/>
</group>
<group>

View File

@ -533,6 +533,7 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
},
reload_record: function (record) {
var self = this;
var fields = this.fields_view.fields;
return this.dataset.read_ids(
[record.get('id')],
_.pluck(_(this.columns).filter(function (r) {
@ -546,7 +547,8 @@ instance.web.ListView = instance.web.View.extend( /** @lends instance.web.ListVi
return;
}
_.each(values, function (value, key) {
record.set(key + '__display', false, {silent: true});
if (fields[key] && fields[key].type === 'many2many')
record.set(key + '__display', false, {silent: true});
record.set(key, value, {silent: true});
});
record.trigger('change', record);