mirror of https://github.com/OCA/web.git
[FIX] web_widget_x2many_2d_matrix: make the possibility to have alternative values for headers of rows and columns working
parent
b917c99d46
commit
e9debedbd0
|
@ -220,7 +220,7 @@ odoo.define('web_widget_x2many_2d_matrix.X2Many2dMatrixRenderer', function (requ
|
||||||
*/
|
*/
|
||||||
_renderLabelCell: function (record) {
|
_renderLabelCell: function (record) {
|
||||||
var $td = $('<td>');
|
var $td = $('<td>');
|
||||||
var value = record.data[this.matrix_data.field_y_axis];
|
var value = record.data[this.matrix_data.field_label_y_axis];
|
||||||
if (value.type === 'record') {
|
if (value.type === 'record') {
|
||||||
// We have a related record
|
// We have a related record
|
||||||
value = value.data.display_name;
|
value = value.data.display_name;
|
||||||
|
|
|
@ -94,8 +94,8 @@ odoo.define('web_widget_x2many_2d_matrix.widget', function (require) {
|
||||||
this.x_axis = [];
|
this.x_axis = [];
|
||||||
this.y_axis = [];
|
this.y_axis = [];
|
||||||
_.each(records, function (record) {
|
_.each(records, function (record) {
|
||||||
var x = record.data[this.field_x_axis],
|
var x = record.data[this.field_label_x_axis],
|
||||||
y = record.data[this.field_y_axis];
|
y = record.data[this.field_label_y_axis];
|
||||||
if (x.type === 'record') {
|
if (x.type === 'record') {
|
||||||
// We have a related record
|
// We have a related record
|
||||||
x = x.data.display_name;
|
x = x.data.display_name;
|
||||||
|
@ -126,6 +126,8 @@ odoo.define('web_widget_x2many_2d_matrix.widget', function (require) {
|
||||||
'field_value': this.field_value,
|
'field_value': this.field_value,
|
||||||
'field_x_axis': this.field_x_axis,
|
'field_x_axis': this.field_x_axis,
|
||||||
'field_y_axis': this.field_y_axis,
|
'field_y_axis': this.field_y_axis,
|
||||||
|
'field_label_x_axis': this.field_label_x_axis,
|
||||||
|
'field_label_y_axis': this.field_label_y_axis,
|
||||||
'columns': this.columns,
|
'columns': this.columns,
|
||||||
'rows': this.rows,
|
'rows': this.rows,
|
||||||
'show_row_totals': this.show_row_totals,
|
'show_row_totals': this.show_row_totals,
|
||||||
|
|
Loading…
Reference in New Issue