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 to add a couple of fields in a report via new module

S'inscrire

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

Cette question a été signalée
modulexmlqwebreportodooV8
1 Répondre
5786 Vues
Avatar
E.M.

I am looking to modify report_picking adding this:

                                <div class="col-xs-6">
<div><span>Transportista: </span><span t-field="o.carrier_id"/></div>
<div><span>Seguimiento: </span><span t-field="o.carrier_tracking_ref"/></div>
</div>


To the original report, so the final code is as follows:

<?xml version="1.0"?>
<t t-name="stock.report_picking">
<t t-call="report.html_container">
<t t-foreach="docs" t-as="o">
<t t-call="report.external_layout">
<div class="page">
<div class="row"><div class="col-xs-4 pull-right">
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', o.name, 600, 100)" style="width:300px;height:50px;"/>
</div></div>
<div class="row">
<div class="col-xs-6">
<div t-if="o.picking_type_id.code=='incoming' and o.partner_id">
<span><strong>Supplier Address:</strong></span>
</div>
<div t-if="o.picking_type_id.code=='internal' and o.partner_id">
<span><strong>Warehouse Address:</strong></span>
</div>
<div t-if="o.picking_type_id.code=='outgoing' and o.partner_id">
<span><strong>Customer Address:</strong></span>
</div>
</div>
<div class="col-xs-6">
<div>
<div><strong>Envío:</strong></div>
</div>
</div>
</div>
<div class="row">
<div class="col-xs-6">
<div t-if="o.partner_id" name="partner_header">
<div t-field="o.partner_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;, &quot;phone&quot;, &quot;fax&quot;], &quot;no_marker&quot;: true}"/>
<p t-if="o.partner_id.vat">VAT: <span t-field="o.partner_id.vat"/></p>
</div>
</div>
<div class="col-xs-5 col-xs-offset-1">
<div t-if="o.move_lines and o.move_lines[0].partner_id and o.move_lines[0].partner_id.id != o.partner_id.id">
<span><strong>Delivery Address:</strong></span>
<div t-field="o.move_lines[0].partner_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;, &quot;phone&quot;, &quot;fax&quot;], &quot;no_marker&quot;: true}"/>
</div>
<div t-if="o.picking_type_id.code != 'internal' and (not o.move_lines or not o.move_lines[0].partner_id) and o.picking_type_id.warehouse_id.partner_id">
<span><strong>Warehouse Address:</strong></span>
<div t-field="o.picking_type_id.warehouse_id.partner_id" t-field-options="{&quot;widget&quot;: &quot;contact&quot;, &quot;fields&quot;: [&quot;address&quot;, &quot;name&quot;, &quot;phone&quot;, &quot;fax&quot;], &quot;no_marker&quot;: true}"/>
</div>
</div>
<div class="col-xs-6">
<div><span>Transportista: </span><span t-field="o.carrier_id"/></div>
<div><span>Seguimiento: </span><span t-field="o.carrier_tracking_ref"/></div>
</div>

</div>
<h2>
<span t-field="o.picking_type_id"/>:
<span t-field="o.name"/>
</h2>
<table class="table table-condensed">
<thead>
<tr>
<th><strong>Order (Origin)</strong></th>
<th><strong>State</strong></th>
<th><strong>Commitment Date</strong></th>
<th name="td_sched_date_h"><strong>Scheduled Date</strong></th>
</tr>
</thead>
<tbody>
<tr>
<td>
<span t-field="o.origin"/>
</td>
<td>
<span t-field="o.state"/>
</td>
<td>
<span t-field="o.date"/>
</td>
<td name="td_sched_date">
<span t-field="o.min_date"/>
</td>
</tr>
</tbody>
</table>
<br/>
<br/>
<table class="table table-condensed" t-if="not o.pack_operation_ids">
<thead>
<tr>
<th><strong>Product</strong></th>
<th class="text-right"><strong>Quantity</strong></th>
<t t-if="o.picking_type_id.code != 'incoming'"><th><strong>Source</strong></th></t>
<th><strong>Barcode</strong></th>
<t t-if="o.picking_type_id.code != 'outgoing'"><th><strong>Destination</strong></th></t>
</tr>
</thead>
<tbody>
<tr t-foreach="o.move_lines" t-as="move">
<t t-if="(o.state != 'partially_available') or (move.reserved_availability &gt; 0)">
<td><span t-field="move.product_id"/></td>
<td class="text-right">
<t t-if="o.state == 'partially_available'">
<span t-field="move.reserved_availability"/> <span t-field="move.product_id.uom_id" groups="product.group_uom"/>
</t>
<t t-if="o.state != 'partially_available'">
<span t-field="move.product_uom_qty"/> <span t-field="move.product_uom" groups="product.group_uom"/>
</t>
</td>
<t t-if="o.picking_type_id.code != 'incoming'"><td><span t-field="move.location_id"/></td></t>
<td>
<span t-if="move.product_id and move.product_id.ean13">
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('EAN13', move.product_id.ean13, 600, 100)" style="width:300px;height:50px"/>
</span>
</td>
<t t-if="o.picking_type_id.code != 'outgoing'"><td><span t-field="move.location_dest_id"/></td></t>
</t>
</tr>
</tbody>
</table>
<table class="table table-condensed" t-if="o.pack_operation_ids">
<thead>
<tr>
<th><strong>Product</strong></th>
<th class="text-right"><strong>Quantity</strong></th>
<t t-if="o.picking_type_id.code != 'incoming'"><th><strong>Source</strong></th></t>
<th><strong>Barcode</strong></th>
<t t-if="o.picking_type_id.code != 'outgoing'"><th><strong>Destination</strong></th></t>
</tr>
</thead>
<tbody>
<tr t-foreach="o.pack_operation_ids" t-as="pack_operation">
<td><span t-field="pack_operation.product_id"/>
<t t-if="not pack_operation.product_id and pack_operation.package_id"><span t-field="pack_operation.package_id"/></t></td>
<td class="text-right"><span t-field="pack_operation.product_qty"/> <span t-field="pack_operation.product_uom_id" groups="product.group_uom"/></td>
<t t-if="o.picking_type_id.code != 'incoming'"><td><span t-field="pack_operation.location_id"/>
<span t-if="pack_operation.package_id">:</span>
<span t-field="pack_operation.package_id"/>
<span t-if="pack_operation.lot_id">:</span>
<span t-field="pack_operation.lot_id"/>
</td>
</t>
<td>
<span t-if="pack_operation.lot_id">
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', pack_operation.lot_id.name, 600, 100)" style="width:300px;height:50px"/>
</span>
<span t-if="pack_operation.product_id and not pack_operation.lot_id and pack_operation.product_id.ean13">
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('EAN13', pack_operation.product_id.ean13, 600, 100)" style="width:300px;height:50px"/>
</span>
<span t-if="pack_operation.package_id and not pack_operation.product_id">
<img t-att-src="'/report/barcode/?type=%s&amp;value=%s&amp;width=%s&amp;height=%s' % ('Code128', pack_operation.package_id.name, 600, 100)" style="width:300px;height:50px"/>
</span>
</td>
<t t-if="o.picking_type_id.code != 'outgoing'"><td><span t-field="pack_operation.location_dest_id"/>
<span t-if="pack_operation.result_package_id">:</span>
<span t-field="pack_operation.result_package_id"/>
</td></t>
</tr>
</tbody>
</table>
</div>
</t>
</t>
</t>
</t>


How can I add those two lines in a module? (using the GUI is straightforward).

0
Avatar
Ignorer
Avatar
Julius Petraška
Meilleure réponse

Please look at this part of documentation:

https://www.odoo.com/documentation/8.0/howtos/backend.html#view-inheritance


It should help you. But if it is not a solution for you and you want to do it through user interface check this one:

http://maheshwarimayur.blogspot.com/2013/02/how-to-add-new-field-on-any-object-in.html

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é
Is it possible to include client_order_ref in a picking report? Résolu
xml qweb picking report odooV8
Avatar
Avatar
Avatar
3
juil. 23
7985
Is it possible to make a <div> block appear at the bottom of the page in a QWeb PDF report?
pdf xml qweb report odooV8
Avatar
0
oct. 21
5858
Replacing default sale order / quote PDF report in XML, something wrong as I get duplicated entries.
xml qweb report sale.order odooV8
Avatar
0
sept. 15
6344
How to restrict user to save print report in their local system?
qweb report odooV8
Avatar
0
déc. 17
4397
How to dynamically change report Name odoo v8
qweb report odooV8
Avatar
Avatar
1
sept. 17
5875
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