Ir al contenido
Menú
Se marcó esta pregunta
2451 Vistas

Hello Guys ! please i need help ! how can i pass the search Panel in this action js . In XML we can do it with search_view_id params in action but with js how can i do it  ?? Thanks 


/** @odoo-module */
import { ListController } from "@web/views/list/list_controller";
import { registry } from '@web/core/registry';
import { listView } from '@web/views/list/list_view';



export class ProductListController extends ListController {
setup() {
super.setup();
}

redirect_to_product_pack() {
this.actionService.doAction({
type: 'ir.actions.act_window',
name: 'Forfaits',
res_model: 'product.template',
views: [[false, 'tree'], [false, 'form']],
domain: [['pack_ok', '=', true]],
target: 'current',
context: {
default_pack_ok: true,
default_pack_type: 'detailed',
default_pack_component_price: 'detailed',
default_pack_modifiable: false,
},
});
}

}

registry.category("views").add("button_in_tree1", {
...listView,
Controller: ProductListController,
buttonTemplate: "idpa_pack.ListButtons",
});

Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
1
abr 25
1384
Odoo App Resuelto
1
nov 23
1952
0
may 24
1684
0
sept 23
2639
0
sept 23
2249