如何在odoo pos中创建单击事件

xytpbqjk  于 2021-09-13  发布在  Java
关注(0)|答案(0)|浏览(153)

我从pos继承了客户按钮,如下所示:

odoo.define('as_pos_debt_notebook.pos', function (require) {
    "use strict";
    var screens = require('point_of_sale.screens');

    screens.ScreenWidget.include({

        show: function () {
            var self = this;
            this._super();
            this.$('.new-customer').click(function () {
                self.display_client_details('edit', {
                    'country_id': self.pos.company.country_id,
                })
            })
            $('.new-customer').click();
            console.log('Messi campeon')
        },
    });
});

但我的事件没有得到证实 $('.new-customer').click(); 不起作用。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题