Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2223 Lượt xem

If you delete partner from form view. you go actions> delete and then you get the message "Do you really want to delete this records?"

This is original method

on_button_delete: function() {
        var self = this;
        var def = $.Deferred();
        this.has_been_loaded.done(function() {
            if (self.datarecord.id && confirm(_t("Do you really want to delete this recordss?"))) {
                self.dataset.unlink([self.datarecord.id]).done(function() {
                    if (self.dataset.size()) {
                        self.execute_pager_action('next');
                    } else {
                        self.do_action('history_back');
                    }
                    def.resolve();
                });
            } else {
                $.async_when().done(function () {
                    def.reject();
                });
            }
        });
        return def.promise();

but if you add a contact to partner, when you want to delete it(it's in the bottom inside contact & addresses tab) there is no such message, so I want to make the same popup work when I delete a contact from a partner. But as have 0 knowledge in JS I need your help guys.

Ảnh đại diện
Huỷ bỏ

Can mention which Odoo version are you using?

Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 7 25
348
1
thg 7 25
5212
0
thg 7 25
734
0
thg 6 25
824
1
thg 6 25
987