Skip to Content
Odoo Menu
  • Prijavi
  • Try it free
  • Aplikacije
    Finance
    • Knjigovodstvo
    • Obračun
    • Stroški
    • Spreadsheet (BI)
    • Dokumenti
    • Podpisovanje
    Prodaja
    • CRM
    • Prodaja
    • POS Shop
    • POS Restaurant
    • Naročnine
    • Najem
    Spletne strani
    • Website Builder
    • Spletna trgovina
    • Blog
    • Forum
    • Pogovor v živo
    • eUčenje
    Dobavna veriga
    • Zaloga
    • Proizvodnja
    • PLM
    • Nabava
    • Vzdrževanje
    • Kakovost
    Kadri
    • Kadri
    • Kadrovanje
    • Odsotnost
    • Ocenjevanja
    • Priporočila
    • Vozni park
    Marketing
    • Družbeno Trženje
    • Email Marketing
    • SMS Marketing
    • Dogodki
    • Avtomatizacija trženja
    • Ankete
    Storitve
    • Projekt
    • Časovnice
    • Storitve na terenu
    • Služba za pomoč
    • Načrtovanje
    • Termini
    Produktivnost
    • Razprave
    • Odobritve
    • IoT
    • Voip
    • Znanje
    • WhatsApp
    Third party apps Odoo Studio Odoo Cloud Platform
  • Industrije
    Trgovina na drobno
    • Book Store
    • Trgovina z oblačili
    • Trgovina s pohištvom
    • Grocery Store
    • Trgovina s strojno opremo računalnikov
    • Trgovina z igračami
    Food & Hospitality
    • Bar and Pub
    • Restavracija
    • Hitra hrana
    • Guest House
    • Beverage Distributor
    • Hotel
    Nepremičnine
    • Real Estate Agency
    • Arhitekturno podjetje
    • Gradbeništvo
    • Estate Management
    • Vrtnarjenje
    • Združenje lastnikov nepremičnin
    Svetovanje
    • Računovodsko podjetje
    • Odoo Partner
    • Marketinška agencija
    • Law firm
    • Pridobivanje talentov
    • Audit & Certification
    Proizvodnja
    • Tekstil
    • Metal
    • Pohištvo
    • Hrana
    • Brewery
    • Poslovna darila
    Health & Fitness
    • Športni klub
    • Trgovina z očali
    • Fitnes center
    • Wellness Practitioners
    • Lekarna
    • Frizerski salon
    Trades
    • Handyman
    • IT Hardware & Support
    • Sistemi sončne energije
    • Izdelovalec čevljev
    • Čistilne storitve
    • HVAC Services
    Ostali
    • Neprofitna organizacija
    • Agencija za okolje
    • Najem oglasnih panojev
    • Fotografija
    • Najem koles
    • Prodajalec programske opreme
    Browse all Industries
  • Skupnost
    Learn
    • Tutorials
    • Dokumentacija
    • Certifikati
    • Šolanje
    • Blog
    • Podcast
    Empower Education
    • Education Program
    • Scale Up! Business Game
    • Visit Odoo
    Get the Software
    • Prenesi
    • Compare Editions
    • Releases
    Collaborate
    • Github
    • Forum
    • Dogodki
    • Prevodi
    • Become a Partner
    • Services for Partners
    • Register your Accounting Firm
    Get Services
    • Find a Partner
    • Find an Accountant
    • Meet an advisor
    • Implementation Services
    • Sklici kupca
    • Podpora
    • Upgrades
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Get a demo
  • Določanje cen
  • Pomoč

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

  • CRM
  • e-Commerce
  • Knjigovodstvo
  • Zaloga
  • PoS
  • Projekt
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Ključne besede (View all)
odoo accounting v14 pos v15
About this forum
Pomoč

How to hide units of measure in PDF reports?

Naroči se

Get notified when there's activity on this post

This question has been flagged
salesdebugpdf
3 Odgovori
607 Prikazi
Avatar
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
Avatar
Opusti
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.

Avatar
Jainesh Shah(Aktiv Software)
Best Answer

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
Avatar
Opusti
Avatar
Lorena
Avtor Best Answer

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

0
Avatar
Opusti
Lorena
Avtor

Codesphere Tech: Hello Lakhan Vachhani!

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

Avatar
Cybrosys Techno Solutions Pvt.Ltd
Best Answer

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
Avatar
Opusti
Enjoying the discussion? Don't just read, join in!

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

Prijavi
Related Posts Odgovori Prikazi Aktivnost
How to keep footer always at the bottom of the very last page in QWeb PDF report
sales debug pdf
Avatar
Avatar
Avatar
2
avg. 25
1290
adding custom field in quotation/invoice
sales pdf
Avatar
Avatar
1
nov. 25
431
Customizing the Quotation PDF: How to add a customer contact person on PDF sales order? Odoo 18.3
debug pdf
Avatar
Avatar
Avatar
3
sep. 25
911
Odoo 18 Quotation Builder Header/Footer Print Problem Solved
sales pdf
Avatar
Avatar
2
avg. 25
4488
Digital products
sales pdf
Avatar
Avatar
1
feb. 25
8066
Community
  • Tutorials
  • Dokumentacija
  • Forum
Open Source
  • Prenesi
  • Github
  • Runbot
  • Prevodi
Services
  • Odoo.sh Hosting
  • Podpora
  • Nadgradnja
  • Custom Developments
  • Izobraževanje
  • Find an Accountant
  • Find a Partner
  • Become a Partner
About us
  • Our company
  • Sredstva blagovne znamke
  • Kontakt
  • Zaposlitve
  • Dogodki
  • Podcast
  • Blog
  • Stranke
  • Pravno • Zasebnost
  • Varnost
الْعَرَبيّة 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 is a suite of open source business apps that cover all your company needs: CRM, eCommerce, accounting, inventory, point of sale, project management, etc.

Odoo's unique value proposition is to be at the same time very easy to use and fully integrated.

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