This question has been flagged

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?

Avatar
Discard
Best Answer

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>

Avatar
Discard
Best Answer

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

Avatar
Discard
Author Best Answer

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!

Avatar
Discard