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

Can you show the string of a selection field in Report Editor, or write it to another field?

S'inscrire

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

Cette question a été signalée
fieldopenofficeselection
1 Répondre
8753 Vues
Avatar
Laurens

Background information

I have used custom fields to set up the following.

I created a selection field in the Sales Order defined like this:

[('1','< half a day'),('2','> half a day'),('3','1 day'),('4','> 1 day'),('5',' 1,5 days'),('6','>1,5 days'),('7','+/- 2 days')]

I have also created a field in project.task which is set up like:

[('1','3 hours'),('2','6 hours'),('3','8 hours'),('4','10 hours'),('5','12 hours'),('6','14 hours'),('7','16 hours')]

This field will get copied over from the Sales Order to the project.task through the project_mrp module (Create Task on SO). Because the values are defined the same way, a field in the SO selected as "> half a day" can be converted to "3 hours" automatically under the tasks.

Actual question

I want to show my selection field on a custom report I created for the tasks. However if I just use "[[ o.x_worktime ]]" it will show the id value behind the string. E.g.: "1", "2", "3", ...

I want to show the string behind the id value on my print-out.

Can anyone tell me how I can show this string behind the value of this selection field with the Open Office Report Editor, if such a thing is possible?

Or how I can assign another field to take over the text-string of the selection field as it's value; so I can use this field for the report editor instead?

Update

I have created a many2one field under project.task, I have linked this many2one field under the tasks with a selection field under the Sales Order. Now I can show the many2one field on the project.task and print it out on my report. That part is covered. However, under the Sales Order - I still can't show the value of my selection field there.

I'd still be interested in a way to write the value of this selection field to another field, perhaps with an onchange function; or when the Sales Order gets confirmed (or preferably: saved) . Or is such a thing not possible, because the values aren't stored in the database?

1
Avatar
Ignorer
Avatar
Laurens
Auteur Meilleure réponse

Well it seems you can not show the string of a selection field on the report direclty, through the OpenOffice ReportEditor. To the best of my knowledge, and lacking any replies; I think it is not possible to copy the selection_field string_value to another field either.

I have "solved" my problem using two many2one fields. I needed to convert "< half a day", "> half a day" and other strings under the Sales Order to effective hours under project.task. What I've done is change the id values of the estimated-worktime strings to actual hour count.

In the OORE I added "Estimated work hours: [[ o.work_hours.id ]]". This will show the ID, which are editted manually to correspond with the actual hour count.

This way I can print both the name field (< half a day) and the id field (string "Estimated work: " + id number + string: "hours"). The only downside is the many2one field always shows the name field, rather than for instance code. But either way this solution is 90% of what I wanted to accomplish.

Example:

image description

1
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é
field visible as text for manager and dropdown for employee
field selection
Avatar
0
mars 15
4252
get Id in field selection
field selection
Avatar
Avatar
1
mars 15
9177
Is it possible to use a boolean field to show/hide certain text on a report?
field openoffice boolean
Avatar
Avatar
1
mars 15
6571
Create Menu dialog plus define selection items
xml field selection
Avatar
1
mars 15
4849
Selcetion Fields With Many2One RelationShip ?
field relationship selection
Avatar
Avatar
1
mars 15
4654
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