[IMP] stock_inventory_valuation_report: print UoM in PDF and XLSX

This commit is contained in:
Alessandro Uffreduzzi
2024-02-12 11:19:07 +01:00
parent 586b4eaedb
commit 4f3edb2025
2 changed files with 16 additions and 2 deletions

View File

@@ -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>
@@ -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"

View File

@@ -62,7 +62,16 @@ class ReportStockInventoryValuationReportXlsx(models.TransientModel):
},
"width": 18,
},
"6_standard_price": {
"6_uom": {
"header": {
"value": "UoM",
},
"data": {
"value": self._render("uom"),
},
"width": 11,
},
"7_standard_price": {
"header": {
"value": "Cost",
},
@@ -72,7 +81,7 @@ class ReportStockInventoryValuationReportXlsx(models.TransientModel):
},
"width": 18,
},
"7_stock_value": {
"8_stock_value": {
"header": {
"value": "Value",
},
@@ -149,6 +158,7 @@ class ReportStockInventoryValuationReportXlsx(models.TransientModel):
"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,
},