Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

User Access Permissions

By
Imantha Hashan
on 11/8/16, 1:12 AM 158 views

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....!

1

deep

--deep--
1617
| 5 4 7
Bengaluru, India
--deep--

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

deep
On 11/8/16, 3:27 AM

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/

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....!

Imantha Hashan
on 11/8/16, 3:56 AM

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

deep
on 11/8/16, 4:00 AM
4

Hilar AK

--Hilar AK--
829
| 4 1 7
Italy
--Hilar AK--


Hilar AK
On 11/9/16, 4:06 AM

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

1
Anjana Arora
On 11/8/16, 5:32 AM

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

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 11/8/16, 1:12 AM
Seen: 158 times
Last updated: 11/9/16, 4:06 AM