diff --git a/__manifest__.py b/__manifest__.py index c20d0d86f8080d0f2ca9378d82a709c4e4b13954..6473c94ae0f68e13e81e26b86567ba6e46273d6c 100755 --- a/__manifest__.py +++ b/__manifest__.py @@ -18,7 +18,6 @@ "views/res_config_settings.xml", "views/scop_bordereau_cg.xml", "views/scop_cotisation_cg.xml", - "views/scop_cotisation_cg_task.xml", "views/union_regionale.xml", ] } diff --git a/models/__init__.py b/models/__init__.py index 121d01a45839e3a7dee484624b8fb208d5dac7b4..acfb330ac3a306fb874954cfd949a61a302c7f06 100755 --- a/models/__init__.py +++ b/models/__init__.py @@ -6,5 +6,4 @@ from . import res_company from . import res_config_settings from . import scop_bordereau_cg from . import scop_cotisation_cg -from . import scop_cotisation_cg_task from . import union_regionale diff --git a/models/res_config_settings.py b/models/res_config_settings.py index ba2374e6c2b6b70ae1a57740f62d20bbe096c9e2..3bc5399d88879d1aed76269784277c5f20c11693 100644 --- a/models/res_config_settings.py +++ b/models/res_config_settings.py @@ -58,12 +58,10 @@ class CotisationsConfigSettings(models.TransientModel): 'cgscop_cotisation_cg.menu_scop_cotisation_cg_calcul') menu_bordereaux_cg = self.env.ref( 'cgscop_cotisation_cg.scop_bordereau_menu') - menu_cotiz_cg_task = self.env.ref( - 'cgscop_cotisation_cg.menu_scop_cotisation_cg_list_task') + bool_condition = self.is_contribution_cg self.add_company_to_menu(menu_appels_cotiz_cg, bool_condition) self.add_company_to_menu(menu_cotiz_cg, bool_condition) self.add_company_to_menu(menu_bordereaux_cg, bool_condition) - self.add_company_to_menu(menu_cotiz_cg_task, bool_condition) return res diff --git a/models/scop_cotisation_cg.py b/models/scop_cotisation_cg.py index 638b823029e8f013865cfd393c98632a36b252eb..0c8f25238794488a90dad098743e4913d51d79a8 100644 --- a/models/scop_cotisation_cg.py +++ b/models/scop_cotisation_cg.py @@ -265,7 +265,7 @@ class ScopCotisation(models.Model): {'message': message}) # Création de la task - cotiz_cg_task = self.env['scop.cotisation.cg.task'].create({ + cotiz_cg_task = self.env['scop.cotisation.task'].create({ 'year': self.year, 'cotiz_to_create': len(members_to_invoice), 'message': "En cours de création", diff --git a/models/scop_cotisation_cg_task.py b/models/scop_cotisation_cg_task.py deleted file mode 100644 index d0b4b4dd2e4296a9797350ac6129c6013c71f4c2..0000000000000000000000000000000000000000 --- a/models/scop_cotisation_cg_task.py +++ /dev/null @@ -1,19 +0,0 @@ -# © 2021 Le Filament (<http://www.le-filament.com>) -# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). - -from odoo import fields, models - - -class CotisationCGTask(models.Model): - _name = 'scop.cotisation.cg.task' - _description = 'Gestion des créations des cotisations CG' - - year = fields.Integer('Année') - message = fields.Char("Message") - cotiz_created = fields.Integer("Appels de cotisation créés") - cotiz_to_create = fields.Integer("Appels de cotisation à créer") - is_error = fields.Boolean('En erreur', default=False) - status = fields.Selection([ - ('in_process', 'En cours'), - ('done', 'Terminé') - ], string='Statut') diff --git a/security/ir.model.access.csv b/security/ir.model.access.csv index 47ea0c32b19bfe124174dc152b7c6a7c7bc7930e..36996cc0cf79a2e5a9767ea4adc01eaee08221b6 100755 --- a/security/ir.model.access.csv +++ b/security/ir.model.access.csv @@ -1,7 +1,5 @@ id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink 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 -access_scop_cotisation_cg_task,access_scop_cotisation_cg_task,model_scop_cotisation_cg_task,account.group_account_manager,1,1,1,0 -admin_access_scop_cotisation_cg_task,admin_access_scop_cotisation_cg_task,model_scop_cotisation_cg_task,cgscop_partner.group_cg_administrator,1,1,1,1 access_scop_bordereau,access_scop_bordereau,model_scop_bordereau,account.group_account_manager,1,1,1,0 admin_access_scop_bordereau,admin_access_scop_bordereau,model_scop_bordereau,cgscop_partner.group_cg_administrator,1,1,1,1 diff --git a/views/scop_cotisation_cg_task.xml b/views/scop_cotisation_cg_task.xml deleted file mode 100644 index 013cece1dfad36e80ffd5b0f0460a8f821846ec0..0000000000000000000000000000000000000000 --- a/views/scop_cotisation_cg_task.xml +++ /dev/null @@ -1,40 +0,0 @@ -<?xml version="1.0"?> -<!-- Copyright 2021 Le Filament - License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). --> - -<odoo> - <data> - - <!-- TREE VIEW --> - <record model="ir.ui.view" id="view_scop_cotisation_aura_task_tree"> - <field name="name">scop.cotisation.cg.task.tree</field> - <field name="model">scop.cotisation.cg.task</field> - <field name="arch" type="xml"> - <tree create="false" string="Taches création cotisations CG"> - <field name="create_date"/> - <field name="year"/> - <field name='status'/> - <field name='cotiz_created'/> - <field name='cotiz_to_create'/> - <field name='is_error'/> - <field name="message"/> - </tree> - </field> - </record> - - <!-- ACTIONS VIEWS--> - <record model="ir.actions.act_window" id="action_scop_cotisation_cg_task"> - <field name="name">Taches cotisation CG</field> - <field name="res_model">scop.cotisation.cg.task</field> - <field name="view_mode">tree,form</field> - </record> - - <!-- MENU --> - <menuitem id="menu_scop_cotisation_cg_list_task" - parent="account.menu_finance_configuration" - name="Taches création cotisations CG" - sequence="50" - action="action_scop_cotisation_cg_task"/> - - </data> -</odoo> \ No newline at end of file