diff --git a/__manifest__.py b/__manifest__.py index ae601e0672772db167b58d9afa9e2b392a769b5e..1a7e0b92c5662de335b24f8c8c03793082f8c580 100755 --- a/__manifest__.py +++ b/__manifest__.py @@ -15,7 +15,7 @@ "security/security_rules.xml", "security/ir.model.access.csv", "views/res_config_settings.xml", - "views/scop_cotisation.xml", + "views/scop_cotisation_cg.xml", "views/union_regionale.xml", ] } diff --git a/models/__init__.py b/models/__init__.py index 7f48c9bb529e753941e935d6da1230e562e81c61..0ef1dbe8644efef54d6247fbc36649ae12a449da 100755 --- a/models/__init__.py +++ b/models/__init__.py @@ -4,5 +4,5 @@ from . import account_invoice from . import res_company from . import res_config_settings -from . import scop_cotisation +from . import scop_cotisation_cg from . import union_regionale diff --git a/models/account_invoice.py b/models/account_invoice.py index d56f988677674cf393b261d7c52ce97c733222b7..785f3b53755ac7c83ae7e9d1c30663b9946ecf48 100644 --- a/models/account_invoice.py +++ b/models/account_invoice.py @@ -8,8 +8,8 @@ class ScopAccountInvoiceCG(models.Model): _inherit = "account.invoice" cotisation_cg_id = fields.Many2one( - comodel_name='scop.cotisation', - string='Base de cotisation') + comodel_name='scop.cotisation.cg', + string='Base de cotisation CG Scop') partner_ur_id = fields.Many2one( comodel_name='union.regionale', string='UR Adhérent', diff --git a/models/res_config_settings.py b/models/res_config_settings.py index c5a11db7bc04803a54a0abcbf711b1a9dd51ae82..f0b4451b776b92032e2a9b8d044b55c113a49596 100644 --- a/models/res_config_settings.py +++ b/models/res_config_settings.py @@ -53,7 +53,7 @@ class CotisationsConfigSettings(models.TransientModel): res = super(CotisationsConfigSettings, self).execute() menu_cotiz_cg = self.env.ref( - 'cgscop_cotisation_cg.menu_scop_cotisation_calcul') + 'cgscop_cotisation_cg.menu_scop_cotisation_cg_calcul') bool_condition = self.is_contribution_cg self.add_company_to_menu(menu_cotiz_cg, bool_condition) diff --git a/security/ir.model.access.csv b/security/ir.model.access.csv index f92304ef135ca0327f8797a333b82a5861d8df6e..3331cf3fb411860aadf156460bdc4a65510a2d9d 100755 --- a/security/ir.model.access.csv +++ b/security/ir.model.access.csv @@ -1,3 +1,3 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink -access_scop_cotisation,access_scop_cotisation,model_scop_cotisation,account.group_account_manager,1,1,1,0 -admin_access_scop_cotisation,admin_access_scop_cotisation,model_scop_cotisation,cgscop_partner.group_cg_administrator,1,1,1,1 +access_scop_cotisation_cg,access_scop_cotisation_cg,model_scop_cotisation_cg,account.group_account_manager,1,1,1,0 +admin_access_scop_cotisation_cg,admin_access_scop_cotisation_cg,model_scop_cotisation_cg,cgscop_partner.group_cg_administrator,1,1,1,1 diff --git a/security/security_rules.xml b/security/security_rules.xml index bdda16b51736d72937bf25ed2544a1321f0ad4e2..3e59b3545a054123d50129b014fcca1be0c3add9 100644 --- a/security/security_rules.xml +++ b/security/security_rules.xml @@ -7,7 +7,7 @@ <record id="cg_cotisation_cg_rule" model="ir.rule"> <field name="name">Cotisations consultables que pour sa société</field> - <field name="model_id" ref="cgscop_cotisation_cg.model_scop_cotisation"/> + <field name="model_id" ref="cgscop_cotisation_cg.model_scop_cotisation_cg"/> <field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field> <field name="perm_read" eval="True"/> <field name="perm_write" eval="True"/> diff --git a/views/scop_cotisation.xml b/views/scop_cotisation_cg.xml old mode 100755 new mode 100644 similarity index 84% rename from views/scop_cotisation.xml rename to views/scop_cotisation_cg.xml index d69bb5cffe86b42d72b1c21150cc4b8e8506f135..fdfa8a4b19c74754e2ae8d8569677c3aa9b9801a --- a/views/scop_cotisation.xml +++ b/views/scop_cotisation_cg.xml @@ -6,9 +6,9 @@ <data> <!-- Tree view --> - <record id="view_scop_cotisation_tree" model="ir.ui.view"> - <field name="name">scop.cotisation.tree</field> - <field name="model">scop.cotisation</field> + <record id="view_scop_cotisation_cg_tree" model="ir.ui.view"> + <field name="name">scop.cotisation.cg.tree</field> + <field name="model">scop.cotisation.cg</field> <field name="arch" type="xml"> <tree string="Cotisations"> <field name="year"/> @@ -23,9 +23,9 @@ </record> <!-- Form view --> - <record id="view_scop_cotisation_form" model="ir.ui.view"> - <field name="name">scop.cotisation.form</field> - <field name="model">scop.cotisation</field> + <record id="view_scop_cotisation_cg_form" model="ir.ui.view"> + <field name="name">scop.cotisation.cg.form</field> + <field name="model">scop.cotisation.cg</field> <field name="arch" type="xml"> <form string="Cotisations"> <header> @@ -72,18 +72,18 @@ </record> <!-- Action --> - <record id="action_scop_cotisation" model="ir.actions.act_window"> - <field name="name">Base de cotisations</field> - <field name="res_model">scop.cotisation</field> + <record id="action_scop_cotisation_cg" model="ir.actions.act_window"> + <field name="name">Base de cotisations CG</field> + <field name="res_model">scop.cotisation.cg</field> <field name="view_mode">tree,form</field> <field name="help">Affiche les bases de calcul des cotisations</field> </record> <!-- MENUS --> - <menuitem id="menu_scop_cotisation_calcul" + <menuitem id="menu_scop_cotisation_cg_calcul" parent="cgscop_cotisation.menu_scop_cotisation" - action="action_scop_cotisation" + action="action_scop_cotisation_cg" sequence="10"/> </data> </odoo>