mirror of https://github.com/OCA/web.git
web_widget_x2many_matrix: fix issue with limit of records
parent
edeea57e29
commit
5dccd038ce
|
@ -4,7 +4,7 @@
|
||||||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
|
||||||
{
|
{
|
||||||
"name": "2D matrix for x2many fields",
|
"name": "2D matrix for x2many fields",
|
||||||
"version": "11.0.1.1.0",
|
"version": "11.0.1.1.1",
|
||||||
"author": "Therp BV, "
|
"author": "Therp BV, "
|
||||||
"Tecnativa, "
|
"Tecnativa, "
|
||||||
"Camptocamp, "
|
"Camptocamp, "
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
odoo.define( "web_widget_x2many_2d_matrix.matrix_limit_extend", function (require) {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
var AbstractView = require("web.AbstractView");
|
||||||
|
|
||||||
|
AbstractView.include({
|
||||||
|
// We extend this method so that the view is not limited to
|
||||||
|
// just 40 cells when the 'x2many_2d_matrix' widget is used.
|
||||||
|
_setSubViewLimit: function (attrs) {
|
||||||
|
this._super(attrs);
|
||||||
|
if (attrs.widget === "x2many_2d_matrix") {
|
||||||
|
attrs.limit = Infinity;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
|
@ -5,6 +5,7 @@
|
||||||
<xpath expr="." position="inside">
|
<xpath expr="." position="inside">
|
||||||
<script type="text/javascript" src="/web_widget_x2many_2d_matrix/static/src/js/2d_matrix_renderer.js" />
|
<script type="text/javascript" src="/web_widget_x2many_2d_matrix/static/src/js/2d_matrix_renderer.js" />
|
||||||
<script type="text/javascript" src="/web_widget_x2many_2d_matrix/static/src/js/widget_x2many_2d_matrix.js" />
|
<script type="text/javascript" src="/web_widget_x2many_2d_matrix/static/src/js/widget_x2many_2d_matrix.js" />
|
||||||
|
<script type="text/javascript" src="/web_widget_x2many_2d_matrix/static/src/js/abstract_view_matrix_limit_extend.js" />
|
||||||
<link rel="stylesheet" href="/web_widget_x2many_2d_matrix/static/src/css/web_widget_x2many_2d_matrix.css"/>
|
<link rel="stylesheet" href="/web_widget_x2many_2d_matrix/static/src/css/web_widget_x2many_2d_matrix.css"/>
|
||||||
</xpath>
|
</xpath>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue