覆盖odoo9中的js文件

时间:2017-04-21 08:40:23

标签: openerp override

在mail / static / src / js / thread.js中,我需要将 display_reply_icon:false 更改为 True

所以压倒JS对我来说有点困难,因为我真的很新,所以寻求帮助。

因为我的思维过程是我需要创建模型用Xpath找到这个js脚本然后用我自己的js文件覆盖。

init: function (parent, options) {
        this._super.apply(this, arguments);
        this.options = _.defaults(options || {}, {
            display_order: ORDER.ASC,
            display_needactions: true,
            display_stars: true,
            display_document_link: true,
            display_avatar: true,
            shorten_messages: true,
            squash_close_messages: true,
            display_reply_icon: false,
        });
        this.expanded_msg_ids = [];
        this.selected_id = null;
    },

1 个答案:

答案 0 :(得分:0)

你必须在其他js之后加载你的js然后覆盖init函数。 要覆盖函数,可以使用extends()方法。 https://www.odoo.com/documentation/9.0/reference/javascript.html