till now, I used the “secondary unit” module to get an item’s weight into my picklist. Some research made me think whether this actually is the wrong module for this purpose, as I need to set manually every secondary unit for every single product sold.
So I tried the stock_shipment_measurements module, where I can save the products’ weights. But now I need to know which statement has to be used in the report. At present, in my picklist I have a column with this statement:
The module adds measurement fields on the product model. So you need to get those attributes from the product. You have moves and each move have a product and each product have a new field “weight” and “weight_uom”.
Also, for the total weight, you have 2 options:
sum yourself with a loop over the moves
if you have stock_shipment_measurements activated, you have there the weight of the shipment and the internal_weight of the move
Unluckily, still I’m not a programmer, so I don’t have basic understanding how these things combine. I found the stock.shipment.out model and “weight” and “weight_uom” - but sorry, I don’t have any idea how to create an entry to the report.
Thanks for your attempts to make it dummy-proof. This is my ungoing problem: You guys seem not to have an idea how little all these things are self-evident to somebody who only has a vague idea on all of you programmers’ concepts. For me, explanations in detail are essential. Sorry for that.
Now:
I followed Adria’s advice - but it will report the weight of a single item, not of the whole move line. How would I do that?
Thank you all, fellow friends. Separately mention deserves Mr. @Gruenfischer, how delivered the final clou.
This is what solved my problem:
In the pick list:
an additional column can be created for the weight per line, i.e. per consignment item, with the entry: <(format_number(move.product.weight*move.quantity, user.language, digits=move.product.weight_uom.digits) + ' ' + move.product.weight_uom.symbol) if (move.product.weight and move.quantity) else 'n.e'>.
This also intercepts empty entries for the article and enters “n.e.” (not entered) there. This should work in the same way for “length”, “volume” etc.
The total (net) weight of a shipment can be determined by the entry:
<format_number(shipment.weight, user.language, digits = 1)> <shipment.weight_uom.symbol>
in a new line of the report, between the two </FOR> statements.