details: https://code.tryton.org/tryton/commit/7fd1ad0f0509
branch: default
user: Cédric Krier <[email protected]>
date: Thu Jan 22 18:32:26 2026 +0100
description:
Add an web shop URL to sales
Closes #14538
diffstat:
modules/web_shop/CHANGELOG | 1 +
modules/web_shop/sale.py | 11 +++++++++++
modules/web_shop/view/sale_form.xml | 2 ++
modules/web_shop/view/sale_list.xml | 1 +
modules/web_shop_shopify/sale.py | 6 ++++++
modules/web_shop_shopify/sale.xml | 12 ------------
modules/web_shop_shopify/tryton.cfg | 1 -
modules/web_shop_shopify/view/sale_form.xml | 10 ----------
8 files changed, 21 insertions(+), 23 deletions(-)
diffs (115 lines):
diff -r b251595fa8aa -r 7fd1ad0f0509 modules/web_shop/CHANGELOG
--- a/modules/web_shop/CHANGELOG Wed Jan 21 19:12:34 2026 +0100
+++ b/modules/web_shop/CHANGELOG Thu Jan 22 18:32:26 2026 +0100
@@ -1,3 +1,4 @@
+* Add an URL to sales
Version 7.8.0 - 2025-12-15
--------------------------
diff -r b251595fa8aa -r 7fd1ad0f0509 modules/web_shop/sale.py
--- a/modules/web_shop/sale.py Wed Jan 21 19:12:34 2026 +0100
+++ b/modules/web_shop/sale.py Thu Jan 22 18:32:26 2026 +0100
@@ -23,6 +23,14 @@
'required': Bool(Eval('web_shop')),
'readonly': ~Eval('web_id'),
})
+ web_url = fields.Function(
+ fields.Char(
+ "Web URL",
+ states={
+ 'invisible': ~Eval('web_url'),
+ },
+ help="The URL of the order on the web shop."),
+ 'get_web_url')
web_status_url = fields.Function(
fields.Char(
"Web Status URL",
@@ -64,6 +72,9 @@
if self.web_shop and not self.web_id:
self.web_id = token_hex(nbytes)
+ def get_web_url(self, name):
+ pass
+
def get_web_status_url(self, name):
pass
diff -r b251595fa8aa -r 7fd1ad0f0509 modules/web_shop/view/sale_form.xml
--- a/modules/web_shop/view/sale_form.xml Wed Jan 21 19:12:34 2026 +0100
+++ b/modules/web_shop/view/sale_form.xml Thu Jan 22 18:32:26 2026 +0100
@@ -8,6 +8,8 @@
<label name="web_id"/>
<field name="web_id"/>
+ <label name="web_url"/>
+ <field name="web_url" widget="url" colspan="3"/>
<label name="web_status_url"/>
<field name="web_status_url" widget="url" colspan="3"/>
</xpath>
diff -r b251595fa8aa -r 7fd1ad0f0509 modules/web_shop/view/sale_list.xml
--- a/modules/web_shop/view/sale_list.xml Wed Jan 21 19:12:34 2026 +0100
+++ b/modules/web_shop/view/sale_list.xml Thu Jan 22 18:32:26 2026 +0100
@@ -5,5 +5,6 @@
<xpath expr="//field[@name='reference']" position="after">
<field name="web_shop" expand="1" optional="1"/>
<field name="web_id" expand="1" optional="1"/>
+ <field name="web_url" widget="url" optional="1"/>
</xpath>
</data>
diff -r b251595fa8aa -r 7fd1ad0f0509 modules/web_shop_shopify/sale.py
--- a/modules/web_shop_shopify/sale.py Wed Jan 21 19:12:34 2026 +0100
+++ b/modules/web_shop_shopify/sale.py Thu Jan 22 18:32:26 2026 +0100
@@ -166,6 +166,12 @@
'web_shop_shopify.msg_identifier_sale_web_shop_unique'),
]
+ def get_web_url(self, name):
+ url = super().get_web_url(name)
+ if self.shopify_url:
+ url = self.shopify_url
+ return url
+
def get_web_status_url(self, name):
url = super().get_web_status_url(name)
if self.shopify_status_url:
diff -r b251595fa8aa -r 7fd1ad0f0509 modules/web_shop_shopify/sale.xml
--- a/modules/web_shop_shopify/sale.xml Wed Jan 21 19:12:34 2026 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-<?xml version="1.0"?>
-<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
-this repository contains the full copyright notices and license terms. -->
-<tryton>
- <data>
- <record model="ir.ui.view" id="sale_view_form">
- <field name="model">sale.sale</field>
- <field name="inherit" ref="sale.sale_view_form"/>
- <field name="name">sale_form</field>
- </record>
- </data>
-</tryton>
diff -r b251595fa8aa -r 7fd1ad0f0509 modules/web_shop_shopify/tryton.cfg
--- a/modules/web_shop_shopify/tryton.cfg Wed Jan 21 19:12:34 2026 +0100
+++ b/modules/web_shop_shopify/tryton.cfg Thu Jan 22 18:32:26 2026 +0100
@@ -29,7 +29,6 @@
product.xml
party.xml
web.xml
- sale.xml
stock.xml
carrier.xml
message.xml
diff -r b251595fa8aa -r 7fd1ad0f0509 modules/web_shop_shopify/view/sale_form.xml
--- a/modules/web_shop_shopify/view/sale_form.xml Wed Jan 21 19:12:34
2026 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<?xml version="1.0"?>
-<!-- This file is part of Tryton. The COPYRIGHT file at the top level of
-this repository contains the full copyright notices and license terms. -->
-<data>
- <xpath expr="//field[@name='web_id']" position="after">
- <newline/>
- <label name="shopify_url"/>
- <field name="shopify_url" widget="url" colspan="3"/>
- </xpath>
-</data>