From 091babdda9252b0819943a75a3a2202fa3f6cbde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cmoda=E2=80=9D?= Date: Tue, 17 Oct 2023 11:25:11 +0200 Subject: [PATCH] [IMP] point_of_sale: add groupby point_of_sale order list Added the ability to group orders by point of sale in the order backend view. Added "point of sale" column to this same view. Part-of: odoo/odoo#138897 --- addons/point_of_sale/models/pos_order.py | 2 +- addons/point_of_sale/views/pos_order_view.xml | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/addons/point_of_sale/models/pos_order.py b/addons/point_of_sale/models/pos_order.py index af7e8a5ec84..66cd2464fb1 100644 --- a/addons/point_of_sale/models/pos_order.py +++ b/addons/point_of_sale/models/pos_order.py @@ -291,7 +291,7 @@ class PosOrder(models.Model): session_id = fields.Many2one( 'pos.session', string='Session', required=True, index=True, domain="[('state', '=', 'opened')]") - config_id = fields.Many2one('pos.config', related='session_id.config_id', string="Point of Sale", readonly=False) + config_id = fields.Many2one('pos.config', related='session_id.config_id', string="Point of Sale", readonly=False, store=True) currency_id = fields.Many2one('res.currency', related='config_id.currency_id', string="Currency") currency_rate = fields.Float("Currency Rate", compute='_compute_currency_rate', compute_sudo=True, store=True, digits=0, readonly=True, help='The rate of the currency to the currency of rate applicable at the date of the order') diff --git a/addons/point_of_sale/views/pos_order_view.xml b/addons/point_of_sale/views/pos_order_view.xml index 483a9b1ff85..29d7f3737f6 100644 --- a/addons/point_of_sale/views/pos_order_view.xml +++ b/addons/point_of_sale/views/pos_order_view.xml @@ -264,6 +264,7 @@ + @@ -383,6 +384,7 @@ + @@ -391,6 +393,7 @@ +