Skip to content
Extraits de code Groupes Projets
Valider 996f862b rédigé par Nicolas Burel's avatar Nicolas Burel
Parcourir les fichiers

ajout pages notebook et lien res.partner

parent 128e93f1
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Affichage de
avec 169 ajouts et 191 suppressions
# -*- coding: utf-8 -*-
from . import controllers
from . import models
......@@ -5,10 +5,10 @@
'website': "https://www.le-filament.com",
'version': '12.0.1.0.1',
'license': "AGPL-3",
'depends': ['contacts', 'crm', 'partner_firstname','sale_crm'],
'depends': ['contacts', 'crm', 'partner_firstname'],
'data': [
'views/mvh_crm_view.xml',
'data/mvh_stage_crm.xml'
'views/crm_lead_view.xml',
'views/res_partner_view.xml'
],
}
# -*- coding: utf-8 -*-
from . import controllers
\ No newline at end of file
Fichier supprimé
Fichier supprimé
# -*- coding: utf-8 -*-
from odoo import http
# class MvhCrm(http.Controller):
# @http.route('/mvh_crm/mvh_crm/', auth='public')
# def index(self, **kw):
# return "Hello, world"
# @http.route('/mvh_crm/mvh_crm/objects/', auth='public')
# def list(self, **kw):
# return http.request.render('mvh_crm.listing', {
# 'root': '/mvh_crm/mvh_crm',
# 'objects': http.request.env['mvh_crm.mvh_crm'].search([]),
# })
# @http.route('/mvh_crm/mvh_crm/objects/<model("mvh_crm.mvh_crm"):obj>/', auth='public')
# def object(self, obj, **kw):
# return http.request.render('mvh_crm.object', {
# 'object': obj
# })
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data noupdate="1">
<record model="crm.stage" id="stage_chiffrage">
<field name="name">Chiffrage</field>
<field name="on_change">1</field>
<field name="sequence">2</field>
<field name="fold">True</field>
</record>
<record model="crm.stage" id="stage_chiffree">
<field name="name">Chiffrée</field>
<field name="on_change">1</field>
<field name="sequence">3</field>
<field name="fold">True</field>
</record>
<record model="crm.stage" id="stage_negociation">
<field name="name">Négociation</field>
<field name="on_change">1</field>
<field name="sequence">6</field>
<field name="fold">True</field>
</record>
<record model="crm.stage" id="stage_perdu">
<field name="name">Perdu</field>
<field name="on_change">1</field>
<field name="sequence">8</field>
<field name="fold">True</field>
</record>
</data>
</odoo>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record model="crm.stage" id="stage_lead5">
<field name="name">Visite faite</field>
<field name="probability">10</field>
<field name="on_change">1</field>
<field name="sequence">1</field>
</record>
</odoo>
\ No newline at end of file
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * mvh_crm
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 12.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2020-05-06 06:41+0000\n"
"PO-Revision-Date: 2020-05-06 06:41+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: mvh_crm
#: model_terms:ir.ui.view,arch_db:mvh_crm.mvh_crm_view_form
msgid "Budget"
msgstr ""
#. module: mvh_crm
#: model:crm.stage,name:mvh_crm.stage_chiffrage
msgid "Chiffrage"
msgstr ""
#. module: mvh_crm
#: model:crm.stage,name:mvh_crm.stage_chiffree
msgid "Chiffrée"
msgstr ""
#. module: mvh_crm
#: model:ir.model,name:mvh_crm.model_res_partner
msgid "Contact"
msgstr ""
#. module: mvh_crm
#: model:ir.model.fields,field_description:mvh_crm.field_crm_lead__child_ids
#: model_terms:ir.ui.view,arch_db:mvh_crm.mvh_crm_view_form
msgid "Contacts"
msgstr ""
#. module: mvh_crm
#: model:ir.model.fields,field_description:mvh_crm.field_res_partner__crm_id
#: model:ir.model.fields,field_description:mvh_crm.field_res_users__crm_id
msgid "Crm"
msgstr ""
#. module: mvh_crm
#: model:crm.stage,name:mvh_crm.stage_gagne
msgid "Gagné"
msgstr ""
#. module: mvh_crm
#: model:ir.model,name:mvh_crm.model_crm_lead
msgid "Lead/Opportunity"
msgstr ""
#. module: mvh_crm
#: model:crm.stage,name:mvh_crm.stage_nouveau
msgid "Nouveau"
msgstr ""
#. module: mvh_crm
#: model:crm.stage,name:mvh_crm.stage_negociation
msgid "Négociation"
msgstr ""
#. module: mvh_crm
#: model:crm.stage,name:mvh_crm.stage_perdu
msgid "Perdu"
msgstr ""
#. module: mvh_crm
#: model:crm.stage,name:mvh_crm.stage_visite_faite
msgid "Visite faite"
msgstr ""
#. module: mvh_crm
#: model:crm.stage,name:mvh_crm.stage_visite_a_faire
msgid "Visite à faire"
msgstr ""
# -*- coding: utf-8 -*-
from . import mvh_crm_lead
from . import crm_lead
from . import res_partner
Aucun aperçu pour ce type de fichier
Fichier ajouté
Aucun aperçu pour ce type de fichier
Aucun aperçu pour ce type de fichier
# Copyright 2019 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields
class CRMleadMVH(models.Model):
_inherit = 'crm.lead'
# Critères du début Go/NoGo
budget = fields.Float(string="Budget au m²")
eco_responsable = fields.Selection([('yes', 'Oui'), ('no', 'Non')],
string='Eco-responsable')
elements_metriques = fields.Text(string="Eléments métriques")
lieu = fields.Char(string="Lieu")
propriete = fields.Text(string="Propriété")
renovation_neuf = fields.Selection([('renovation', 'Rénovation'),
('neuf', 'Neuf')],
string="Projet")
visite_payante = fields.Selection([('yes', 'Oui'), ('no', 'Non')],
string='Visite payante')
envie_achat = fields.Selection([('yes', 'Oui'), ('no', 'Non')],
string="Envie d'achat")
presence_plan = fields.Selection([('yes', 'Oui'), ('no', 'Non')],
string="Plan")
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
rue = fields.Char('Rue')
rue2 = fields.Char('Rue2')
code_postal = fields.Char('Code postal', change_default=True)
ville = fields.Char('Ville')
# Prescription technique
prescription_technique = fields.Text(string="Prescriptions techniques")
# Partenaires projet
supplier_ids = fields.Many2many('res.partner',
string="Architecte et fournisseurs")
# Visite de chantier
description_technique = fields.Text(string="Description technique",
track_visibility='onchange')
reflexion_technique = fields.Text(string="Reflexion technique",
track_visibility='onchange')
presentation_detaillee = fields.Text(string="Présentation détaillée",
track_visibility='onchange')
# Copyright 2019 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields, api
class CRMleadMVH(models.Model):
_inherit = 'crm.lead'
# Liste des contacts
child_ids = fields.One2many(
'res.partner', 'crm_id',
string='Contacts')
elements_metriques = fields.Text(string="Eléments métriques")
lieu =fields.Char(string="Lieu")
propriete=fields.Text(string="Propriété")
visite_payante =fields.Selection([('yes', 'Oui'), ('no', 'Non')], string='Visite payante')
prescription_technique = fields.Text(string="Prescription technique")
# Afficher seulement quand tâche >= visite faite
description_technique = fields.Text(string="Description technique")
reflexion_technique = fields.Text(string="Reflexion technique")
presentation_detaillee = fields.Text(string="Présentation détaillée")
# checklist_chiffrage = fields.One2many()
# checklist_administratif = fields.One2many()
# Afficher seulement quand tâche = gagné
raison_gain = fields.Text()
# Afficher seulement quand tâche = perdu
raison_perte =fields.Text()
\ No newline at end of file
......@@ -2,9 +2,10 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields, api
from odoo import models, fields
class res_partner_MVH(models.Model):
_inherit = 'res.partner'
crm_id = fields.Many2one('crm.lead')
\ No newline at end of file
opportunite = fields.Many2many('crm.lead')
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_mvh_crm_mvh_crm,mvh_crm.mvh_crm,model_mvh_crm_mvh_crm,,1,0,0,0
\ No newline at end of file
......@@ -11,63 +11,65 @@
<attribute name="invisible">True</attribute>
</field>
<!-- Modification expected revenue et probability -->
<field name="probability" position="attributes">
<attribute name="invisible">True</attribute>
</field>
<xpath expr="//div[hasclass('col')][2]" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
<xpath expr="//span[hasclass('oe_grey')]" position="attributes">
<attribute name="invisible">True</attribute>
</xpath>
<label for="planned_revenue" position="replace">
<label string="Budget" for="planned_revenue" />
</label>
<field name="date_deadline" position="replace">
<field name="elements_metriques"/>
<field name="lieu"/>
<field name="propriete"/>
</field>
<field name="priority" position="replace">
<field name="visite_payante" widget="radio" options="{'horizontal': true}"/>
</field>
<field name="tag_ids" position="replace">
<field name="prescription_technique"/>
</field>
<xpath expr="//page[1]" position="attributes">
<attribute name="string">Descriptif court</attribute>
</xpath>
<!-- Ici on veut que s'affichent description, reflexion technique et présentation détaillée seulement à partir du stage "visite faite", et on veut que raison gain et raison perte s'affichent uniquement dans les stages correspondants -->
<xpath expr="//notebook/page" position="before">
<page attrs="{'invisible': ['|', ('stage_id', '=', 'crm.stage_lead1'), ('stage_id', '=', 'crm.stage_lead2')]}" string="Description technique" >
<field name="description_technique"/>
<xpath expr="//notebook/page[2]" position="before">
<page string="Critères Go-NoGo">
<group>
<group string="Infos générales">
<field name="budget"/>
<field name="eco_responsable" widget="radio" options="{'horizontal': true}"/>
<field name="renovation_neuf" widget="radio" options="{'horizontal': true}"/>
<field name="visite_payante" widget="radio" options="{'horizontal': true}"/>
</group>
<group string="Statut du projet">
<field name="envie_achat" widget="radio" options="{'horizontal': true}"/>
<field name="presence_plan" widget="radio" options="{'horizontal': true}"/>
<field name="presence_planning" widget="radio" options="{'horizontal': true}"/>
<field name="presence_permis" widget="radio" options="{'horizontal': true}"/>
<field name="presence_etude" widget="radio" options="{'horizontal': true}"/>
</group>
</group>
</page>
<page attrs="{'invisible': ['|', ('stage_id', '=', 'crm.stage_lead1'), ('stage_id', '=', 'crm.stage_lead2')]}" string="Réflexion technique" >
<field name="reflexion_technique"/>
<page string="Adresse du chantier">
<div class="o_address_format">
<field name="rue" placeholder="Rue..." 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"/>
</div>
</page>
<page attrs="{'invisible': ['|', ('stage_id', '=', 'crm.stage_lead1'), ('stage_id', '=', 'crm.stage_lead2')]}" string="Présentation détaillée" >
<field name="presentation_detaillee"/>
<page string="Prescriptions techniques">
<group>
<field name="prescription_technique"/>
</group>
</page>
<page attrs="{'invisible': [('stage_id', '!=', ' mvh_crm.stage_gagne')]}" string="Raison gain" >
<field name="raison_gain"/>
<page string="Partenaires du client">
<group>
<field name="supplier_ids" widget="many2many_kanban"
mode="kanban"/>
</group>
</page>
<page attrs="{'invisible': [('stage_id', '!=', 'mvh_crm.stage_perdu')]}" string="Raison perte" >
<field name="raison_perte"/>
<page string="Visite de chantier">
<group>
<field name="description_technique"/>
<field name="reflexion_technique"/>
<field name="presentation_detaillee"/>
</group>
</page>
</xpath>
<notebook position="inside">
<!-- <notebook position="inside">
<page string="Contacts">
<group>
<field name="child_ids" mode="tree"/>
</group>
</page>
</notebook>
</notebook> -->
</field>
</record>
......
<odoo>
<data>
<record id="mvh_res_partner_form" model="ir.ui.view">
<field name="name">mvh.partner.view.form</field>
<field name="model">res.partner</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<xpath expr="//notebook/page" position="before">
<page string="Projets liés">
<field name="opportunite"/>
</page>
</xpath>
</field>
</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>
</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