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
b983ed65f9
commit
276259d0ee
|
@ -223,7 +223,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;
|
||||||
|
|
|
@ -88,8 +88,8 @@ odoo.define("web_widget_x2many_2d_matrix.widget", function (require) {
|
||||||
_.each(
|
_.each(
|
||||||
records,
|
records,
|
||||||
function (record) {
|
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;
|
||||||
|
@ -127,6 +127,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