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
    • Guest House
    • Distributeur de boissons
    • Hotel
    Real Estate
    • Real Estate Agency
    • Cabinet d'architecture
    • Construction
    • Gestion immobilière
    • Jardinage
    • Association de copropriétaires
    Consulting
    • Accounting Firm
    • Partenaire Odoo
    • Agence Marketing
    • Cabinet d'avocats
    • Aquisition de talents
    • Audit & Certification
    Fabrication
    • Textile
    • Metal
    • Furnitures
    • Food
    • 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
    • Solar Energy Systems
    • Cordonnier
    • Services de nettoyage
    • HVAC Services
    Others
    • Nonprofit Organization
    • 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 to get one2many / many2one field in report - Odoo11 Enterprise

S'inscrire

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

Cette question a été signalée
domainone2manyodoo11
4 Réponses
8712 Vues
Avatar
Rodrigo Robles

Hello, I'm using Google Spreadsheet integration to export reports to Google Drive from Odoo 11 Enterprise.

The way the reports works is taking fields from a model depending on the domain we declare.

The thing is that I need to get one2many or many2one fields in this report:

For example, if I call the field product_id for a quotation, it will return the first line from the Quotation but not others; also, I think it's not possible to call fields like this "product_id.id".

I wish to know if someone knows a way to do this, or a way to add a field that can be called in reports adding a new field like all_products containing -> product1, product2, etc.

Thanks beforehand.

Rodrigo

0
Avatar
Ignorer
Avatar
Que Nguyen
Meilleure réponse

There is a work-around to archive this. You need to get field order_line from sale.order model, result is a string list of order_line ids (eg. "101,102,103"). Create another sheet tab to oe_browse from model sale.order.line, including field "id" in your query. Now you can do some spreadsheet command stuff (split, vlookup,...) to link those 2 sheet based on the id of order line.

0
Avatar
Ignorer
Avatar
Niyas Raphy (Walnut Software Solutions)
Meilleure réponse

Hi,

For calling and printing the one2many or many2many fields, you have to iterate them over a for loop as there is chance/case of having multiple records in it. You might not have used or given for loop, which may result in singleton error.

You can see an example case of printing the one2many fields in report here, see this: Printing One2many fields in report

Thanks

0
Avatar
Ignorer
Rodrigo Robles
Auteur

Very informative thanks. but it isn't what im looking for.

I'm new to Odoo & Python, so i'll try to explain it the best way I can.

I'm looking to get the products associated to a Quotation, Saler Order, Subscription, etc. in Google Spreadsheet module.

What I need is to be able to export something like this:

i.e. from CRM module -> for each quotation get all orders lines and link them.

Thanks & sorry for my english

Niyas Raphy (Walnut Software Solutions)

Hi,

if you have an object of the sale order in your hand, suppose sale.order(1) , then if you need to get the products in the sale order line, if you are in python,

for product in sale_order.order_line:

print("product", product) .

you can try something like this

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é
One2many domain on the selection Résolu
domain one2many selection odoo11
Avatar
Avatar
Avatar
5
juil. 22
6676
how can use output of function in domain of field? Résolu
domain odoo11
Avatar
Avatar
Avatar
2
juil. 24
8587
Set default value for one of the one2many field - Odoo 11 Résolu
one2many odoo11
Avatar
Avatar
1
janv. 22
19285
how to add a one2many field in a form by a button click - odoo 11
one2many odoo11
Avatar
Avatar
3
juil. 19
6121
Update many2one field domain with respect to onchange of selection field in another model. Is it possible ?
domain odoo11
Avatar
Avatar
1
juil. 18
10205
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