[11.0][web_widget_x2many_matrix] fix issue with limit of records#1014
Conversation
|
Thanks to @tonihr for proposing the fix! cc @agranadosb, @simahawk @pedrobaeza As you can see below, I can now generate huge many2many_matrix grids. |
|
Why a new file instead existing ones? |
|
Check syntax recommendations from https://travis-ci.org/OCA/web/jobs/413220985#L844 |
74f2201 to
c073710
Compare
|
@pedrobaeza We create a new file so it is easier to understand that we are changing a different class. |
|
I'm fine w/ the new file BTW :) |
c073710 to
c0eccf7
Compare
|
Let's not introduce new JS lint warnings: |
c0eccf7 to
1dc2d2e
Compare
|
@pedrobaeza I'm not sure where you found the warnings, but I attended them. |
|
You have introduced even more warnings. You can see them on https://travis-ci.org/OCA/web/jobs/423957411#L2131 |
1dc23c3 to
554d7b1
Compare
simahawk
left a comment
There was a problem hiding this comment.
@jbeficent can you get back to this? :)
|
@jbeficent I have faced this issue today. Are you going to finish this? |
|
@pedrobaeza let me finish it now |
69b8a97 to
86f7e77
Compare
86f7e77 to
38096cf
Compare
|
@tarteo @pedrobaeza I have no idea how to fix the lint errors. I have tried to fix, but I cannot resolve. Any idea? |
|
Try it like this: |
| @@ -0,0 +1,19 @@ | |||
| odoo.define( | |||
There was a problem hiding this comment.
Actually there's an exception on the line width for the odoo.define lines in the linter, just for the case you have at hand.
The best you can do here is to put just a single line:
odoo.define( "web_widget_x2many_2d_matrix.matrix_limit_extend", function (require) {Thanks to that exception, the linter should be OK.
| attrs.limit = Infinity; | ||
| } | ||
| }, | ||
| } |
0e32cce to
f230ffc
Compare
|
We're good to go |
|
There were a syntax error fixed here: 899f01f |
| attrs.limit = Infinity; | ||
| } | ||
| }, | ||
| }; |
There was a problem hiding this comment.
@jbeficent In Google Chrome this fails with an Uncaught SyntaxError: missing ) after argument list in line 15
Changing to below seems to work:
attrs.limit = Infinity;
}
},
});
}
);
But I'm no javascript expert!
|
@hhgabelgaard I have just written the same and fixed it on the fly. Just update... |
|
@pedrobaeza Thanks! |

Fixes #1012