Odoo11 EE如何去掉签名广告
Odoo11 EE How removing signature advertisement
我正在尝试继承 website_sign.thank_you_dialog 但这没有 ID。我想删除完成签名时弹出的广告。
Odoo 11 企业版
/static/src/js/remove_ad_signature.js
odoo.define('my_module.signature_request_template', function(require) {
'use strict'
var ajax = require("web.ajax");
var core = require("web.core");
var qweb = core.qweb;
var document_signing = require("website_sign.document_signing");
ajax.loadXML("/my_module/static/src/xml/remove_ad_signature.xml", qweb).then(function () {
document_signing.initDocumentToSign();
});
})
/static/src/xml/remove_ad_signature.xml
<?xml version="1.0" encoding="UTF-8"?>
<templates id="remove_ad_signature" xml:space="preserve">
<t t-extend="website_sign.thank_you_dialog">
<t t-jquery="div.o_promote_esign" t-operation="replace">
<div class="o_promote_esign">
<div>AAAAAAAAAAAAA</div>
</div>
</t>
</t>
</templates>
我在模态上看到 AAAAAA 但 return 这个错误 抱歉,发生错误,请尝试重新填写文档。
自己解决
添加 static/src/js/remove_signature_ad.js
odoo.define("agreements_esign.remove_signature_ad_button", function (require) {
"use strict"
var core = require("web.core")
var document_signing = require("website_sign.document_signing")
var _t = core._t
var NoPubThankYouDialog = document_signing.ThankYouDialog.extend({
template: "website_sign.no_pub_thank_you_dialog",
init: function (parent, options) {
options = options || {}
if (!options.buttons) {
options.buttons = [{ text: _t("Close"), close: true }]
}
this._super(parent, options)
}
})
document_signing.SignableDocument.include({
get_thankyoudialog_class: function () {
return NoPubThankYouDialog
},
})
})
现在我看到了这个
我正在尝试继承 website_sign.thank_you_dialog 但这没有 ID。我想删除完成签名时弹出的广告。
Odoo 11 企业版
/static/src/js/remove_ad_signature.js
odoo.define('my_module.signature_request_template', function(require) {
'use strict'
var ajax = require("web.ajax");
var core = require("web.core");
var qweb = core.qweb;
var document_signing = require("website_sign.document_signing");
ajax.loadXML("/my_module/static/src/xml/remove_ad_signature.xml", qweb).then(function () {
document_signing.initDocumentToSign();
});
})
/static/src/xml/remove_ad_signature.xml
<?xml version="1.0" encoding="UTF-8"?>
<templates id="remove_ad_signature" xml:space="preserve">
<t t-extend="website_sign.thank_you_dialog">
<t t-jquery="div.o_promote_esign" t-operation="replace">
<div class="o_promote_esign">
<div>AAAAAAAAAAAAA</div>
</div>
</t>
</t>
</templates>
我在模态上看到 AAAAAA 但 return 这个错误 抱歉,发生错误,请尝试重新填写文档。
自己解决 添加 static/src/js/remove_signature_ad.js
odoo.define("agreements_esign.remove_signature_ad_button", function (require) {
"use strict"
var core = require("web.core")
var document_signing = require("website_sign.document_signing")
var _t = core._t
var NoPubThankYouDialog = document_signing.ThankYouDialog.extend({
template: "website_sign.no_pub_thank_you_dialog",
init: function (parent, options) {
options = options || {}
if (!options.buttons) {
options.buttons = [{ text: _t("Close"), close: true }]
}
this._super(parent, options)
}
})
document_signing.SignableDocument.include({
get_thankyoudialog_class: function () {
return NoPubThankYouDialog
},
})
})
现在我看到了这个