-3
odooの特定のグループとモデル/オブジェクトのフォームビューで「添付ファイル」メニューを非表示にしたいのですが、どうすればいいですか?どのようにOdooの特定のモデルとグループの "添付ファイル"メニューを非表示にするには?
odooの特定のグループとモデル/オブジェクトのフォームビューで「添付ファイル」メニューを非表示にしたいのですが、どうすればいいですか?どのようにOdooの特定のモデルとグループの "添付ファイル"メニューを非表示にするには?
私がhideの添付ファイルメニューについての考えを持っていないが、これは、コードのJSを経由して接続する制限することができます:
odoo.define('module_name', function(require) {
"use strict";
var core = require('web.core');
var data = require('web.data');
var framework = require('web.framework');
var sideWidget = require('web.Sidebar');
var Model = require('web.Model');
var Dialog = require('web.Dialog');
var _t = core._t;
var QWeb = core.qweb;
var sidebar = sideWidget.include({
redraw: function() {
var self = this;
this._super.apply(this, arguments);
if (this.getParent()) {
var view = this.getParent();
if (this.getParent().dataset.model != "there which model you do not want attach files") {
this.$('.o_sidebar_add_attachment .o_form_binary_form').change(this.on_attachment_changed);
}
}
},
});
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<template id="assets_backend_niwe" name="alfresco_odoo assets" inherit_id="web.assets_backend">
<xpath expr="." position="inside">
<script type="text/javascript" src="file location"/>
</xpath>
</template>
</data>
</odoo>
それを別のファイルを保存し、これは資産のバックエンドにそれを提出JS追加します。