diff --git a/addons/stock/models/stock_traceability.py b/addons/stock/models/stock_traceability.py
index 9bddd8cabf0..7cb3b3ba18c 100644
--- a/addons/stock/models/stock_traceability.py
+++ b/addons/stock/models/stock_traceability.py
@@ -92,6 +92,16 @@ class MrpStockReport(models.TransientModel):
ref = move_line.move_id.scrap_ids[0].name
return res_model, res_id, ref
+ def _get_usage(self, move_line):
+ usage = ''
+ if (move_line.location_id.usage == 'internal') and (move_line.location_dest_id.usage == 'internal'):
+ usage = 'internal'
+ elif (move_line.location_id.usage != 'internal') and (move_line.location_dest_id.usage == 'internal'):
+ usage = 'in'
+ else:
+ usage = 'out'
+ return usage
+
def make_dict_move(self, level, parent_id, move_line, unfoldable=False):
res_model, res_id, ref = self.get_links(move_line)
dummy, is_used = self._get_linked_move_lines(move_line)
@@ -101,6 +111,7 @@ class MrpStockReport(models.TransientModel):
'date': move_line.move_id.date,
'parent_id': parent_id,
'is_used': bool(is_used),
+ 'usage': self._get_usage(move_line),
'model_id': move_line.id,
'model':'stock.move.line',
'product_id': move_line.product_id.display_name,
@@ -122,6 +133,7 @@ class MrpStockReport(models.TransientModel):
'unfoldable': False if not move_line.lot_id else True,
'date': move_line.move_id.date,
'model_id': move_line.id,
+ 'usage': self._get_usage(move_line),
'parent_id': parent_id,
'model': model or 'stock.move.line',
'product_id': move_line.product_id.display_name,
@@ -155,6 +167,7 @@ class MrpStockReport(models.TransientModel):
'model': data['model'],
'model_id': data['model_id'],
'parent_id': data['parent_id'],
+ 'usage': data.get('usage', False),
'is_used': data.get('is_used', False),
'lot_id': data.get('lot_id', False),
'type': 'line',
diff --git a/addons/stock/static/src/less/stock_traceability_report.less b/addons/stock/static/src/less/stock_traceability_report.less
index 3c0c4bce65d..8d4052b9683 100644
--- a/addons/stock/static/src/less/stock_traceability_report.less
+++ b/addons/stock/static/src/less/stock_traceability_report.less
@@ -1,8 +1,7 @@
-.o_stock_reports_lines(@border-width: 5px, @color: inherit, @font-weight: inherit, @border-top-style: initial, @border-bottom-style: initial) {
+.o_stock_reports_lines(@border-width: 5px, @font-weight: inherit, @border-top-style: initial, @border-bottom-style: initial) {
border-width: @border-width;
border-left-style: hidden;
border-right-style: hidden;
- color: @color;
font-weight: @font-weight;
border-top-style: @border-top-style;
border-bottom-style: @border-bottom-style;
@@ -25,13 +24,12 @@
overflow-x:scroll;
}
background-color: @odoo-view-background-color;
- color: @odoo-main-text-color;
&.o_stock_reports_no_print {
padding-bottom: 125px;
margin: @odoo-horizontal-padding auto;
.o-webclient-padding(@top: @odoo-sheet-vpadding, @bottom: @odoo-sheet-vpadding);
.o_stock_reports_level0 {
- .o_stock_reports_lines(@border-width: 1px, @color: @odoo-brand-primary, @font-weight: bold, @border-top-style: solid, @border-bottom-style: groove);
+ .o_stock_reports_lines(@border-width: 1px, @font-weight: normal, @border-top-style: solid, @border-bottom-style: groove);
}
.o_stock_reports_table {
white-space: nowrap;
diff --git a/addons/stock/static/src/xml/stock_traceability_report_line.xml b/addons/stock/static/src/xml/stock_traceability_report_line.xml
index 60903e6a4e5..1a4cc85fdc1 100644
--- a/addons/stock/static/src/xml/stock_traceability_report_line.xml
+++ b/addons/stock/static/src/xml/stock_traceability_report_line.xml
@@ -20,6 +20,10 @@