Skip to content
Snippets Groups Projects
project_views.xml 24.4 KiB
Newer Older
Juliana's avatar
Juliana committed
<?xml version="1.0"?>
<!-- Copyright 2020 Le Filament
     License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->

<odoo>
    <data>
        <record model="ir.ui.view" id="view_project_kanban">
            <field name="name">project.project.kanban</field>
            <field name="model">project.project</field>
            <field name="inherit_id" ref="project.view_project_kanban"/>
Juliana's avatar
Juliana committed
            <field name="priority">30</field>
            <field name="arch" type="xml">
                <kanban position="attributes">
                    <attribute name="default_order">num_dossier</attribute>
                    <attribute name="quick_create">false</attribute>
                    <attribute name="on_create"></attribute>
                </kanban>

Juliana's avatar
Juliana committed
                <field name="name" position="after">
                    <field name="num_dossier"/>
                    <field name="user_id"/>
Juliana's avatar
Juliana committed
                </field>
                <xpath expr="//div[hasclass('o_primary')]" position="after">
                  <div>
                        <span t-if="record.num_dossier.value">
                            <strong>Numéro de dossier : <t t-esc="record.num_dossier.value"/></strong><br/>
                        </span>
                        <span>
                            CFD : <field name="user_id"/>
Juliana's avatar
Juliana committed
                        </span>
                  </div>
                </xpath>
Juliana's avatar
Juliana committed
                <div class="o_project_kanban_boxes" position="replace">
                    <a class="o_project_kanban_box" name="%(project.act_project_project_2_project_task_all)d" type="action">
                        <div>
                            <span class="o_value"><t t-esc="record.task_count.value"/></span>
                            <span class="o_label">Séances</span>
Juliana's avatar
Juliana committed
                        </div>
                    </a>
                    <a t-if="record.allow_timesheets.raw_value"
                       class="o_project_kanban_box o_project_timesheet_box"
                       name="%(hr_timesheet.act_hr_timesheet_line_by_project)d"
                       type="action" groups="hr_timesheet.group_hr_timesheet_user">
                        <div>
                            <span class="o_label">Feuilles de temps</span>
                        </div>
                    </a>
                </div>
            </field>
        </record>

        <record id="increment_num_dossier_sequence" model="ir.sequence">
            <field name="name">Champ incrémentation</field>
            <field name="code">increment_num_dossier</field>
            <field name="prefix"></field>
            <field name="padding">4</field>
            <field name="company_id" eval="False"/>
        </record>

Juliana's avatar
Juliana committed
        <record id="edit_project" model="ir.ui.view">
            <field name="name">project.project.form</field>
            <field name="model">project.project</field>
Juliana's avatar
Juliana committed
            <field name="priority">30</field>
Juliana's avatar
Juliana committed
            <field name="inherit_id" ref="project.edit_project"/>
            <field name="arch" type="xml">
                <header position="inside">
                    <button string="Valider pour CA" type="object" class="btn-primary" name="validate_ca" attrs="{'invisible': ['|', ('num_dossier', '!=', False), ('project_status', '!=', %(adefpat_project.project_status_pret_pour_ca)d)]}"/>
Juliana's avatar
Juliana committed
                    <button name="export_gap" string="Exporter les membres du GAP" type="object"/>
Juliana's avatar
Juliana committed
                    <button name="export_benef" string="Exporter les bénéficiaires" type="object"/>
                <button name="attachment_tree_view" position="replace"/>
                <h1 position="after">
                    <h3>
                        <field name="name_subtitle" placeholder="Sous-titre"/>
                    </h3>
                    <h4>
                        <field name="num_dossier" attrs="{'invisible': [('num_dossier', '=', False)]}" readonly="1"/>
                    </h4>
                </h1>
Juliana's avatar
Juliana committed

                <xpath expr="//div[@name='options_active']" position="attributes">
                    <attribute name="invisible">1</attribute>
                </xpath>
                <field name="task_count" position="replace">
Juliana's avatar
Juliana committed
                    <field string="Séances" name="task_count" widget="statinfo"/>
                </field>

                <page name="settings" position="attributes">
                    <attribute name="invisible">1</attribute>
                </page>
Juliana's avatar
Juliana committed

                <xpath expr="//notebook" position="before">
                    <group>
                        <group  attrs="{'invisible': [('project_status', '!=', %(adefpat_project.project_status_demande)d), ('project_status', '!=', %(adefpat_project.project_status_instruction)d)]}">
Juliana's avatar
Juliana committed
                            <field name="first_contact_id"/>
                            <field name="type_contact"/>
                            <field name="date_first_contact"/>
                            <field name="prescripteur_id"/>
                            <field name="territoire_id" options="{'no_create': True}"/>
                            <field name="departement_ids" widget="many2many_tags"/>
                            <field name="region_ids" widget="many2many_tags"/>
                            <field name="petr_ids" widget="many2many_tags"/>
Juliana's avatar
Juliana committed
                            <field name="departement"/>
                            <field name="user_id"/>
Juliana's avatar
Juliana committed
                        </group>
                    </group>
                    <field name="porteurs_projets_ids" widget="one2many">
                        <tree string="Porteurs de projet" editable="top" default_order='porteur_id'>
                            <field name="porteur_id"/>
Juliana's avatar
Juliana committed
                            <field name="lastname"/>
                            <field name="firstname"/>
                            <field name="commune"/>
                            <field name="mobile"/>
                            <field name="fixe"/>
Juliana's avatar
Juliana committed
                            <field name="email" widget="email"/>
                            <field name="statut" options="{'no_create': True}"/>
Juliana's avatar
Juliana committed
                            <field name="eligible"/>
                        </tree>
Juliana's avatar
Juliana committed
                        <form string="Porteurs de projets">
                                <sheet>
                                    <group>
                                        <group>
                                            <field name="porteur_id"/>
Juliana's avatar
Juliana committed
                                            <field name="lastname"/>
                                            <field name="firstname"/>
                                            <field name="commune"/>
                                        </group>
                                        <group>
                                            <field name="mobile"/>
                                            <field name="fixe"/>
                                            <field name="email" widget="email"/>
                                            <field name="statut"/>
                                            <field name="eligible"/>
                                        </group>
                                    </group>
                                </sheet>
                            </form>
Juliana's avatar
Juliana committed
                    </field>
                    <group>
                        <group>
                            <field name="od_ids" options="{'no_create': True}" widget="many2many_tags"/>
                            <field name="animateur_ids" options="{'no_create': True}" widget="many2many_tags"/>
Juliana's avatar
Juliana committed
                            <field name="type_convention_id" options="{'limit': 10, 'no_create': True, 'no_open': True}" />
Juliana's avatar
Juliana committed
                        </group>
                        <group>
                            <field name="date_ca"/>
                            <field name="date_demarrage"/>
                            <field name="elu_id" options="{'no_create': True}" />
Juliana's avatar
Juliana committed
                        </group>
                    </group>

                </xpath>
                <xpath expr="//notebook" position="inside">
                    <page name="contact_first" string="1er contact" attrs="{'invisible': ['|', ('project_status', '=', %(adefpat_project.project_status_demande)d), ('project_status', '=', %(adefpat_project.project_status_instruction)d)]}">
                        <group >
                            <field name="first_contact_id"/>
                            <field name="type_contact"/>
                            <field name="date_first_contact"/>
                            <field name="prescripteur_id"/>
                        </group>
                    </page>
Juliana's avatar
Juliana committed
                    <page name="dossier" string="Dossier">
                        <group string="Dossier Consultation">
                            <group>
Juliana's avatar
Juliana committed
                                <field name="contexte" placeholder="Les impacts du projet sur le territoire, la correspondance aux priorités, les bénéfices attendus de sa mise en œuvre"/>
                                <field name="caract_beneficiaire" placeholder="Nombre / Type : chef d’entreprise, créateur… / Age, niveau et type de formation, expérience professionnelle / Situation, commune nombre habitants / Etat civil, statut, résidence – en lien avec les critères du financeur"/>
                                <field name="historique" placeholder="La description de l’entreprise avec commentaires non diffusables en rouge si nécessaire. Les raisons amenant à mettre en œuvre le projet. Place du projet dans le projet de vie du PP"/>
                                <field name="besoins_beneficiaires" placeholder="Les apports de la formation développement dans la mise en œuvre du projet / Les dispositifs complémentaires à mobiliser et pour quels besoins"/>
                                <field name="objectifs_accompagnement" placeholder="Les activités que les bénéficiaires doivent être capables de réaliser à l’issue du dispositif de formation développement."/>
Juliana's avatar
Juliana committed
                            </group>
                            <group>
                                <field name="competences_requises"/>
                                <field name="secteurs_requis"/>
                                <field name="modalites_intervention"/>
                                <field name="modalites_facturation"/>
                                <field name="modalites_reponse"/>
Juliana's avatar
Juliana committed
                                <field name="modalites_modif_marche"/>
Juliana's avatar
Juliana committed
                            </group>
                        </group>
                        <group >
                            <group string="Critères CA">
                                <field name="type_beneficiaire"/>
                                <field name="objectif_projet"/>
                                <field name="secteur_crit"/>
                                <field name="taille"/>
                                <field name="objectif_formation"/>
                                <field name="type_formation"/>
                                <field name="encadrement"/>
                                <field name="nb_activité"/>
                                <field name="nb_emplois"/>
Juliana's avatar
Juliana committed
                            </group>
                            <group string="Infos Dossier CA">
                                <field name="lieu"/>
                                <field name="periode_realisation"/>
Juliana's avatar
Juliana committed
                                <field name="contenu_formation" placeholder="Contenu des séances / Evaluation - capitalisation / La dernière séance permettra de dégager les acquis pédagogiques en s’appuyant sur les objectifs initiaux d’accompagnement : retour d’expérience / pointage des actions restant à conduire"/>
                                <field name="methode_savoir" placeholder="Méthodes et savoir transmis / Evaluation - capitalisation / La dernière séance permettra de dégager les acquis pédagogiques en s’appuyant sur les objectifs initiaux d’accompagnement : retour d’expérience / pointage des actions restant à conduire"/>
                                <field name="travaux_intersessions" placeholder="Travaux intersessions / Evaluation - capitalisation / La dernière séance permettra de dégager les acquis pédagogiques en s’appuyant sur les objectifs initiaux d’accompagnement : retour d’expérience / pointage des actions restant à conduire"/>
Juliana's avatar
Juliana committed
                            </group>
                        </group>
                    </page>
                    <page name="consultation" string="Consultation">
Juliana's avatar
Juliana committed
                                <field name="date_cdc"/>
                                <field name="date_selection"/>
                                <field name="date_notification"/>
                            </group>
                        </group>
                        <field name="consulant_ids" widget="one2many"  options="{'no_create': True}">
Juliana's avatar
Juliana committed
                            <tree string="Consultants" editable="top">
                                <field name="partner_id" options="{'no_create': True}"/>
Juliana's avatar
Juliana committed
                                <field name="lastname"/>
                                <field name="firstname"/>
Juliana's avatar
Juliana committed
                                <field name="mobile"/>
                                <field name="email" widget="email"/>
                                <field name="is_selected"/>
Juliana's avatar
Juliana committed
                            </tree>
                            <form string="Consultants">
                                <sheet>
                                    <group>
                                        <group>
                                            <field name="partner_id"/>
                                            <field name="lastname"/>
                                            <field name="firstname"/>
                                            <field name="mobile"/>
                                            <field name="email" widget="email"/>
                                        </group>
                                        <group>
                                            <field name="reference"/>
                                            <field name="cout_journée"/>
                                            <field name="is_selected"/>
                                        </group>
                                    </group>
                                </sheet>
                            </form>
Juliana's avatar
Juliana committed
                        </field>
                    </page>
                    <page string="Budget" name="budget">
                        <group>
                            <group string="Adefpat">
                                <field name="nb_jours_adefpat"/>
                                <field name="cout_jour_adefpat"/>
                            </group>
                            <group string="Global (Avenants compris)">
                                <field name="nb_jour_plann"/>
                                <field name="nb_jour_rest"/>
                            </group>
                        <group >
                            <field name="nb_jour_tot" invisible="1"/>
                            <field name="nb_heure_tot" invisible="1"/>
                            <field name="nb_jour_theorique_tot"/>
                        </group>
                        <field name="cout_ids" widget="one2many"  context="{'default_project_id': active_id}">
                            <tree string="Coûts" editable="top">
                                <field name="module"/>
                                <field name="partner_id"/>
                                <field name="nb_jour_theorique"/>
                                <field name="nb_jour_pratiques"/>
                                <field name="cout_jour"/>
                                <field name="montant" sum="Montant"/>
                            </tree>
                        </field>
                        <field name="financement_ids" widget="one2many">
                            <tree string="Financements" editable="top">
                                <field name="partner_id"/>
                                <field name="montant" sum="Montant"/>
                            </tree>
                        </field>
                        <group>
                            <table class="table table-bordered">
                                <thead>
                                    <tr>
                                        <th style="width:50%">Coûts</th>
                                        <th style="width:50%">Financements</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                            <tr>
                                                <td>
                                                    Honoraire d'intervenant :
                                                    <field name="cout_ids" widget="one2many"  context="{'default_project_id': active_id}">
                                                        <tree string="Coûts" editable="top">
                                                            <field name="module"/>
                                                            <field name="partner_id"/>
                                                            <field name="nb_jour_theorique"/>
                                                            <field name="nb_jour_pratiques"/>
                                                            <field name="cout_jour"/>
                                                            <field name="montant" sum="Montant"/>
                                                        </tree>
                                                    </field>
                                                <td><field name="total_cout" widget="monetary" readonly="True"/></td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Temps Adefpat: <br/>
                                                </td>
                                                <td>
Juliana's avatar
Juliana committed
                                                    <field name="total_cout_adefpat"  readonly="True"/>
                                                </td>
                                        <td>
                                            <tr>
                                                <td>
                                                    Adefpat:
                                                </td>
                                                <td>
                                                    <field name="financement_adefpat" widget="monetary" readonly="True"/>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    Autres:
                                                </td>
                                                <td>
                                                    <field name="total_financement" widget="monetary" readonly="True"/>
                                                </td>
                                            </tr>
                                        </td>
                                        <td>
                                            <tr>
                                                <td>Budget Total: </td>
                                                <td><field name="total_budget_cout" widget="monetary" readonly="True"/>
                                                </td>
                                            </tr>
                                        </td>

                                        <td>
                                            <tr>
                                                <td>Budget Total:</td>
                                                <td><field name="total_budget_financement" widget="monetary" readonly="True"/></td>
                                            </tr>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </group>
                        <group>
                            <field name="explication_financement"/>
                        </group>
                    <page name="gap" string="GAP">
                        <group >
                            <group>
                                <field name="elu_referent_id"/>
                            </group>
                            <group>
                                <field name="modalite_gap"/>
                            </group>
                        </group>
                        <field name="membre_ids" widget="one2many">
                            <tree string="Membres" editable="top">
                                <field name="partner_id"/>
                                <field name="lastname"/>
                                <field name="firstname"/>
                                <field name="commune"/>
                                <field name="mobile"/>
                                <field name="fixe"/>
                                <field name="email" widget="email"/>
                            </tree>
                            <form string="Membres">
                                <sheet>
                                    <group>
                                        <group>
                                            <field name="partner_id"/>
                                            <field name="lastname"/>
                                            <field name="firstname"/>
                                        </group>
                                        <group>
                                            <field name="commune"/>
                                            <field name="mobile"/>
                                            <field name="fixe"/>
                                            <field name="email" widget="email"/>
                                        </group>
                                    </group>
                                </sheet>
                            </form>
                        </field>
                        <field name="reunion_ids" widget="one2many">
                            <tree string="Réunions GAP" editable="top">
                                <field name="date"/>
                            </tree>
                        </field>
                    </page>

Juliana's avatar
Juliana committed
                </xpath>
Juliana's avatar
Juliana committed
                <div class="oe_chatter" position="inside">
                    <field name="message_ids" widget="mail_thread"/>
                </div>
Juliana's avatar
Juliana committed
            </field>
        </record>

        <record id="view_adefpat_type_convention_tree" model="ir.ui.view">
            <field name="name">view.adefpat.type.convention.tree</field>
            <field name="model">adefpat.type.convention</field>
            <field name="arch" type="xml">
                <tree string="Types de conventions">
                    <field name="name"/>
                    <field name="date_end_validity"/>
                </tree>
            </field>
        </record>

Juliana's avatar
Juliana committed
        <record id="action_view_adefpat_type_convention" model="ir.actions.act_window">
            <field name="name">Types de convention</field>
            <field name="res_model">adefpat.type.convention</field>
            <field name="view_type">form</field>
            <field name="view_mode">tree,form</field>
        </record>

        <menuitem 
            id="adefpat_project.menu_type_convention" 
            name="Types de convention"
            parent="project.menu_project_config" 
            action="action_view_adefpat_type_convention"/>
Juliana's avatar
Juliana committed

    </data>
</odoo>