Giving Employee usergroup access to custom module - Odoo - odoo

I have created a module named Purchases containing menu item: Purchasesand views: Received purchases, Pending purchases and want to give access to this module to only the Employees\Employee.
I have created a new user with email emp1#gmail.com from the Settings and added it to user group Employees\Employee. I have given the Employees\Employee group access rights to the Purchases, Received purchases and Pending purchases views.
When I log in as the employee emp1#gmail.com I still do not get the Menu Item Purchases. I only get the Settings and Discuss menu items.

I got it wrong. It seems that I should have added that model to the access rights first and give permission to view,read,write,delete. Thanks.

Related

Add employees as followers when sales quotations was confirmed

I created an automated_action, which should add specific employees as followers dynamically. The fields are already existent in the model. But my automated action doesnt work at atll, no new followers will be added :
record.message_subscribe(partner_ids=[record.x_studio_overall_lead.id, record.x_studio_technical_lead.id, record.x_studio_overall_deputy.id,record.x_studio_technical_deputy.id])
Added : If the customer is set those employees will be set in the sales order in a hidden page :
Via studio I created a new page in the form view of the sales quotations and related fields to the those employees which are set in the contacts addon. SO I dont understand why the automated action doesnt trigger anything, because I even dont have to access another model or to give a link to the fields.

Can users have their own product edit permissions in OpenCart?

I am completely new to OpenCart. I have created two users - user1 and user2 and both have the product add/edit permission. user1 add a product. But both user1 and user2 can edit the same product. What I am looking for is only user1 and superadmin can edit the product.
Likely if user2 adds another product then only superadmin and user2 can edit that product. Is it possible in OpenCart? If the situation is not possible in OpenCart, can anyone suggest an alternative to do the same?
Unfortunately, there is no such a thing in OC!
You have two options to accomplish that:
Find a plugin here that makes that (if any)
Code it manually
Step 1: you must keep track of the user who created the product, so you will need to add a new column to the <DB_PREFIX>_product table and save the id of the user who created the product in it, this is a simple step you will just need to modify the model function that saves the product details
Step 2: modify the get product model function and make it returns the id of the creator along with other data
Step 3: modify the edit product page controller index function in such a way that if the logged in user id does not equal the creator of the product, then display some error message

How to achieve item level permissions on list items

I have a requirement where I have 300 Agencies with multiple users and 5 Regions with multiple users and Admins. Multiple agencies report to one region.
When a user login as a agency user and creates a list item and on submission the item has to give permissions to all users related the users agency and the region agency belongs to. This is mapped using a reference list which agency belongs to a region.
Can permission for groups an item be set using SharePoint Designer workflows dynamically. I was able to get this working if I hardcore the group names in SP designer workflow I am not sure how to pass group names dynamically to workflow.
The SP groups and their users are already defined in SharePoint permissions.
I figured out solution using InfoPath and SP lists.
First I created a reference list called "Regions" and stopped inheritance on the list added SharePoint groups and users into the groups and on each list item gave list permissions to SP groups that have access to the list item.
In "Survey" list added lookup field from the "Regions" list now when the user adds new item he would see the region and agencies he belongs to.
On the "Survey" list I created folders for "Regions" and "Agencies" and set the folder level permissions similar to "Regions" list.

Ldap User - Group Sync

I'm using Sun Directory server v5.2.
I have three attributes: designation, role.
I am using a tool using which when i create a create/modify user entry with designation filled, a unique member is added to a group 'Members'.
Now, there are circumstances where
Scenario1:
* Creating/ Modifying user entry is not done via the tool and so unique member for this user entry is not added to the group 'Members'.
Scenario2:
* When user the designation attribute is deleted, group entry is not deleted.
This is causing inconsistency in the users and the group.
How can i resolve this?
Thanks,
Sash.

how create a rule for user can only see their own customers in openerp

I need to create a rule to a user can only see their own customers (SALES / CUSTOMERS in OpenERP menu), similar at rules "personal phone calls" or "personal initiative" in the "Sales / User: Own Leads Only".
I have resolved (partially) the problem with a duplicated group from SALES / USER: OWN LEADS ONLY group, and I have added a new rule based on "res_partner: access (read) on my partner" with the same DOMAIN and I have modified this rule to grant access to read, write, create and delete and now a user only can see his partners but now, when I try create a new partner, like a contact or company, I cant, because the system tell me access denied (document type: partner and action create). I dont know why can't create a new partner.
My version OpenERP is 7.0
Can anyone help me?
Thanks!
Mc
You need to use this domain in your new record rule:
['|',('user_id','=',False),('user_id','=',user.id)]
After setting this domain in your record rule, save it and again check your scenario.
By applying this domain, You will see your own customers as well as the customers, in which, there is no Salesperson defined. If possible, define salesperson for every customer so it will give you the exact result that you want.