From f9c345fa21751e3f53b59756323e616a61e1bd8e Mon Sep 17 00:00:00 2001 From: "Tiffany Chang (tic)" Date: Wed, 29 Jun 2022 12:35:39 +0000 Subject: [PATCH] [IMP] stock: update UX of stock moves report Minor UX updates to stock moves report: - don't default groupby source location - order list by date - rename "Units of Measure" column to "Unit" - add color to quantity field (green = incoming qty into stock, red = outgoing, black = all others [i.e. internal transfers/external locations only, etc] - search filter order updated - make to location_{dest_}id text-muted when not a physical location (i.e. internal/transit) - display "Quantity" instead of "Demand" for product_uom_qty and show sum at bottom of list "stock moves" part of b2b task: 2882539 Part-of: odoo/odoo#97109 --- addons/stock/models/stock_move.py | 2 ++ addons/stock/views/stock_move_views.xml | 24 +++++++++++++++--------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/addons/stock/models/stock_move.py b/addons/stock/models/stock_move.py index 46d914694ee..430c3cb1669 100644 --- a/addons/stock/models/stock_move.py +++ b/addons/stock/models/stock_move.py @@ -80,6 +80,8 @@ class StockMove(models.Model): auto_join=True, index=True, required=True, check_company=True, help="Location where the system will stock the finished products.") + location_usage = fields.Selection(string="Source Location Type", related='location_id.usage') + location_dest_usage = fields.Selection(string="Destination Location Type", related='location_dest_id.usage') partner_id = fields.Many2one( 'res.partner', 'Destination Address ', states={'done': [('readonly', True)]}, diff --git a/addons/stock/views/stock_move_views.xml b/addons/stock/views/stock_move_views.xml index 01d9da3b1fd..4a3d171c1c7 100644 --- a/addons/stock/views/stock_move_views.xml +++ b/addons/stock/views/stock_move_views.xml @@ -30,16 +30,22 @@ stock.move - - + + + + - - + + - - + + - + - + @@ -395,7 +401,7 @@ ir.actions.act_window - {'search_default_done': 1, 'search_default_groupby_location_id': 1} + {'search_default_done': 1}

No stock move found