Yardım

2

User Access Permissions

Avatar
Imantha Hashan

Hi All,

i'm new to odoo 10 and i want to know about how to make user group vise restrictions using recording rules and Access control List. please give me a guidance to do it. As an example i want to do is this .. i want to give permissions to one group to create sales orders and admin can only confirm sales orders. no other can't confirm the sales orders. Please help me to do this ASAP. Your help is highly appreciating..


Thank You....!

Avatar
Vazgeç
4 Yanıtlar
3
Avatar
deep
En iyi cevap

Check out the standard Odoo documentation for the same, you will understand the necessary rules & semantics for a start.

Security in Odoo8: https://www.odoo.com/documentation/8.0/reference/security.html 

Security in Odoo9: https://www.odoo.com/documentation/9.0/reference/security.html 


EDITED:

Refer this link, which explains with example

http://www.odoo.yenthevg.com/creating-security-groups-odoo/

2 Yorumlar
Avatar
Vazgeç
Avatar
Imantha Hashan
-

thanks for your answer.. do you have any tutorial guideline to do this as step by step...because this bit harder for me..if you have could you please send it..

Thank You....!

Avatar
deep
-

Have edited the above post, the below link as better step-by-step instructions. If you find it helpful, don't miss to accept my answer :) Thanks

5
Avatar
Hilar AK
En iyi cevap

HI Imantha,

just override the  action_confirm() function of sale and check the the uid == 1 , if uid confirm the order else raise the Usererror,

@api.multi
def action_confirm(self):
     if self._uid == 1:
        for order in self:
            order.state = 'sale'
            if self.env.context.get('send_email'):
                self.force_quotation_send()
            order.order_line._action_procurement_create()
            if not order.project_id:
                for line in order.order_line:
                    if line.product_id.invoice_policy == 'cost':
                        order._create_analytic_account()
                        break
        if self.env['ir.values'].get_default('sale.config.settings', 'auto_done_setting'):
            self.action_done()
     else:
         "generate your next process"

next case is you have to make the user access rights in user general settings where sale selection to proper neeeds.

Another option is you can hide the confirm button from quotation ,

<button name="action_confirm" states="draft" string="Confirm Sale" type="object" context="{'show_sale': True}"/>

use

attrs="{'invisible':[(uid, '!=', 1)]}"

Thanks

Avatar
Vazgeç
1
Avatar
Anjana Arora
En iyi cevap

Check this to know more:

https://www.odoo.com/forum/help-1/question/how-to-use-access-rights-and-record-rules-40960


you can check information of rule with web browser (Settings - Technical - Security - Record Rules) and filter with object product.product. http://thuynthi.webchuyennghiep.net/giai-phap-erp-cho-doanh-nghiep.html

Avatar
Vazgeç
0
Avatar
Sehrish
En iyi cevap

The most significant area in Odoo/OpenERP is how to deal or manage users. Managing users and assigning groups or role is the key point in every business. In Odoo/OpenERP assigning role or group to the single user is made through Administrator. And its not a good practice to do so using login through admin and do some setting stuff like assigning groups to employee or users.

Why we need role or groups?

The answer is you need to put everything significant to your business. As you have seen that their are couple of things in an ERP system which you don't want to show every user, most of your staff members needs to see only part of the given system. That's why we need groups or user role that will be assigned to each user. In Odoo/ERP the management of users is very flexible, and each user can belong to one or more groups.

To manage users and configure access rights you should start by defining the groups.

How to create / define groups: http://learnopenerp.blogspot.com/2018/01/groups-and-access-rights-in-odoo.html

1 Yorum
Avatar
Vazgeç