Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
2749 Widoki

Hello community,

I have this odd behaviour in the description field in the delivery slip. So on the product description line in the document we have in Odoo standard the following:

[Internal Reference] Name Description_picking Quantity unit , like for example

[123] Table Table in cedar wood    1 unit.

So the odd behaviour I could not overcome is that the description_picking field is only printed if I changed something in the field, like adding something.

I tried to modify it so I can display the description without having to change something in it. My final objective is to print only the description on the delivery slip, without the internal reference.







Awatar
Odrzuć

by default there is no description field in the delivery slip. the field is in invoice. did you make the field by yourself? have you make it related to the product?

Autor

It´s hide by default the field description but is Odoo standard

then, are you trying to only print the description, or also print the name of the product?

Autor

Only the description

Autor Najlepsza odpowiedź

[Fixed] I found out what was triggering the behaviour.
In Odoo source code we have:
aggregated_move_lines = {}
for move_line in self:
name = move_line.product_id.display_name
description = move_line.move_id.description_picking
if description == name or description == move_line.product_id.name:
description = False
uom = move_line.product_uom_id
line_key = str(move_line.product_id.id) + "_" + name + (description or "") + "uom " + str(uom.id)

So since the name and description was the same, description was not printed despited I change the Qweb view.
So the solution is to modify the source code by means of inherit and modify this .py file

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
0
maj 22
3890
3
gru 24
7945
0
kwi 23
3
1
sie 22
3970
0
cze 22
1893