Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged

i'am new at odoo and i'm asking for help

how to make a new security role for cashier all i need to him is open a POS session and close it, nothing else.

how that can be done ?

Avatar
Opusti
Best Answer

Hi mohamed fouad,

Example code for creating groups in pos (in XML file)

<record id="group_pos_user" model="res.groups">

   <field name="name">User</field>

   <field name="category_id" ref="base.module_category_sales_point_of_sale"/>

</record>

<record id="group_pos_manager" model="res.groups">

   <field name="name">Administrator</field>

   <field name="category_id" ref="base.module_category_sales_point_of_sale"/>

   <field name="implied_ids" eval="[(4, ref('group_pos_user')), (4, ref('stock.group_stock_user'))]"/>

   <field name="users" eval="[(4, ref('base.user_root')), (4, ref('base.user_admin'))]"/>

</record>

We can see the created groups from settings > Users & companies >Groups

Example code for access rights in pos (in CSV file)

Id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
Access_pos_order_line,pos.order.line,model_pos_order_line,group_pos_user,1,1,1,1
access_account_payment_method_pos_user,account.payment.method pos_user,account.model_account_payment_method,group_pos_manager,1,0,0,0

To know more about security and security groups you can refer our following blogs
https://www.cybrosys.com/blog/security-in-odoo

https://www.cybrosys.com/blog/how-to-create-security-group-odoo-13

Regards

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
0
jul. 25
1117
1
jan. 17
3686
1
dec. 23
2867
2
dec. 17
4040
1
nov. 24
2114