[ADD]GOLEM Security access everywhere

This commit is contained in:
Fabien Bourgeois 2016-07-21 16:45:54 +02:00
parent 46403e0201
commit 1a3c1f0050
19 changed files with 117 additions and 41 deletions

View File

@ -1,3 +1,5 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_golem_activity_session_user,Access GOLEM Activity Session User,model_golem_activity_session,golem_base.group_golem_user,1,1,1,1 access_golem_activity_session_user,Access GOLEM Activity Session User,model_golem_activity_session,golem_base.group_golem_user,1,1,1,1
access_golem_activity_session_manager,Access GOLEM Activity Session Manager,model_golem_activity_session,golem_base.group_golem_manager,1,1,1,1 access_golem_product_template_user,Access GOLEM Product Template User,model_product_template,golem_base.group_golem_user,1,1,1,1
access_golem_product_product_user,Access GOLEM Product Product User,product.model_product_product,golem_base.group_golem_user,1,1,1,1
access_golem_product_pricehist_user,Access GOLEM Product Price History User,product.model_product_price_history,golem_base.group_golem_user,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_golem_activity_session_user Access GOLEM Activity Session User model_golem_activity_session golem_base.group_golem_user 1 1 1 1
3 access_golem_activity_session_manager access_golem_product_template_user Access GOLEM Activity Session Manager Access GOLEM Product Template User model_golem_activity_session model_product_template golem_base.group_golem_manager golem_base.group_golem_user 1 1 1 1
4 access_golem_product_product_user Access GOLEM Product Product User product.model_product_product golem_base.group_golem_user 1 1 1 1
5 access_golem_product_pricehist_user Access GOLEM Product Price History User product.model_product_price_history golem_base.group_golem_user 1 1 1 1

28
golem_base/i18n/fr.po Normal file
View File

@ -0,0 +1,28 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * golem_base
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-07-21 13:17+0000\n"
"PO-Revision-Date: 2016-07-21 13:17+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#. module: golem_base
#: model:res.groups,name:golem_base.group_golem_manager
msgid "GOLEM Manager"
msgstr "Administrateur"
#. module: golem_base
#: model:res.groups,name:golem_base.group_golem_user
msgid "GOLEM user"
msgstr "Utilisateur"

View File

@ -0,0 +1,27 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * golem_base
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 8.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-07-21 13:17+0000\n"
"PO-Revision-Date: 2016-07-21 13:17+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: golem_base
#: model:res.groups,name:golem_base.group_golem_manager
msgid "GOLEM Manager"
msgstr ""
#. module: golem_base
#: model:res.groups,name:golem_base.group_golem_user
msgid "GOLEM user"
msgstr ""

View File

@ -25,7 +25,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="category_id" <field name="category_id"
ref="base.module_category_golem"/> ref="base.module_category_golem"/>
<field name="implied_ids" <field name="implied_ids"
eval="[(4, ref('base.group_user'))]"/> eval="[(4,
[ref('base.group_user'), ref('account.group_account_invoice')])]"/>
</record> </record>
<record id="group_golem_manager" model="res.groups"> <record id="group_golem_manager" model="res.groups">
<field name="name">GOLEM Manager</field> <field name="name">GOLEM Manager</field>

View File

@ -26,7 +26,6 @@
'application': False, 'application': False,
'installable': True, 'installable': True,
'depends': ['golem_member'], 'depends': ['golem_member'],
'data': ['views/golem_family_view.xml', 'data': ['security/ir.model.access.csv', 'views/golem_family_view.xml',
'views/golem_member_view.xml', 'views/golem_member_view.xml', 'views/res_partner_view.xml']
'views/res_partner_view.xml']
} }

View File

@ -60,13 +60,13 @@ msgstr "Pays"
#. module: golem_family #. module: golem_family
#: field:golem.family,create_uid:0 #: field:golem.family,create_uid:0
#: field:golem.member.family.role,create_uid:0 #: field:golem.family.role,create_uid:0
msgid "Created by" msgid "Created by"
msgstr "Créé par" msgstr "Créé par"
#. module: golem_family #. module: golem_family
#: field:golem.family,create_date:0 #: field:golem.family,create_date:0
#: field:golem.member.family.role,create_date:0 #: field:golem.family.role,create_date:0
msgid "Created on" msgid "Created on"
msgstr "Créé le" msgstr "Créé le"
@ -77,7 +77,7 @@ msgstr "Date du dernier message posté sur l'enregistrement."
#. module: golem_family #. module: golem_family
#: field:golem.family,display_name:0 #: field:golem.family,display_name:0
#: field:golem.member.family.role,display_name:0 #: field:golem.family.role,display_name:0
msgid "Display Name" msgid "Display Name"
msgstr "Nom affiché" msgstr "Nom affiché"
@ -122,7 +122,7 @@ msgid "Family members"
msgstr "Membres de la famille" msgstr "Membres de la famille"
#. module: golem_family #. module: golem_family
#: sql_constraint:golem.member.family.role:0 #: sql_constraint:golem.family.role:0
msgid "Family role must be unique." msgid "Family role must be unique."
msgstr "Les rôles familiaux doivent être uniques." msgstr "Les rôles familiaux doivent être uniques."
@ -152,7 +152,7 @@ msgid "GOLEM Member"
msgstr "GOLEM : Adhérent" msgstr "GOLEM : Adhérent"
#. module: golem_family #. module: golem_family
#: model:ir.model,name:golem_family.model_golem_member_family_role #: model:ir.model,name:golem_family.model_golem_family_role
msgid "GOLEM Member Family Role" msgid "GOLEM Member Family Role"
msgstr "GOLEM : rôle du membre de la famille" msgstr "GOLEM : rôle du membre de la famille"
@ -168,7 +168,7 @@ msgstr "Contient le résumé des discussions (nombre de message...). Ce résumé
#. module: golem_family #. module: golem_family
#: field:golem.family,id:0 #: field:golem.family,id:0
#: field:golem.member.family.role,id:0 #: field:golem.family.role,id:0
msgid "ID" msgid "ID"
msgstr "ID" msgstr "ID"
@ -189,19 +189,19 @@ msgstr "Last Message Date"
#. module: golem_family #. module: golem_family
#: field:golem.family,__last_update:0 #: field:golem.family,__last_update:0
#: field:golem.member.family.role,__last_update:0 #: field:golem.family.role,__last_update:0
msgid "Last Modified on" msgid "Last Modified on"
msgstr "Dernière modification le" msgstr "Dernière modification le"
#. module: golem_family #. module: golem_family
#: field:golem.family,write_uid:0 #: field:golem.family,write_uid:0
#: field:golem.member.family.role,write_uid:0 #: field:golem.family.role,write_uid:0
msgid "Last Updated by" msgid "Last Updated by"
msgstr "Dernière modification par" msgstr "Dernière modification par"
#. module: golem_family #. module: golem_family
#: field:golem.family,write_date:0 #: field:golem.family,write_date:0
#: field:golem.member.family.role,write_date:0 #: field:golem.family.role,write_date:0
msgid "Last Updated on" msgid "Last Updated on"
msgstr "Dernière modification le" msgstr "Dernière modification le"
@ -258,7 +258,7 @@ msgstr "Rédigez une note interne..."
#. module: golem_family #. module: golem_family
#: field:golem.member,family_role:0 #: field:golem.member,family_role:0
#: field:golem.member.family.role,name:0 #: field:golem.family.role,name:0
#: field:res.partner,family_role:0 #: field:res.partner,family_role:0
msgid "Role" msgid "Role"
msgstr "Rôle" msgstr "Rôle"

View File

@ -59,13 +59,13 @@ msgstr ""
#. module: golem_family #. module: golem_family
#: field:golem.family,create_uid:0 #: field:golem.family,create_uid:0
#: field:golem.member.family.role,create_uid:0 #: field:golem.family.role,create_uid:0
msgid "Created by" msgid "Created by"
msgstr "" msgstr ""
#. module: golem_family #. module: golem_family
#: field:golem.family,create_date:0 #: field:golem.family,create_date:0
#: field:golem.member.family.role,create_date:0 #: field:golem.family.role,create_date:0
msgid "Created on" msgid "Created on"
msgstr "" msgstr ""
@ -76,7 +76,7 @@ msgstr ""
#. module: golem_family #. module: golem_family
#: field:golem.family,display_name:0 #: field:golem.family,display_name:0
#: field:golem.member.family.role,display_name:0 #: field:golem.family.role,display_name:0
msgid "Display Name" msgid "Display Name"
msgstr "" msgstr ""
@ -121,7 +121,7 @@ msgid "Family members"
msgstr "" msgstr ""
#. module: golem_family #. module: golem_family
#: sql_constraint:golem.member.family.role:0 #: sql_constraint:golem.family.role:0
msgid "Family role must be unique." msgid "Family role must be unique."
msgstr "" msgstr ""
@ -151,7 +151,7 @@ msgid "GOLEM Member"
msgstr "" msgstr ""
#. module: golem_family #. module: golem_family
#: model:ir.model,name:golem_family.model_golem_member_family_role #: model:ir.model,name:golem_family.model_golem_family_role
msgid "GOLEM Member Family Role" msgid "GOLEM Member Family Role"
msgstr "" msgstr ""
@ -167,7 +167,7 @@ msgstr ""
#. module: golem_family #. module: golem_family
#: field:golem.family,id:0 #: field:golem.family,id:0
#: field:golem.member.family.role,id:0 #: field:golem.family.role,id:0
msgid "ID" msgid "ID"
msgstr "" msgstr ""
@ -188,19 +188,19 @@ msgstr ""
#. module: golem_family #. module: golem_family
#: field:golem.family,__last_update:0 #: field:golem.family,__last_update:0
#: field:golem.member.family.role,__last_update:0 #: field:golem.family.role,__last_update:0
msgid "Last Modified on" msgid "Last Modified on"
msgstr "" msgstr ""
#. module: golem_family #. module: golem_family
#: field:golem.family,write_uid:0 #: field:golem.family,write_uid:0
#: field:golem.member.family.role,write_uid:0 #: field:golem.family.role,write_uid:0
msgid "Last Updated by" msgid "Last Updated by"
msgstr "" msgstr ""
#. module: golem_family #. module: golem_family
#: field:golem.family,write_date:0 #: field:golem.family,write_date:0
#: field:golem.member.family.role,write_date:0 #: field:golem.family.role,write_date:0
msgid "Last Updated on" msgid "Last Updated on"
msgstr "" msgstr ""
@ -257,7 +257,7 @@ msgstr ""
#. module: golem_family #. module: golem_family
#: field:golem.member,family_role:0 #: field:golem.member,family_role:0
#: field:golem.member.family.role,name:0 #: field:golem.family.role,name:0
#: field:res.partner,family_role:0 #: field:res.partner,family_role:0
msgid "Role" msgid "Role"
msgstr "" msgstr ""

View File

@ -23,8 +23,8 @@ class ResPartner(models.Model):
_description = 'GOLEM Partner Family' _description = 'GOLEM Partner Family'
family_id = fields.Many2one('golem.family', string='Family', index=True) family_id = fields.Many2one('golem.family', string='Family', index=True)
family_role = fields.Many2one('golem.member.family.role', family_role = fields.Many2one('golem.family.role', string='Role',
string='Role', index=True) index=True)
family_count = fields.Integer('Family Count', related='family_id.count') family_count = fields.Integer('Family Count', related='family_id.count')
@api.multi @api.multi
@ -93,9 +93,9 @@ class GolemFamily(models.Model):
class GolemFamilyRole(models.Model): class GolemFamilyRole(models.Model):
_name = 'golem.member.family.role' _name = 'golem.family.role'
_description = 'GOLEM Member Family Role' _description = 'GOLEM Family Role'
_sql_constraints = [('golem_member_family_role_name_uniq', _sql_constraints = [('golem_family_role_name_uniq',
'UNIQUE (name)', 'UNIQUE (name)',
'Family role must be unique.')] 'Family role must be unique.')]

View File

@ -0,0 +1,4 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_golem_family_user,Access GOLEM Family User,model_golem_family,golem_base.group_golem_user,1,1,1,1
access_golem_family_role_user,Access GOLEM Family Role User,model_golem_family_role,golem_base.group_golem_user,1,0,0,0
access_golem_family_role_manager,Access GOLEM Family Role Manager,model_golem_family_role,golem_base.group_golem_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_golem_family_user Access GOLEM Family User model_golem_family golem_base.group_golem_user 1 1 1 1
3 access_golem_family_role_user Access GOLEM Family Role User model_golem_family_role golem_base.group_golem_user 1 0 0 0
4 access_golem_family_role_manager Access GOLEM Family Role Manager model_golem_family_role golem_base.group_golem_manager 1 1 1 1

View File

@ -105,7 +105,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</record> </record>
<record id="family_role_tree" model="ir.ui.view"> <record id="family_role_tree" model="ir.ui.view">
<field name="name">Family Role List</field> <field name="name">Family Role List</field>
<field name="model">golem.member.family.role</field> <field name="model">golem.family.role</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree editable="top"> <tree editable="top">
<field name="name" /> <field name="name" />
@ -137,14 +137,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<act_window id="family_action_list" name="GOLEM Family List" <act_window id="family_action_list" name="GOLEM Family List"
res_model="golem.family" view_mode="tree,form" /> res_model="golem.family" view_mode="tree,form" />
<act_window id="family_role_action" name="GOLEM Family Role List" <act_window id="family_role_action" name="GOLEM Family Role List"
res_model="golem.member.family.role" view_mode="tree" /> res_model="golem.family.role" view_mode="tree" />
<!-- Menus --> <!-- Menus -->
<menuitem id="family_menu_list" name="Families" <menuitem id="family_menu_list" name="Families"
parent="membership.menu_membership" action="family_action_list" parent="membership.menu_membership" action="family_action_list"
sequence="10" /> sequence="10" groups="golem_base.group_golem_user" />
<menuitem id="family_role_menu_list" name="Family Roles" <menuitem id="family_role_menu_list" name="Family Roles"
parent="base.menu_marketing_config_association" parent="base.menu_marketing_config_association"
action="family_role_action" sequence="3" /> action="family_role_action" sequence="3"
groups="golem_base.group_golem_manager" />
</data> </data>
</openerp> </openerp>

View File

@ -28,5 +28,5 @@
'depends': ['golem_base', 'golem_activity', 'golem_season'], 'depends': ['golem_base', 'golem_activity', 'golem_season'],
'data': ['views/golem_member_view.xml', 'views/members_menu.xml', 'data': ['views/golem_member_view.xml', 'views/members_menu.xml',
'views/res_partner_view.xml', 'views/number_config.xml', 'views/res_partner_view.xml', 'views/number_config.xml',
'data/number_config.xml'] 'data/number_config.xml', 'security/ir.model.access.csv']
} }

View File

@ -141,7 +141,7 @@ class GolemMember(models.Model):
self.is_number_manual = is_num_man self.is_number_manual = is_num_man
class GolemMemberSeason(models.Model): class GolemMemberNumber(models.Model):
""" GOLEM Member Numbers """ """ GOLEM Member Numbers """
_name = 'golem.member.number' _name = 'golem.member.number'
_description = 'GOLEM Member Numbers' _description = 'GOLEM Member Numbers'

View File

@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_golem_member_user,Access GOLEM Member User,model_golem_member,golem_base.group_golem_user,1,1,1,1
access_golem_member_season_user,Access GOLEM Member Season User,model_golem_member_number,golem_base.group_golem_user,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_golem_member_user Access GOLEM Member User model_golem_member golem_base.group_golem_user 1 1 1 1
3 access_golem_member_season_user Access GOLEM Member Season User model_golem_member_number golem_base.group_golem_user 1 1 1 1

View File

@ -182,9 +182,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<!-- Menu items --> <!-- Menu items -->
<menuitem id="golem_members_menu" name="GOLEM Members" <menuitem id="golem_members_menu" name="GOLEM Members"
parent="membership.menu_membership" sequence="5" parent="membership.menu_membership" sequence="5"
action="action" /> action="action" groups="golem_base.group_golem_user" />
<menuitem id="golem_members_contacts" name="Contacts"
parent="membership.menu_membership" sequence="20"
action="contacts.action_contacts" groups="golem_base.group_golem_user" />
<menuitem id="golem_members_menu_tags" name="Member Tags" <menuitem id="golem_members_menu_tags" name="Member Tags"
parent="base.menu_marketing_config_association" sequence="10" parent="base.menu_marketing_config_association" sequence="10"
action="tags_action_list" /> action="tags_action_list" groups="golem_base.group_golem_manager" />
</data> </data>
</openerp> </openerp>

View File

@ -56,6 +56,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<!-- Menus --> <!-- Menus -->
<menuitem <menuitem
id="numberconfig_menu" action="numberconfig_action" id="numberconfig_menu" action="numberconfig_action"
parent="base.menu_marketing_config_association" sequence="3" /> parent="base.menu_marketing_config_association" sequence="3"
groups="golem_base.group_golem_manager" />
</data> </data>
</openerp> </openerp>

View File

@ -26,5 +26,6 @@
'application': False, 'application': False,
'installable': True, 'installable': True,
'depends': ['golem_member'], 'depends': ['golem_member'],
'data': ['views/golem_member_view.xml', 'views/res_partner_view.xml'] 'data': ['views/golem_member_view.xml', 'views/res_partner_view.xml',
'security/ir.model.access.csv']
} }

View File

@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_golem_member_skills_user,Access GOLEM Member Skills User,model_golem_member_skill,golem_base.group_golem_user,1,1,1,0
access_golem_member_skills_manager,Access GOLEM Member Skills Manager,model_golem_member_skill,golem_base.group_golem_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_golem_member_skills_user Access GOLEM Member Skills User model_golem_member_skill golem_base.group_golem_user 1 1 1 0
3 access_golem_member_skills_manager Access GOLEM Member Skills Manager model_golem_member_skill golem_base.group_golem_manager 1 1 1 1

View File

@ -28,5 +28,5 @@
'application': False, 'application': False,
'installable': True, 'installable': True,
'depends': ['golem_base'], 'depends': ['golem_base'],
'data': ['views/golem_season_view.xml'] 'data': ['security/ir.model.access.csv', 'views/golem_season_view.xml']
} }

View File

@ -0,0 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_golem_season_user,Access GOLEM Season User,model_golem_season,golem_base.group_golem_user,1,0,0,0
access_golem_season_manager,Access GOLEM Season Manager,model_golem_season,golem_base.group_golem_manager,1,1,1,1
1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_golem_season_user Access GOLEM Season User model_golem_season golem_base.group_golem_user 1 0 0 0
3 access_golem_season_manager Access GOLEM Season Manager model_golem_season golem_base.group_golem_manager 1 1 1 1