Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
16035 มุมมอง

I need to apply field level access right for a user in point of sale module. The main problem I face is the entire stuff is in Javascript and I need to manage user access inside the POS.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Hi,

OpenERP is providing access rights on object level. You can create groups and apply "groups" attribute in XML.

Email : info@acespritech.com
Skype : acespritech
Blog : acespritechblog.wordpress.com

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You can achieve this by adding the groups attribute in your field definition in the module: create your special group in your module

    <record id ="mygrou_id" model="res.groups">
       <field name="name">My special group</field>
     </record>

in view file add this group in your particular field

    <field name"myfield" groups="my_module.mygrou_id"/>

plz remember to add user for this group

Thanks
Sandeep

อวตาร
ละทิ้ง

This will only hide the field in that specific view. Meaning the field can still be viewed using XML-RPC or customized views. It only has cosmetic effects and not security.

This will hide field for other group how can I make that field read only for other group and write permission for other group

คำตอบที่ดีที่สุด

As of OpenERP 7.0, you can create field level access rights. You can achieve this by adding the groups attribute in your field definition in the module:

_columns = { 'secret_key': fields.char('Secret Key', groups="base.group_erp_manager,base.group_system") }

In your case, you will have to inherit the target class in the point_of_sale module

อวตาร
ละทิ้ง

However, I am facing another issue that is mentioned in this link http://help.openerp.com/question/9937/how-to-display-a-view-with-one-field-removed-for-certain-groups/

Related Posts ตอบกลับ มุมมอง กิจกรรม
Concatenate two fields in a third one แก้ไขแล้ว
2
ส.ค. 24
2403
1
พ.ย. 21
16352
2
ก.ย. 19
4593
0
ก.ค. 24
987
0
ม.ค. 24
1183