-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[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. |
web_widget_x2many_2d_matrix/static/src/js/abstract_view_matrix_limit_extend.js
Outdated
Show resolved
Hide resolved
web_widget_x2many_2d_matrix/static/src/js/abstract_view_matrix_limit_extend.js
Outdated
Show resolved
Hide resolved
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. |
web_widget_x2many_2d_matrix/static/src/js/abstract_view_matrix_limit_extend.js
Outdated
Show resolved
Hide resolved
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 |
web_widget_x2many_2d_matrix/static/src/js/abstract_view_matrix_limit_extend.js
Outdated
Show resolved
Hide resolved
web_widget_x2many_2d_matrix/static/src/js/abstract_view_matrix_limit_extend.js
Outdated
Show resolved
Hide resolved
web_widget_x2many_2d_matrix/static/src/js/abstract_view_matrix_limit_extend.js
Outdated
Show resolved
Hide resolved
1dc23c3
to
554d7b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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; | ||
} | ||
}, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're missing here );
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@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