Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
2873 Vizualizări

I have odoo 8 and i doing the migration to odoo 12 but.


I have a list of item in my tree view list, if I pick to see my list limit 1-200 then if I open 1 popup that i have in this view as soon as i close the popup my list is restored back to 1-40 and i have odoo 8 and if a close the popup the list remain with the same quantity per page

Imagine profil
Abandonează
Cel mai bun răspuns

Hello,
Try with the below code:odoo.define('my_module.tree_view', function (require) {
    "use strict";

    var ListView = require('web.ListView');
    var core = require('web.core');
    var _t = core._t;
    ListView.include({
        do_show: function () {
            var self = this;
            return this._super.apply(this, arguments).then(function () {
                self.$pager.find('.o_pager_limit').off('change.pager').on('change.pager', _.bind(self._onLimitChange, self));
            });
        },

        _onLimitChange: function (ev) {
            ev.preventDefault();
            this.limit = parseInt(ev.target.value, 10);
            this.reload();
        },
    });
});

Hope it helps

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
iul. 25
8045
2
ian. 25
7151
1
apr. 24
3060
1
dec. 23
5509
0
nov. 23
1700