diff --git a/__manifest__.py b/__manifest__.py index 837f4a3ac45bde05c0cb2b1448a4a59f00322017..6473c94ae0f68e13e81e26b86567ba6e46273d6c 100755 --- a/__manifest__.py +++ b/__manifest__.py @@ -14,6 +14,7 @@ "data": [ "security/security_rules.xml", "security/ir.model.access.csv", + "views/account_invoice.xml", "views/res_config_settings.xml", "views/scop_bordereau_cg.xml", "views/scop_cotisation_cg.xml", diff --git a/models/res_config_settings.py b/models/res_config_settings.py index f2341fb0055e3dbdb16120261a12d3397a577006..67ae9b3062021af2b59a12f65bb7ada9bbfa8970 100644 --- a/models/res_config_settings.py +++ b/models/res_config_settings.py @@ -52,12 +52,15 @@ class CotisationsConfigSettings(models.TransientModel): """ res = super(CotisationsConfigSettings, self).execute() + menu_appels_cotiz_cg = self.env.ref( + 'cgscop_cotisation_cg.menu_scop_cotisation_cg_appels') menu_cotiz_cg = self.env.ref( 'cgscop_cotisation_cg.menu_scop_cotisation_cg_calcul') menu_bordereaux_cg = self.env.ref( 'cgscop_cotisation_cg.scop_bordereau_menu') 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) return res diff --git a/views/account_invoice.xml b/views/account_invoice.xml new file mode 100644 index 0000000000000000000000000000000000000000..07e93593ca2cc64734dcb9c279cf8b0ade526892 --- /dev/null +++ b/views/account_invoice.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <data> + + <!-- Action --> + <record id="action_scop_cg_appel_cotisation" model="ir.actions.act_window"> + <field name="name">Appels de cotisations</field> + <field name="res_model">account.invoice</field> + <field name="view_mode">tree,form,kanban,calendar,graph,pivot</field> + <field name="domain" eval="[('type','in', ['out_invoice', 'out_refund']), ('is_contribution', '!=', False)]"/> + <field name="context" eval="{'default_type':'out_invoice', 'type':'out_invoice', 'journal_type': 'sale', 'default_is_contribution': True, 'create': False,}"/> + <field name="search_view_id" ref="cgscop_cotisation.invoice_search_scop_inherited"/> + </record> + <record id="action_scop_aura_appel_cotisation_tree" model="ir.actions.act_window.view"> + <field eval="1" name="sequence"/> + <field name="view_mode">tree</field> + <field name="view_id" ref="cgscop_cotisation.invoice_tree_scop_inherited"/> + <field name="act_window_id" ref="action_scop_cg_appel_cotisation"/> + </record> + <record id="action_scop_aura_appel_cotisation_form" model="ir.actions.act_window.view"> + <field eval="2" name="sequence"/> + <field name="view_mode">form</field> + <field name="view_id" ref="cgscop_cotisation.invoice_form_scop_inherited"/> + <field name="act_window_id" ref="action_scop_cg_appel_cotisation"/> + </record> + + <!-- MENU --> + <menuitem id="menu_scop_cotisation_cg_appels" + name="Appels de cotisations" + parent="cgscop_cotisation.menu_scop_cotisation" + action="action_scop_cg_appel_cotisation" + sequence="20"/> + + </data> +</odoo> \ No newline at end of file diff --git a/views/scop_bordereau_cg.xml b/views/scop_bordereau_cg.xml index 402abd348ce807aa9d1c1bf4ce1fffbb37a996f2..5f8519b45794f16a09d385d504dce92ee30c0fea 100644 --- a/views/scop_bordereau_cg.xml +++ b/views/scop_bordereau_cg.xml @@ -16,8 +16,7 @@ <div class="oe_title"> <label for="name"/> <h1> - <field name="name" - placeholder="Title"/> + <field name="name" placeholder="Title"/> </h1> </div> <group> @@ -49,30 +48,18 @@ </field> </record> - <!-- <record id="ModelName_search_view" model="ir.ui.view">--> - <!-- <field name="name">ProjectName.ModelName.search</field>--> - <!-- <field name="model">ProjectName.ModelName</field>--> - <!-- <field name="arch" type="xml">--> - <!-- <search string="ModelTitle">--> - <!-- <group expand="1" string="Group By">--> - <!-- <filter string="Example Field" name="example_field"--> - <!-- domain="[]"--> - <!-- context="{'group_by':'example_field'}"/>--> - <!-- </group>--> - <!-- </search>--> - <!-- </field>--> - <!-- </record>--> - <record id="scop_bordereau_act_window" model="ir.actions.act_window"> <field name="name">Bodereaux</field> <field name="type">ir.actions.act_window</field> <field name="res_model">scop.bordereau</field> -<!-- <field name="view_type">form</field>--> <field name="view_mode">tree,form</field> </record> - <menuitem name="Bordereaux" id="scop_bordereau_menu" parent="cgscop_cotisation.menu_scop_cotisation" - action="scop_bordereau_act_window"/> + <menuitem name="Bordereaux" + id="scop_bordereau_menu" + parent="cgscop_cotisation.menu_scop_cotisation" + action="scop_bordereau_act_window" + sequence="30"/> </data> </odoo> \ No newline at end of file diff --git a/views/scop_cotisation_cg.xml b/views/scop_cotisation_cg.xml index 6ca81883fb33eae1782591f8a9f808bb69a07ea8..e9eb9c20ef06e4797cfb3f1083649ce6bafceeb5 100644 --- a/views/scop_cotisation_cg.xml +++ b/views/scop_cotisation_cg.xml @@ -98,9 +98,9 @@ </div> </div> <div class="row"> - <div class="col-6"> + <div class="col-6 text-center"> <field name="percent_cotiz_paid" widget="gauge"/> - <div class="text-center mb32"> + <div class="btn-group-vertical"> <button type="object" name="cotiz_view" class="btn btn-info">Voir les appels <br /> de cotisations</button> <button type="object" name="bordereaux_view" class="btn btn-info">Voir les bordereaux</button> </div>