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
    • Clothing Store
    • Furniture Store
    • Grocery Store
    • Hardware Store
    • Toy Store
    Food & Hospitality
    • Bar and Pub
    • Restaurant
    • Fast Food
    • Guest House
    • Beverage distributor
    • Hotel
    Real Estate
    • Real Estate Agency
    • Architecture Firm
    • Construction
    • Estate Managament
    • Gardening
    • Property Owner Association
    Consulting
    • Accounting Firm
    • Odoo Partner
    • Marketing Agency
    • Law firm
    • Talent Acquisition
    • Audit & Certification
    Producție
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Corporate Gifts
    Health & Fitness
    • Sports Club
    • Eyewear Store
    • Fitness Center
    • Wellness Practitioners
    • Pharmacy
    • Hair Salon
    Trades
    • Handyman
    • IT Hardware and Support
    • Solar Energy Systems
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Others
    • Nonprofit Organization
    • Environmental Agency
    • Billboard Rental
    • Photography
    • Bike Leasing
    • Software Reseller
    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

Remove blockTable from empty filter

Abonare

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

Această întrebare a fost marcată
v6.1openofficereporting
1 Răspunde
6858 Vizualizări
Imagine profil
Phil74

In OpenOffice Writer, how is it possible to remove a blockTable when a loop filter is empty.

In my sales quotation report, I have the following loop code that is meant to return all sale order lines that contain the word "sample":

repeatIn(filter(lambda x: "sample" in x.product_id.categ_id.complete_name,so.order_line),'o')

This works fine and with the addition of a formula o.name, it prints out all the requested lines.

I have put this code within a single table cell.

It works for as long as the condition is true, but if I have a sale order with absolutely no sample in any of the lines, then I get an error message saying the table cannot be empty.

So how is it possible to remove that table altogether, using the removeParentNode("blockTable") somewhere?

0
Imagine profil
Abandonează
Phil74
Autor

I actually over read Andreas' first solution. The logic works and it removes the blockTable when no order lines contain the word "sample".

But it prints the following out in the table that needs to be shown: [browse_record(sale.order.line, 96)]

I have tried to put an And '' before the or, but the table disappears again altogether, "sample" found or not.

Phil74
Autor

For some unknown to me reason, on my windows install I must generate the rml from OpenOfficeWriter and then send the report to the server (using the Ooo Writer functionality). Otherwise OpenERP points to the previous version of the rml file. Until I find the reason I can't edit the rml file manually. Amazingly enough, I use that rml file on my ubuntu server and I never had to send anything to the server...

Andreas Brueckl

You can try to use a tag/components which does not display the content. Or try to set the font color to white ...

Imagine profil
Andreas Brueckl
Cel mai bun răspuns

Try the following line:

[[ filter(lambda x: "sample" in x.product_id.categ_id.complete_name,so.order_line) or removeParentNode("BlockTable") ]]

Update:

If you put the line right after the starting <blockTable> tag, then the "browse(.." should not be displayed. I always edit the RML manually so I do not know whether this is possible in OpenOffice.

0
Imagine profil
Abandonează
Phil74
Autor

Tried that. It gets rid of the table regardless of the content, whether an order line contains sample or not.

Andreas Brueckl

I am not sure whether OpenERP is case-sensitive in this case, but it should by "blockTable" and not "BlockTable". Please also check the logfiles, whether there are any errors or warnings.

Phil74
Autor

My code actually states "blockTable" unlike my initial message which I have just edited. I believe the interpretation is case sensitive and I do respect this in my coding.

Andreas Brueckl

Whats about the log file?

Phil74
Autor

Running my development and testing openerp on windows, I have not managed to get a log file to be generated. Production db is on Ubuntu but that's beside the point...

Phil74
Autor

Managed to get the log file going, but it doesn't mention anything about an error occuring, only GET and POST lines.

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
Add days to time value in sales quotation
sales v6.1 openoffice reporting
Imagine profil
Imagine profil
1
mar. 15
7975
Reporting with WebKit? Rezolvat
v6.1 reporting
Imagine profil
Imagine profil
Imagine profil
Imagine profil
Imagine profil
5
mar. 15
21378
How to edit a web report with OpenOffice 3.3?
v6.1 openoffice
Imagine profil
Imagine profil
Imagine profil
2
mar. 15
6243
Where are the rml files cached?
v6.1 reporting
Imagine profil
Imagine profil
Imagine profil
2
mar. 15
9177
is it possible to create reports using openoffice calc?
openoffice reporting
Imagine profil
Imagine profil
1
mar. 15
8575
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