From 6d884bccc336435e7fc6f2b0acfd4e23a19ccc58 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 13 Jan 2025 17:04:24 -0600 Subject: [PATCH] fix: hide local customer when not applicable, for order view --- src/sideshow/web/views/orders.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sideshow/web/views/orders.py b/src/sideshow/web/views/orders.py index a48546e..68ad984 100644 --- a/src/sideshow/web/views/orders.py +++ b/src/sideshow/web/views/orders.py @@ -778,7 +778,10 @@ class OrderView(MasterView): order = f.model_instance # local_customer - f.set_node('local_customer', LocalCustomerRef(self.request)) + if order.customer_id and not order.local_customer: + f.remove('local_customer') + else: + f.set_node('local_customer', LocalCustomerRef(self.request)) # pending_customer if order.customer_id or order.local_customer: