콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
7 답글
30503 화면

Hi,

I have created and added one menu item (i.e complaint) to maintenance module,this maintenance module is located in Administrator user.In this administrator user the maintenance module complaint menu item is working..If I create separate user for maintenance module then compalaint manu item is not showing..Here I am not getting any error...Here is the code


<record id="asset_complaint_tree" model="ir.ui.view">

            <field name="name">Asset Complaint</field>

            <field name="model">asset.complaint</field>

            <field name="type">tree</field>

            <field name="arch" type="xml">

                <tree string="Complaints">

                    <field name="asset_id"/>

                    <field name="product_id"/>

                    <field name="no_of_defected_products"/>

                    <field name="state"/>

                </tree>

            </field>

        </record>

  

  <record model="ir.actions.act_window" id="asset_complaint_action">

  <field name="name">Asset Complaint</field>

  <field name="res_model">asset.complaint</field>

  <field name="view_mode">tree,form</field>

  <field name="target">current</field>

  </record>

  

    

 <menuitem id="asset_complaint_menu" name="Complaints" action="asset_complaint_action" parent="asset.menu_maintenance_assets"/>

아바타
취소

Create Access Control List for the user from which you are testing.

Look how ACL works: https://goo.gl/4jAhtH

베스트 답변

Hi Naveen,

You have to give the access right to the menu and models. First you have to add a group to menu like this, group of the employee , you can change it accordingly

<menuitem id="asset_complaint_menu" 
name="Complaints" action="asset_complaint_action" 
parent="asset.menu_maintenance_assets" groups="base.group_user"/>

Then you have to add a csv like this,

id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink 
access_asset_complaint,access.asset.complaint,model_asset_complaint,base.group_user,1,1,1,1

Then this menu can be seen for the other users.

Thanks

아바타
취소
작성자

Thanks Raphy, In that code where I have to add the csv

You can add a folder named security, inside that create a file named "ir.model.access.csv" then add the csv inside it, then specify this in the openerp file like this,`" 'security/ir.model.access.csv',"

작성자

In that file I have this code: id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink

access_mrp_account_invoice_id,account.invoice,sale_stock.model_account_invoice,mrp.group_mrp_manager,1,0,0,0

작성자

I added groups to that code and already I have above ir.model.access.csv code. Even I am not able to see the menu item

Activate developer mode, then go settings -> Users -> open the respective user and check whether he is manager in the mrp, if not make him as the manager

베스트 답변

so for every new menuitem you add in odoo, you need to make a security file to declare, that all users can see that?

아바타
취소

Rather for every model that is connected to the menu action as far as I understand

관련 게시물 답글 화면 활동
1
12월 24
6085
3
8월 24
6929
4
7월 24
41253
5
4월 23
99050
3
11월 22
4350