Skip to Content
Odoo Meniu
  • Autentificare
  • Try it free
  • Aplicații
    Finanțe
    • Contabilitate
    • Facturare
    • Cheltuieli
    • Spreadsheet (BI)
    • Documente
    • Semn
    Vânzări
    • CRM
    • Vânzări
    • POS Shop
    • POS Restaurant
    • Abonamente
    • Închiriere
    Site-uri web
    • Constructor de site-uri
    • eCommerce
    • Blog
    • Forum
    • Live Chat
    • eLearning
    Lanț Aprovizionare
    • Inventar
    • Producție
    • PLM
    • Achiziție
    • Maintenance
    • Calitate
    Resurse Umane
    • Angajați
    • Recrutare
    • Time Off
    • Evaluări
    • Referințe
    • Flotă
    Marketing
    • Social Marketing
    • Marketing prin email
    • SMS Marketing
    • Evenimente
    • Automatizare marketing
    • Sondaje
    Servicii
    • Proiect
    • Foi de pontaj
    • Servicii de teren
    • Centru de asistență
    • Planificare
    • Programări
    Productivitate
    • Discuss
    • Aprobări
    • IoT
    • VoIP
    • Knowledge
    • WhatsApp
    Aplicații Terțe Odoo Studio Platforma Odoo Cloud
  • Industrii
    Retail
    • Book Store
    • Magazin de îmbrăcăminte
    • Magazin de Mobilă
    • Magazin alimentar
    • Magazin de materiale de construcții
    • Magazin de jucării
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Distribuitor de băuturi
    • Hotel
    Proprietate imobiliara
    • Real Estate Agency
    • Firmă de Arhitectură
    • Construcție
    • Estate Managament
    • Grădinărit
    • Asociația Proprietarilor de Proprietăți
    Consultanta
    • Firma de Contabilitate
    • Partener Odoo
    • Agenție de marketing
    • Law firm
    • Atragere de talente
    • Audit & Certification
    Producție
    • Textil
    • Metal
    • Mobilier
    • Mâncare
    • Brewery
    • Cadouri corporate
    Health & Fitness
    • Club Sportiv
    • Magazin de ochelari
    • Centru de Fitness
    • Wellness Practitioners
    • Farmacie
    • Salon de coafură
    Trades
    • Handyman
    • IT Hardware and Support
    • Asigurare socială de stat
    • Cizmar
    • Servicii de curățenie
    • HVAC Services
    Altele
    • Organizație nonprofit
    • Agenție de Mediu
    • Închiriere panouri publicitare
    • Fotografie
    • Închiriere biciclete
    • Asigurare socială
    Browse all Industries
  • Comunitate
    Învăță
    • Tutorials
    • Documentație
    • Certificări
    • Instruire
    • Blog
    • Podcast
    Empower Education
    • Program Educațional
    • Scale Up! Business Game
    • Visit Odoo
    Obține Software-ul
    • Descărcare
    • Compară Edițiile
    • Lansări
    Colaborați
    • Github
    • Forum
    • Evenimente
    • Translations
    • Devino Partener
    • Services for Partners
    • Înregistrează-ți Firma de Contabilitate
    Obține Servicii
    • Găsește un Partener
    • Găsiți un contabil
    • Meet an advisor
    • Servicii de Implementare
    • Referințe ale clienților
    • Suport
    • Actualizări
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Obține un demo
  • Prețuri
  • Ajutor

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

  • CRM
  • e-Commerce
  • Contabilitate
  • Inventar
  • PoS
  • Proiect
  • MRP
All apps
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
All Posts Oameni Insigne
Etichete (View all)
odoo accounting v14 pos v15
Despre acest forum
Suport

How to hide units of measure in PDF reports?

Abonare

Primiți o notificare când există activitate la acestă postare

Această întrebare a fost marcată
salesdebugpdf
3 Răspunsuri
603 Vizualizări
Imagine profil
Lorena

I am new to Odoo, and working with 19 version.

I need to hide "Units" from the quantity column.

I tried making invisible the field over:

<field name="product_uom_id" groups="uom.group_uom" widget="many2one_uom" invisible="1"/> on sale.order.line.list 

<field name="product_uom_id" force_save="1" groups="uom.group_uom" widget="many2one_uom" readonly="product_uom_readonly" required="not display_type" invisible="1"/> on  sale.order.line.form.readonly


<span t-field="line.product_uom_id" invisible="1">units</span> on  report_saleorder_document 

Is there another viw that I am missing? Or is my xml coding incorrect?

0
Imagine profil
Abandonează
Codesphere Tech

Hello,
Specify the report name where you want to hide UOM.

Codesphere Tech

Hello,
Below is the line I found on the report_saleorder_document in Odoo 18..
<span t-field="line.product_uom">units</span>
Inherit the template and remove this line or hide..

Codesphere Tech

Hello, Lorena
invisible attributes works only in field level not in tags and if you have already inherited that template just replace the position with blank or remove the code.

Imagine profil
Jainesh Shah(Aktiv Software)
Cel mai bun răspuns

Hello Lorena,

 

If you want to hide the “Units of Measure” from the PDF report (for example, in the Sale Order report), you can do this easily by inheriting the specific QWeb report template and applying the d-none class using XPath with the position="attributes" directive.

 

Steps to Hide UoM in PDF Report

 

Inherit the report template and use XPath to add the Bootstrap d-none class to the UoM field.

 

Example Code:

<odoo>

<!-- Inherit the Sale Order PDF report -->

<template id="report_saleorder_document_inherit_hide_uom" inherit_id="sale.report_saleorder_document">


<!-- Hide only the UoM text (the span field) -->

<xpath expr="//span[@t-field='line.product_uom']" position="attributes">

<attribute name="class">d-none</attribute>

</xpath>

        </template>

</odoo>

 

If you have any questions, feel free to reach out.


Hope this helps!


Thanks & Regards,

Email : odoo@aktivsoftware.com

0
Imagine profil
Abandonează
Imagine profil
Lorena
Autor Cel mai bun răspuns

Codesphere Tech: I want to hide Units (not quantity) from quotation PDF reports.

0
Imagine profil
Abandonează
Lorena
Autor

Codesphere Tech: Hello Lakhan Vachhani!

I deleted the line and the magic happenned!! Thank you!!

Imagine profil
Cybrosys Techno Solutions Pvt.Ltd
Cel mai bun răspuns

Hi,


Try the following code,


1- Sale order line.


Override the tree view for sale.order.line and remove the UoM widget from the product_uom_qty field. Example:


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

    <field name="name">sale.order.line.tree.no.uom</field>

    <field name="model">sale.order.line</field>

    <field name="inherit_id" ref="sale.view_order_line_tree"/>

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

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

            <field name="product_uom_qty"/>

        </xpath>

    </field>

</record>


2- PDF report.


Simply remove or comment out the product_uom_id span, or replace it with just the quantity field:


<span t-field="line.product_uom_qty"/>


Hope it helps

0
Imagine profil
Abandonează
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Înscrie-te
Related Posts Răspunsuri Vizualizări Activitate
How to keep footer always at the bottom of the very last page in QWeb PDF report
sales debug pdf
Imagine profil
Imagine profil
Imagine profil
2
aug. 25
1289
adding custom field in quotation/invoice
sales pdf
Imagine profil
Imagine profil
1
nov. 25
431
Customizing the Quotation PDF: How to add a customer contact person on PDF sales order? Odoo 18.3
debug pdf
Imagine profil
Imagine profil
Imagine profil
3
sept. 25
908
Odoo 18 Quotation Builder Header/Footer Print Problem Rezolvat
sales pdf
Imagine profil
Imagine profil
2
aug. 25
4488
Digital products
sales pdf
Imagine profil
Imagine profil
1
feb. 25
8065
Comunitate
  • Tutorials
  • Documentație
  • Forum
Open Source
  • Descărcare
  • Github
  • Runbot
  • Translations
Servicii
  • Hosting Odoo.sh
  • Suport
  • Actualizare
  • Custom Developments
  • Educație
  • Găsiți un contabil
  • Găsește un Partener
  • Devino Partener
Despre Noi
  • Compania noastră
  • Active de marcă
  • Contactați-ne
  • Locuri de muncă
  • Evenimente
  • Podcast
  • Blog
  • Clienți
  • Aspecte juridice • Confidențialitate
  • Securitate
الْعَرَبيّة 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 este o suită de aplicații de afaceri open source care acoperă toate nevoile companiei dvs.: CRM, comerț electronic, contabilitate, inventar, punct de vânzare, management de proiect etc.

Propunerea de valoare unică a Odoo este să fie în același timp foarte ușor de utilizat și complet integrat.

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