答案 0 :(得分:3)
我希望你不介意低俗的黑客。
在表单视图中,您可以尝试此操作。您可能需要在缓存之前清除缓存。如果你不希望它出现,这只是明智的,但它不仅仅是外观和过程的安全性。您可能需要确保类选择器适合您的版本。
我通过将它放在xml中用于显示的表单视图进行测试,而不是在xml中为表单添加新的one2many记录。所以要明确这个css需要在弹出的窗体视图中并包含“Save& New”按钮。
<style>
.oe_abstractformpopup-form-save-new {
display:none !important;
}
</style>
答案 1 :(得分:1)
我知道有一个选项Script Version: Suite Script 2.0
User Event Script:
function beforeLoad(context) {
log.debug('Test', 'Before Load Event Initiated');
var frm = context.form;
frm.clientScriptFileId = 2250;
//Values from System/ScriptContext
var record = context.newRecord;
if (context.type == context.UserEventType.VIEW) {
frm.addButton({
id: 'custpage_cust_edit_btn',
label: 'Deactivate Record',
functionName: 'customRecordEditMode(' + record.id + ')'
});
}
}
Client Script:
function customRecordEditMode(recordID) {
debugger;
try {
window.location.href = "https://system.sandbox.netsuite.com/app/common/custom/custrecordentry.nl?rectype=194&id=" + recordID + "&e=T";
} catch (exception) {
alert("Error:", exception.message);
}
}
可以打开/关闭以显示/隐藏该按钮。我不知道它是否可以在视图/表单/字段的XML定义中使用,但如果不是这种情况,您可以尝试通过JS进行。
这是https://github.com/OCA/OCB/blob/9.0/addons/web/static/src/js/views/form_common.js#L854
的地方答案 2 :(得分:0)
尝试仅提供写入访问权限,删除相关表单对象的create访问权限。