跳至内容
菜单
此问题已终结
3365 查看

I'd like very much to be able to use the "Delete Dialog Box" module in v8

https://www.odoo.com/apps/modules/10.0/odoo_deletedialog/

However, since the way JavaScript works is different, installing v10's module in v8 won't work.

Is there anyone out there that knows how to adapt the following piece of code into v8's syntax?


odoo.define('navabrind_extra.extra_dialog_view', function(require) {

"use strict";

var ListRenderer = require('web.ListRenderer');

ListRenderer.include({

        _onTrashIconClick: function (event) {

               event.stopPropagation();

               var result = confirm("Are you sure you want to delete this record?");

               if (result){

                        var id = $(event.target).closest('tr').data('id');

                        this.trigger_up('list_record_delete', {id: id});

               }

        }

});

});

形象
丢弃
相关帖文 回复 查看 活动
0
8月 20
3075
0
9月 17
4166
2
11月 15
669
1
2月 24
11947
0
3月 15
304