Skip to content
Extraits de code Groupes Projets
Valider 9624174d rédigé par jordan's avatar jordan
Parcourir les fichiers

[update] menu "appels de cotiz" in each module for specific view

parent 816260c5
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
"data": [ "data": [
"security/security_rules.xml", "security/security_rules.xml",
"security/ir.model.access.csv", "security/ir.model.access.csv",
"views/account_invoice.xml",
"views/res_config_settings.xml", "views/res_config_settings.xml",
"views/scop_bordereau_cg.xml", "views/scop_bordereau_cg.xml",
"views/scop_cotisation_cg.xml", "views/scop_cotisation_cg.xml",
......
...@@ -52,12 +52,15 @@ class CotisationsConfigSettings(models.TransientModel): ...@@ -52,12 +52,15 @@ class CotisationsConfigSettings(models.TransientModel):
""" """
res = super(CotisationsConfigSettings, self).execute() 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( menu_cotiz_cg = self.env.ref(
'cgscop_cotisation_cg.menu_scop_cotisation_cg_calcul') 'cgscop_cotisation_cg.menu_scop_cotisation_cg_calcul')
menu_bordereaux_cg = self.env.ref( menu_bordereaux_cg = self.env.ref(
'cgscop_cotisation_cg.scop_bordereau_menu') 'cgscop_cotisation_cg.scop_bordereau_menu')
bool_condition = self.is_contribution_cg 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_cotiz_cg, bool_condition)
self.add_company_to_menu(menu_bordereaux_cg, bool_condition) self.add_company_to_menu(menu_bordereaux_cg, bool_condition)
return res return res
<?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
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
<div class="oe_title"> <div class="oe_title">
<label for="name"/> <label for="name"/>
<h1> <h1>
<field name="name" <field name="name" placeholder="Title"/>
placeholder="Title"/>
</h1> </h1>
</div> </div>
<group> <group>
...@@ -49,30 +48,18 @@ ...@@ -49,30 +48,18 @@
</field> </field>
</record> </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"> <record id="scop_bordereau_act_window" model="ir.actions.act_window">
<field name="name">Bodereaux</field> <field name="name">Bodereaux</field>
<field name="type">ir.actions.act_window</field> <field name="type">ir.actions.act_window</field>
<field name="res_model">scop.bordereau</field> <field name="res_model">scop.bordereau</field>
<!-- <field name="view_type">form</field>-->
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
</record> </record>
<menuitem name="Bordereaux" id="scop_bordereau_menu" parent="cgscop_cotisation.menu_scop_cotisation" <menuitem name="Bordereaux"
action="scop_bordereau_act_window"/> id="scop_bordereau_menu"
parent="cgscop_cotisation.menu_scop_cotisation"
action="scop_bordereau_act_window"
sequence="30"/>
</data> </data>
</odoo> </odoo>
\ No newline at end of file
...@@ -98,9 +98,9 @@ ...@@ -98,9 +98,9 @@
</div> </div>
</div> </div>
<div class="row"> <div class="row">
<div class="col-6"> <div class="col-6 text-center">
<field name="percent_cotiz_paid" widget="gauge"/> <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="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> <button type="object" name="bordereaux_view" class="btn btn-info">Voir les bordereaux</button>
</div> </div>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter