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
    Restauration & Hôtellerie
    • 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
    • Brasserie
    • Cadeaux d'entreprise
    Santé & Fitness
    • Club de sports
    • Opticien
    • Salle de fitness
    • Praticiens bien-être
    • Pharmacie
    • Salon de coiffure
    Commerce
    • Bricoleur
    • Matériel informatique & 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
    Parcourir toutes les 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 pour partenaires
    • 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

Error in qweb report

S'inscrire

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

Cette question a été signalée
qweb12
5746 Vues
Avatar
Emil Dela Cruz

Basically, I have this error show up when I produce a custom qweb report.

Error to render compiling AST
AttributeError: 'NoneType' object has no attribute '_fields'
Template: web.external_layout_standard
Path: /templates/t/div[3]/div/div/span[3]
Node: <span t-field="o.user_id"/>

I don't have the "<span t-field="o.user_id"/> in my report template so perhaps I am looking at the wrong place. Can anybody help me please?

Report Template

<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <template id="report_consumption">
        <t t-call="web.html_container">
            <t t-call="web.external_layout">
                <div class="page">
                    <style>
                        .table thead tr th,
                        .table tbody tr td {
                            font-size: 0.8em;
                            text-align: right;
                            border-right: 1px solid #efefef;
                        }
                        .table thead tr th {
                            font-weight: bold;
                        }
                    </style>
                    <h2 style="text-align: center;">Stock Consumption Report</h2>
                    <h5 style="text-align: center;">Report Date: <strong><span t-esc="context_timestamp(datetime.datetime.now()).strftime('%Y-%m-%d %H:%M')"/></strong></h5>
                    <table class="table table-sm">
                        <thead>
                            <tr>
                                <th style="text-align: left;">Product Name</th>
                                <th style="text-align: left;">Category</th>
                                <th>Min Qty</th>
                                <th>Max Qty</th>
                                <th>Jan</th>
                                <th>Feb</th>
                                <th>Mar</th>
                                <th>Apr</th>
                                <th>May</th>
                                <th>Jun</th>
                                <th>Jul</th>
                                <th>Aug</th>
                                <th>Sep</th>
                                <th>Oct</th>
                                <th>Nov</th>
                                <th>Dec</th>
                                <th>Month Avg</th>
                                <th>On-Hand Qty</th>
                                <th>Forecast Qty</th>
                                <th>Months Available</th>
                            </tr>
                        </thead>
                        <tbody>
                        <t t-foreach="docs" t-as="o">
                            <tr>
                                <td style="text-align: left;"><span t-field="o.name"/></td>
                                <td style="text-align: left;"><span t-field="o.categ_id"/></td>
                                <td><span t-field="o.min_qty" t-options='{"widget": "float", "precision": 0}'/></td>
                                <td><span t-field="o.max_qty" t-options='{"widget": "float", "precision": 0}'/></td>
                                <td><span t-field="o.jan"/></td>
                                <td><span t-field="o.feb"/></td>
                                <td><span t-field="o.mar"/></td>
                                <td><span t-field="o.apr"/></td>
                                <td><span t-field="o.may"/></td>
                                <td><span t-field="o.jun"/></td>
                                <td><span t-field="o.jul"/></td>
                                <td><span t-field="o.aug"/></td>
                                <td><span t-field="o.sep"/></td>
                                <td><span t-field="o.oct"/></td>
                                <td><span t-field="o.nov"/></td>
                                <td><span t-field="o.dec"/></td>
                                <td><span t-field="o.month_avg" t-options='{"widget": "float", "precision": 0}'/></td>
                                <td><span t-field="o.on_hand" t-options='{"widget": "integer"}'/></td>
                                <td><span t-field="o.on_hand_virtual" t-options='{"widget": "integer"}'/></td>
                                <td><span t-field="o.avail_stock" t-options='{"widget": "float", "precision": 2}'/></td>
                            </tr>
                        </t>
                        </tbody>
                    </table>
                </div>
            </t>
        </t>
    </template>
</odoo>

Report Declaration

<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <report
            id="action_report_stock_consumption"
            model="stock.consumption"
            string="Stock Consumption"
            report_type="qweb-pdf"
            name="stock_consumption.report_consumption"
            file="stock_consumption.report_consumption"
            print_report_name="Stock Consumption Report"
        />
    </data>
</odoo>


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é
Odoo 18: Display image from char field containing url in qweb form
qweb
Avatar
Avatar
1
juil. 25
3249
PDF Export Option for QWeb Reports in odoo 17.0
qweb
Avatar
Avatar
1
mai 25
4225
QWeb: use t-if to check birthday date Résolu
qweb
Avatar
Avatar
1
avr. 25
3454
Odoo 17 - QWeb Reports with External Datasource Résolu
qweb
Avatar
Avatar
1
févr. 25
2869
Tree line field shrinked/cut
qweb
Avatar
0
oct. 24
2325
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