Take away long description

Hello,
4.0.3

I would like to take away the long product description when printing some documents. I actually only want it on the price offers; not on invoices or orders or transport documents of any kind. Can anyone suggest how to arrange that? I’ve tried but only manged to take away all descriptions inclusive

It would be perfect if I could create a click button so I could choose for each occation if to print it out or not. Anyone any suggestin for that? If this is not possible then just to take it away permenantly for certain pdf docs.

All the best

Hans

Do you have a screenshot of the description problem?

Hi,

Thank you for engaging ! Screen shot, I don’t know, I could send a document but I’ll try to explain what I want. I use a French Dolibarr so I hope I give you the correct expressions in English.

I start to understand that I took the wrong turn when addressing the problem. It is of course a matter of creating a new modified PDF. I use the standard PDF pdf_muscadet.modules.php and I would like to make a modified copy where I only print out the product Reference and Label but not the long Description.

When creating a product you give it a Reference (maybe 1763254-45) Then you give it a short name, or Label (maybe Volvo V70 D5 Sedan) then finally you add a Description that can be as long as you want where you put all details about this product.

So on the modified copy of pdf_muscadet.modules.php I just would like to print the Reference and the Label, in the exemple above it would be: 1763254-45 Volvo V70 D5 Sedan

So that is what I would be happy to be helped with; an explanation about how to change the code to achive this.

Have a good day

Hans

You just need to hide the description…

Go to: Setup > PDF

1 Like

Hi

Thanks, but that will hide on all documents I suppose? I just want to hide the descriptions on certain documents. For the moment I just want to hide it on purchase order (muscadet) but later also on client invoices.

There are 2 types of delivery notes, printed with “merou” and “roguet”. “roguet” show the description and “merou” does not. I can’t figure out how the code is built up so I could copy that to a variation of purchase order “muscadet”.

All the best

Hans

I think there is a hidden setting for the description to be displayed onscreen only but I am not sure about between types of PDF generated sorry.

Thanks anyhow.

Hans

Long time no see !

I’ve found a solution that works just fine. The module Jalons handle this well on per document basis. But there is an other solution if you want do hide the description in just the purchase order.

PDF_HIDE_PRODUCT_REF_IN_SUPPLIER_LINES and set the value to 1

Setup Other

Hans

2 Likes

Hello use the following global parameter:
MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_string

Substitute string for the document in which you want this behaviour. For instance in Supplier Invoices it would be:
MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_INVOICE_SUPPLIER

Hope this helps.

Hi

Thanks, will try it. I’ve asked for a fuction to controll this on per document level, so it can be controlled by the use of check boxes for each documents, but no response yet.

Hans

Hi

Didn’t work, unfortunatly.

I am sorry to hear that. It is working for me. Maybe it is a combination of settings.

I am on DB 15.0.1 and I have my documents go to my suppliers with their reference and on liner description as it appears in the Supplier price definition with the New Purchase Price form.

Hi

Now it works, I just had to stress down and to take my time and try in different ways. I use if for purchase orders using MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_ORDER_SUPPLIER

Thanks!

1 Like

To Hide product description in various documents:go to Other Setup>>add the constants
Customer Invoice:
MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_FACTURE=1
Sales Order:
MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_COMMANDE=1
Purchase Order:
MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_ORDER_SUPPLIER=1
Vendor Invoice:
MAIN_DOCUMENTS_HIDE_DESCRIPTION_FOR_INVOICE_SUPPLIER=1

1 Like

Great, thanks. Bow we should find a way to have it on per document level.

Hans