From baf798eb6a12b36bdec2d6261bfa4f01c245512e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 2 Sep 2025 10:14:54 +0200 Subject: [PATCH] Add a status URL to sales from web shop Closes #14210 --- modules/web_shop/CHANGELOG | 1 + modules/web_shop/sale.py | 12 ++++++++++++ modules/web_shop/view/sale_form.xml | 3 +++ modules/web_shop_shopify/sale.py | 8 ++++++++ .../tests/scenario_web_shop_shopify.rst | 1 + 5 files changed, 25 insertions(+) diff --git a/modules/web_shop/CHANGELOG b/modules/web_shop/CHANGELOG index 82fa2438fe..916c71e2fd 100644 --- a/modules/web_shop/CHANGELOG +++ b/modules/web_shop/CHANGELOG @@ -1,3 +1,4 @@ +* Add a status URL to sales * Add button to update the sales from their web shop * Add web shop URLs to products diff --git a/modules/web_shop/sale.py b/modules/web_shop/sale.py index 68df3ffeb3..9136f68131 100644 --- a/modules/web_shop/sale.py +++ b/modules/web_shop/sale.py @@ -23,6 +23,15 @@ class Sale(metaclass=PoolMeta): 'required': Bool(Eval('web_shop')), 'readonly': ~Eval('web_id'), }) + web_status_url = fields.Function( + fields.Char( + "Web Status URL", + states={ + 'invisible': ~Eval('web_status_url'), + }, + help="The URL where the customer can check " + "the order's current status."), + 'get_web_status_url') @classmethod def __setup__(cls): @@ -55,6 +64,9 @@ class Sale(metaclass=PoolMeta): if self.web_shop and not self.web_id: self.web_id = token_hex(nbytes) + def get_web_status_url(self, name): + pass + @classmethod def copy(cls, sales, default=None): if default is None: diff --git a/modules/web_shop/view/sale_form.xml b/modules/web_shop/view/sale_form.xml index 7c6079c81b..661fefc54b 100644 --- a/modules/web_shop/view/sale_form.xml +++ b/modules/web_shop/view/sale_form.xml @@ -7,6 +7,9 @@ this repository contains the full copyright notices and license terms. -->