Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

How to hide attribute values in invoice report?

By
Tim
on 3/19/15, 1:59 AM 1,142 views

Hi, I would like to hide attribute values (variants) in brackets in the invoice report. Customers don't need to know all the detail of parts that I'm repairing with their products. These attribute are important to me in the Odoo system but not for customer. I want to make invoice look nice and simple for customers. They only need to know the name of products, not all the details.

For example, right now my invoice report look like this,


Item 1 (colour1, type1, size3)    price1    tax1    total1

Item 2 (colour4, type4, size4)    price2    tax2    total2


I would like the invoice report to look like this,


Item 1    price1    tax1    total1

Item 2    price2    tax2    total2


It's much easier and clearer to read the invoice without all the attributes.

Is it possible to hide these attributes in the invoice report? If so, how?

1

Jérémy Kersten (jke)

--Jérémy Kersten (jke)--
2983
| 3 2 5
Jodoigne, Belgium
--Jérémy Kersten (jke)--

Jérémy is a member of the core R&D team since september 2013. He developed several projects for OpenERP version 8 including the eCommerce, the Google Calendar synchronization and the new product variants/configurator. Now, he manages Odoo website and themes for saas.

Jérémy Kersten (jke)
On 3/21/15, 4:36 PM

Hello,

You can create an inherit view to override this field... (without python code)

Settings -> Technical -> User interface -> Views -> create


Eg:



<xpath expr="//tbody[@class='invoice_tbody']/tr/td/span[@t-field='l.name']" position="replace">
<!-- COMMENT : replace full product name by short name -->
<span t-field="l.product_id.name"/>
</xpath>

0

zbik

--zbik--
5941
| 6 4 7
Lodz, Poland
--zbik--


zbik
On 3/19/15, 3:20 AM

Two solutions:

  1. When you edit the contents of an invoice, you can change the Description field in line, how you like.

  2. Find and remove substring (colour1, type1, size3) from line name in report

0
Tim
On 3/19/15, 7:52 PM

Thanks zbik, true, I could edit the description. I thought there would be a way to hide the attributes permanently without having to edit the description all the time.

I could dig in the codes to remove the substring but I am not a programmer and don't have time for this. I believe Odoo should lets user to enable or disable various options instead of coding. This will attract more users to Odoo!

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 3/19/15, 1:59 AM
Seen: 1142 times
Last updated: 3/28/15, 9:43 AM