Se rendre au contenu
Odoo Menu
  • Se connecter
  • Essai gratuit
  • Applications
    Finance
    • Comptabilité
    • Facturation
    • Notes de frais
    • Feuilles de calcul (BI)
    • Documents
    • Signature
    Ventes
    • CRM
    • Ventes
    • PdV Boutique
    • PdV Restaurant
    • Abonnements
    • Location
    Sites web
    • Site Web
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Chaîne d'approvisionnement
    • Inventaire
    • Fabrication
    • PLM
    • Achats
    • Maintenance
    • Qualité
    Ressources Humaines
    • Employés
    • Recrutement
    • Congés
    • Évaluations
    • Recommandations
    • Parc automobile
    Marketing
    • Marketing Social
    • E-mail Marketing
    • SMS Marketing
    • Événements
    • Marketing Automation
    • Sondages
    Services
    • Projet
    • Feuilles de temps
    • Services sur Site
    • Assistance
    • Planification
    • Rendez-vous
    Productivité
    • Discussion
    • Validations
    • Internet des Objets
    • VoIP
    • Connaissances
    • WhatsApp
    Applications tierces Odoo Studio Plateforme Cloud d'Odoo
  • Industries
    Commerce de détail
    • Librairie
    • Magasin de vêtements
    • Magasin de meubles
    • Épicerie
    • Quincaillerie
    • Magasin de jouets
    Food & Hospitality
    • Bar et Pub
    • Restaurant
    • Fast-food
    • Maison d’hôtes
    • Distributeur de boissons
    • Hôtel
    Immobilier
    • Agence immobilière
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consultance
    • Cabinet d'expertise comptable
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Métal
    • Meubles
    • Alimentation
    • Brewery
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Trades
    • Bricoleur
    • Matériel informatique et support
    • Systèmes photovoltaïques
    • Cordonnier
    • Services de nettoyage
    • Services CVC
    Autres
    • Organisation à but non lucratif
    • Agence environnementale
    • Location de panneaux d'affichage
    • Photographie
    • Leasing de vélos
    • Revendeur de logiciel
    Browse all Industries
  • Communauté
    Apprenez
    • Tutoriels
    • Documentation
    • Certifications
    • Formation
    • Blog
    • Podcast
    Renforcer l'éducation
    • Programme éducatif
    • Business Game Scale-Up!
    • Rendez-nous visite
    Obtenir le logiciel
    • Téléchargement
    • Comparez les éditions
    • Versions
    Collaborer
    • Github
    • Forum
    • Événements
    • Traductions
    • Devenez partenaire
    • Services for Partners
    • Enregistrer votre cabinet comptable
    Nos Services
    • Trouver un partenaire
    • Trouver un comptable
    • Rencontrer un conseiller
    • Services de mise en œuvre
    • Références clients
    • Assistance
    • Mises à niveau
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obtenir une démonstration
  • Tarification
  • Aide

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilité
  • Inventaire
  • PoS
  • Projet
  • MRP
All apps
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Vous devez être inscrit pour interagir avec la communauté.
Toutes les publications Personnes Badges
Étiquettes (Voir toutl)
odoo accounting v14 pos v15
À propos de ce forum
Aide

How can I edit the calendar view? Note: not the form but the view of the calendar labels of the project module

S'inscrire

Recevez une notification lorsqu'il y a de l'activité sur ce poste

Cette question a été signalée
enterprisetaskcalendarview17.0
2 Réponses
1748 Vues
Avatar
www.fdc-corporation.com

Apart from just showing the name and time I want it to show more information 

The odoo is hosted on a vps and is v17 Enterprise, if anyone knows about the customization or maybe some documentation they have found.


0
Avatar
Ignorer
Avatar
D Enterprise
Meilleure réponse

Hi,

Add a Computed Display Field + Inherit the Calendar View

Create a new field in a custom module to compute the display label. 

from odoo import models, fields


class ProjectTask(models.Model):

    _inherit = 'project.task'


    calendar_label = fields.Char(

        string="Calendar Label",

        compute="_compute_calendar_label",

        store=False

    )


    def _compute_calendar_label(self):

        for task in self:

            priority = dict(self._fields['priority'].selection).get(task.priority, '')

            user = task.user_id.name or ''

            task.calendar_label = f"{task.name} [{priority}] - {user}"


Inherit the Calendar View

Now replace the default label ( name ) with your new computed field ( calendar_label ).


<odoo>

    <record id="project_task_calendar_custom" model="ir.ui.view">

        <field name="name">project.task.calendar.inherit</field>

        <field name="model">project.task</field>

        <field name="inherit_id" ref="project.view_task_calendar"/>

        <field name="arch" type="xml">

            <!-- Replace name field used as label -->

            <xpath expr="//field[@name='name']" position="replace">

                <field name="calendar_label"/>

            </xpath>

        </field>

    </record>

</odoo>


I hope it is of full use.

0
Avatar
Ignorer
Avatar
Cybrosys Techno Solutions Pvt.Ltd
Meilleure réponse

Hi,

Please refer to the code below:

Python:


class ProjectTask(models.Model):

    _inherit = 'project.task'


    custom_title = fields.Char(string="Custom Calendar Title",

                               compute="_compute_custom_title")


    def _compute_custom_title(self):

        """

        Compute the custom title for calendar view display.


        This method sets the `custom_title` field by combining the task's

        stage name and task name in the format: [Stage] Task Name.

        Example:

            If a task is in stage "In Progress" and named "Fix Bug",

            the computed custom_title will be "[In Progress] Fix Bug".

        """

        for task in self:

            task.custom_title = f"[{task.stage_id.name}] {task.name}"


XML:


<record id="view_task_calendar" model="ir.ui.view">

    <field name="name">project.task.view.calendar</field>

    <field name="model">project.task</field>

    <field name="inherit_id" ref="view_task_calendar"/>

    <field name="mode">primary</field>

    <field name="arch" type="xml">

        <xpath expr="//calendar" position="attributes">

            <attribute name="name">custom_title</attribute>

        </xpath>

    </field>

</record>


Hope it helps.

0
Avatar
Ignorer
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !

Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !

S'inscrire
Publications associées Réponses Vues Activité
Payment method in invoice Résolu
enterprise Payment-Methods 17.0
Avatar
Avatar
Avatar
3
sept. 25
6541
How to link to a task in the calendar view (from the project.task model)
task calendarview calendar_view
Avatar
Avatar
1
févr. 23
4181
Custom colors in task calendar view
task color calendarview
Avatar
0
sept. 20
4338
Missing menu and breadcrumb on project task opened from email
project community task 17.0
Avatar
0
oct. 24
1355
Optional Products not showing when adding product to cart
enterprise products webshop 17.0
Avatar
Avatar
Avatar
Avatar
3
sept. 24
3139
Communauté
  • Tutoriels
  • Documentation
  • Forum
Open Source
  • Téléchargement
  • Github
  • Runbot
  • Traductions
Services
  • Hébergement Odoo.sh
  • Assistance
  • Migration
  • Développements personnalisés
  • Éducation
  • Trouver un comptable
  • Trouver un partenaire
  • Devenez partenaire
À propos
  • Notre société
  • Actifs de la marque
  • Contactez-nous
  • Emplois
  • Événements
  • Podcast
  • Blog
  • Clients
  • Informations légales • Confidentialité
  • Sécurité.
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo est une suite d'applications open source couvrant tous les besoins de votre entreprise : CRM, eCommerce, Comptabilité, Inventaire, Point de Vente, Gestion de Projet, etc.

Le positionnement unique d'Odoo est d'être à la fois très facile à utiliser et totalement intégré.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now