Skip to content
Extraits de code Groupes Projets
Valider 8b4a84bc rédigé par Benjamin - Le Filament's avatar Benjamin - Le Filament
Parcourir les fichiers

[update] CRM fields and views

parent 89c394ac
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
# Copyright 2019 Le Filament (<http://www.le-filament.com>) # Copyright 2019 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields from odoo import models, fields
class CRMleadMVH(models.Model): class CRMleadMVH(models.Model):
_inherit = 'crm.lead' _inherit = 'crm.lead'
# Critères du début Go/NoGo
budget = fields.Float(string="Budget au m²") budget = fields.Float(string="Budget au m²")
eco_responsable = fields.Selection([('yes', 'Oui'), ('no', 'Non')], eco_responsable = fields.Boolean(string='Eco-responsable ?')
string='Eco-responsable')
elements_metriques = fields.Text(string="Eléments métriques") elements_metriques = fields.Text(string="Eléments métriques")
lieu = fields.Char(string="Lieu") lieu = fields.Char(string="Lieu")
propriete = fields.Text(string="Propriété") propriete = fields.Text(string="Propriété")
renovation_neuf = fields.Selection([('renovation', 'Rénovation'), renovation_neuf = fields.Selection(
('neuf', 'Neuf')], [('renovation', 'Rénovation'), ('neuf', 'Neuf')],
string="Projet") string="Projet")
visite_payante = fields.Selection([('yes', 'Oui'), ('no', 'Non')], visite_payante = fields.Boolean('Visite payante')
string='Visite payante') envie_achat = fields.Boolean("Envie d'achat")
envie_achat = fields.Selection([('yes', 'Oui'), ('no', 'Non')], presence_plan = fields.Boolean("Plan")
string="Envie d'achat") presence_planning = fields.Boolean("Planning réalisation")
presence_plan = fields.Selection([('yes', 'Oui'), ('no', 'Non')], presence_permis = fields.Boolean("Permis de construire")
string="Plan") presence_etude = fields.Boolean("Etude de sol")
presence_planning = fields.Selection([('yes', 'Oui'), ('no', 'Non')],
string="Planning réalisation")
presence_permis = fields.Selection([('yes', 'Oui'), ('no', 'Non')],
string="Permis de construire")
presence_etude = fields.Selection([('yes', 'Oui'), ('no', 'Non')],
string="Etude de sol")
# Adresse du chantier # Adresse du chantier
rue = fields.Char('Rue') rue = fields.Char('Rue')
rue2 = fields.Char('Rue2') rue2 = fields.Char('Rue2')
code_postal = fields.Char('Code postal', change_default=True) code_postal = fields.Char('Code postal', change_default=True)
ville = fields.Char('Ville') ville = fields.Char('Ville')
# Prescription technique # Prescription technique
prescription_technique = fields.Text(string="Prescriptions techniques") prescription_technique = fields.Text(string="Prescriptions techniques")
# Partenaires projet # Partenaires projet
supplier_ids = fields.Many2many('res.partner', supplier_ids = fields.Many2many(
comodel_name='res.partner',
string="Architecte et fournisseurs") string="Architecte et fournisseurs")
# Visite de chantier # Visite de chantier
description_technique = fields.Text(string="Description technique", description_technique = fields.Text(
track_visibility='onchange') string="Description technique",
reflexion_technique = fields.Text(string="Reflexion technique",
track_visibility='onchange') track_visibility='onchange')
presentation_detaillee = fields.Text(string="Présentation détaillée", reflexion_technique = fields.Text(
string="Reflexion technique",
track_visibility='onchange') track_visibility='onchange')
presentation_detaillee = fields.Text(string="Présentation détaillée")
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
<attribute name="invisible">True</attribute> <attribute name="invisible">True</attribute>
</field> </field>
<xpath expr="//page[1]" position="attributes"> <xpath expr="//page[1]" position="attributes">
<attribute name="string">Descriptif court</attribute> <attribute name="string">Descriptif court</attribute>
</xpath> </xpath>
...@@ -21,16 +20,16 @@ ...@@ -21,16 +20,16 @@
<group> <group>
<group string="Infos générales"> <group string="Infos générales">
<field name="budget"/> <field name="budget"/>
<field name="eco_responsable" widget="radio" options="{'horizontal': true}"/> <field name="eco_responsable" widget="boolean_toggle"/>
<field name="renovation_neuf" widget="radio" options="{'horizontal': true}"/> <field name="renovation_neuf" widget="radio" options="{'horizontal': true}"/>
<field name="visite_payante" widget="radio" options="{'horizontal': true}"/> <field name="visite_payante" widget="boolean_toggle"/>
</group> </group>
<group string="Statut du projet"> <group string="Statut du projet">
<field name="envie_achat" widget="radio" options="{'horizontal': true}"/> <field name="envie_achat" widget="boolean_toggle"/>
<field name="presence_plan" widget="radio" options="{'horizontal': true}"/> <field name="presence_plan" widget="boolean_toggle"/>
<field name="presence_planning" widget="radio" options="{'horizontal': true}"/> <field name="presence_planning" widget="boolean_toggle"/>
<field name="presence_permis" widget="radio" options="{'horizontal': true}"/> <field name="presence_permis" widget="boolean_toggle"/>
<field name="presence_etude" widget="radio" options="{'horizontal': true}"/> <field name="presence_etude" widget="boolean_toggle"/>
</group> </group>
</group> </group>
</page> </page>
...@@ -38,8 +37,8 @@ ...@@ -38,8 +37,8 @@
<div class="o_address_format"> <div class="o_address_format">
<field name="rue" placeholder="Rue..." class="o_address_street"/> <field name="rue" placeholder="Rue..." class="o_address_street"/>
<field name="rue2" placeholder="Rue 2..." class="o_address_street"/> <field name="rue2" placeholder="Rue 2..." class="o_address_street"/>
<field name="ville" placeholder="Ville" class="o_address_city"/>
<field name="code_postal" placeholder="Code postal" class="o_address_zip"/> <field name="code_postal" placeholder="Code postal" class="o_address_zip"/>
<field name="ville" placeholder="Ville" class="o_address_city"/>
</div> </div>
</page> </page>
<page string="Prescriptions techniques"> <page string="Prescriptions techniques">
...@@ -49,8 +48,7 @@ ...@@ -49,8 +48,7 @@
</page> </page>
<page string="Partenaires du client"> <page string="Partenaires du client">
<group> <group>
<field name="supplier_ids" widget="many2many_kanban" <field name="supplier_ids" widget="many2many_kanban" mode="kanban" options="{'no_create': True}"/>
mode="kanban"/>
</group> </group>
</page> </page>
<page string="Visite de chantier"> <page string="Visite de chantier">
...@@ -60,17 +58,8 @@ ...@@ -60,17 +58,8 @@
<field name="presentation_detaillee"/> <field name="presentation_detaillee"/>
</group> </group>
</page> </page>
</xpath> </xpath>
<!-- <notebook position="inside">
<page string="Contacts">
<group>
<field name="child_ids" mode="tree"/>
</group>
</page>
</notebook> -->
</field> </field>
</record> </record>
......
...@@ -6,23 +6,13 @@ ...@@ -6,23 +6,13 @@
<field name="model">res.partner</field> <field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/> <field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//notebook/page" position="before"> <xpath expr="//notebook/page" position="before">
<page string="Projets liés"> <page string="Projets liés">
<field name="opportunite"/> <field name="opportunite" readonly="1"/>
</page> </page>
</xpath> </xpath>
</field> </field>
</record> </record>
<!-- <record id="mvh_res_partner_search" model="ir.ui.view">
<field name="name">mvh.res.partner.search</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_res_partner_filter"/>
<field name="arch" type="xml">
</field>
</record> -->
</data> </data>
</odoo> </odoo>
\ No newline at end of file
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