Creating New Groups in Odoo

I created new groups that represent a staff group, but in the View metadata the new group that I created does not have an XML identifier, where I can find an XML identifier or add an XML identifier for new groups, even in the external ID menu I I can find the identifier.

+7
openerp odoo odoo-8 openerp-8
source share
3 answers

If you manually created the group from the user interface, it will not display the xml identifier because the record is not created by the xml record. if the record is created with demo data (xml), it will display the XML identifier of the record

eg,

<record id="user_group_id" model="res.groups"> <field name="name">User Group</field> <field name="category_id" ref="base.module_category_sales_management"/> </record> 

Here user_group_id is your xml id. The entire xml identifier is stored in the table ir_model_data or "ir.model.data".

You can find it in Settings> Technical> Sequences and Identifiers> External Identifiers

hope this helps.

+4
source share

enter image description here

How to create or edit custom groups:

  • go to Settings-> Users-> Groups
  • select the group "User user groups / ..." or create a new one and set the value "User user groups" to the field "Application"
  • click edit
  • add or remove inherited groups on the Inherited tab
  • click save

How to apply groups for some users:

  • go to Settings-> Users-> Users
  • select the user you need.
  • click "Remove Permissions"
  • select access groups. Basically, you only need to use those from the "User User Groups" sector, because all the inherited flags will be checked automatically after you click "Save."
  • click save

Please note that if you delete a technical group from a custom group, you need to repeat the process of applying groups for each associated user. If you do not repeat the application process, the remote group will be stored by related users, because there is no way to find out whether this inheritance is added or manually as additional access to this user.

I managed to do this with a few hours of searching in XML files:

This is an example of creating a security group.

security / ng_office_technology_security:

 <?xml version="1.0" encoding="utf-8"?> <openerp> <data noupdate="0"> <record id="office_technology_group" model="res.groups"> <field name="name">Office technology</field> <field name="comment">Office Technology Permission Group.</field> <field name="category_id" ref="ng_office_technology.module_category_ng_office_technology"/> </record> <record model="ir.module.category" id="module_category_ng_office_technology"> <field name="name">Office Technology</field> <field name="description">The Office technology Applilcation</field> <field name="sequence">20</field> </record> </data> </openerp> 
+3
source share

1. Go to settings> Users> Groups>
2. Find your group
3.Edit and go to the "Views" tab.
4.If you have defined a view, you will find it here along with the external ID
otherwise, you can add a new one from existing views.

Turn on developer mode from "About Odoo" under your profile if you need to.

0
source share

All Articles