Skip to content

Commit

Permalink
[IMP] stock_inventory_valuation_report: print UoM in PDF and XLSX
Browse files Browse the repository at this point in the history
  • Loading branch information
aleuffre committed Feb 12, 2024
1 parent 586b4ea commit 4f3edb2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
<div class="act_as_cell">Name</div>
<div class="act_as_cell">Barcode</div>
<div class="act_as_cell">Quantity</div>
<div class="act_as_cell">UoM</div>
<div class="act_as_cell">Cost</div>
<div class="act_as_cell">Value</div>
</div>
Expand All @@ -214,6 +215,9 @@
<div class="act_as_cell right">
<t t-esc="'{0:,.3f}'.format(line.qty_at_date)" />
</div>
<div class="act_as_cell left">
<t t-esc="line.uom_id.name" />
</div>
<div class="act_as_cell amount">
<t
t-esc="line.standard_price"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,16 @@ def _get_ws_params(self, wb, data, objects):
},
"width": 18,
},
"6_standard_price": {
"6_uom": {
"header": {
"value": "UoM",
},
"data": {
"value": self._render("uom"),
},
"width": 11,
},
"7_standard_price": {
"header": {
"value": "Cost",
},
Expand All @@ -72,7 +81,7 @@ def _get_ws_params(self, wb, data, objects):
},
"width": 18,
},
"7_stock_value": {
"8_stock_value": {
"header": {
"value": "Value",
},
Expand Down Expand Up @@ -149,6 +158,7 @@ def _inventory_valuation_report(self, wb, ws, ws_params, data, objects):
"reference": line.reference or "",
"barcode": line.barcode or "",
"qty_at_date": line.qty_at_date or 0.000,
"uom": line.uom_id.name or "",
"standard_price": line.standard_price or 0.00,
"stock_value": line.stock_value or 0.00,
},
Expand Down

0 comments on commit 4f3edb2

Please sign in to comment.