Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
2189 Weergaven

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.

Avatar
Annuleer

Can mention which Odoo version are you using?

Gerelateerde posts Antwoorden Weergaven Activiteit
0
jul. 25
320
1
jul. 25
5118
0
jul. 25
681
0
jun. 25
737
1
jun. 25
909