Update to trytond Version 6.0.27 - Bugfix Release
OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/trytond?expand=0&rev=162
This commit is contained in:
parent
819e94a9e2
commit
db09b0e0a5
47
Update_changed_fields.diff
Normal file
47
Update_changed_fields.diff
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
diff --git a/trytond/convert.py b/trytond/convert.py
|
||||||
|
index c1dde99f19ae579d3d84d0e9f75272ea857f86f1..b57f1c710aefb7579d4edd9d07baad30df23ba8b 100644
|
||||||
|
--- a/trytond/convert.py
|
||||||
|
+++ b/trytond/convert.py
|
||||||
|
@@ -9,6 +9,8 @@ import re
|
||||||
|
from collections import defaultdict
|
||||||
|
from decimal import Decimal
|
||||||
|
|
||||||
|
+from trytond.config import config
|
||||||
|
+
|
||||||
|
from . import __version__
|
||||||
|
from .tools import grouped_slice
|
||||||
|
from .transaction import Transaction
|
||||||
|
@@ -19,6 +21,9 @@ logger = logging.getLogger(__name__)
|
||||||
|
CDATA_START = re.compile('^\s*\<\!\[cdata\[', re.IGNORECASE)
|
||||||
|
CDATA_END = re.compile('\]\]\>\s*$', re.IGNORECASE)
|
||||||
|
|
||||||
|
+_update_changed_fields = config.getboolean('optional',
|
||||||
|
+ 'update_changed_fields', default=True)
|
||||||
|
+
|
||||||
|
|
||||||
|
class DummyTagHandler:
|
||||||
|
"""Dubhandler implementing empty methods. Will be used when whe
|
||||||
|
@@ -668,11 +673,18 @@ class TrytondXmlHandler(sax.handler.ContentHandler):
|
||||||
|
# if they are not false in a boolean context (ie None,
|
||||||
|
# False, {} or [])
|
||||||
|
if db_field != expected_value and (db_field or expected_value):
|
||||||
|
- logger.warning(
|
||||||
|
- "Field %s of %s@%s not updated (id: %s), because "
|
||||||
|
- "it has changed since the last update",
|
||||||
|
- key, record.id, model, fs_id)
|
||||||
|
- continue
|
||||||
|
+ if _update_changed_fields:
|
||||||
|
+ logger.warning(
|
||||||
|
+ "Field %s of %s@%s (id: %s) "
|
||||||
|
+ "has changed since the last update\n"
|
||||||
|
+ "It will be nevertheless updated",
|
||||||
|
+ key, record.id, model, fs_id)
|
||||||
|
+ else:
|
||||||
|
+ logger.warning(
|
||||||
|
+ "Field %s of %s@%s not updated (id: %s), because "
|
||||||
|
+ "it has changed since the last update",
|
||||||
|
+ key, record.id, model, fs_id)
|
||||||
|
+ continue
|
||||||
|
|
||||||
|
# so, the field in the fs and in the db are different,
|
||||||
|
# and no user changed the value in the db:
|
38
fix_werkzeug.patch
Normal file
38
fix_werkzeug.patch
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
diff -U 3 -dHrN -- a/trytond/wsgi.py b/trytond/wsgi.py
|
||||||
|
--- a/trytond/wsgi.py 2021-02-12 10:14:41.000000000 +0100
|
||||||
|
+++ b/trytond/wsgi.py 2021-02-15 12:37:50.432511576 +0100
|
||||||
|
@@ -10,13 +10,23 @@
|
||||||
|
from werkzeug.wrappers import Response
|
||||||
|
from werkzeug.routing import Map, Rule
|
||||||
|
from werkzeug.exceptions import abort, HTTPException, InternalServerError
|
||||||
|
-from werkzeug.contrib.fixers import ProxyFix
|
||||||
|
+try:
|
||||||
|
+ from werkzeug.middleware.proxy_fix import ProxyFix
|
||||||
|
+
|
||||||
|
+ def NumProxyFix(app, num_proxies):
|
||||||
|
+ return ProxyFix(app,
|
||||||
|
+ x_for=num_proxies, x_proto=num_proxies, x_host=num_proxies,
|
||||||
|
+ x_port=num_proxies, x_prefix=num_proxies)
|
||||||
|
+except ImportError:
|
||||||
|
+ from werkzeug.contrib.fixers import ProxyFix as NumProxyFix
|
||||||
|
try:
|
||||||
|
from werkzeug.security import safe_join
|
||||||
|
except ImportError:
|
||||||
|
safe_join = posixpath.join
|
||||||
|
-
|
||||||
|
-from werkzeug.wsgi import SharedDataMiddleware
|
||||||
|
+try:
|
||||||
|
+ from werkzeug.middleware.shared_data import SharedDataMiddleware
|
||||||
|
+except ImportError:
|
||||||
|
+ from werkzeug.wsgi import SharedDataMiddleware
|
||||||
|
|
||||||
|
import wrapt
|
||||||
|
|
||||||
|
@@ -157,6 +167,6 @@
|
||||||
|
app.wsgi_app = SharedDataMiddlewareIndex(app.wsgi_app, static_files)
|
||||||
|
num_proxies = config.getint('web', 'num_proxies')
|
||||||
|
if num_proxies:
|
||||||
|
- app.wsgi_app = ProxyFix(app.wsgi_app, num_proxies=num_proxies)
|
||||||
|
+ app.wsgi_app = NumProxyFix(app.wsgi_app, num_proxies)
|
||||||
|
import trytond.protocols.dispatcher
|
||||||
|
import trytond.bus
|
52
fix_werkzeug_2.x.patch
Normal file
52
fix_werkzeug_2.x.patch
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
--- a/trytond/protocols/wrappers.py
|
||||||
|
+++ b/trytond/protocols/wrappers.py
|
||||||
|
@@ -12,7 +12,6 @@
|
||||||
|
from http import client as HTTPStatus
|
||||||
|
|
||||||
|
from werkzeug.wrappers import Request as _Request, Response
|
||||||
|
-from werkzeug.http import wsgi_to_bytes, bytes_to_wsgi
|
||||||
|
from werkzeug.datastructures import Authorization
|
||||||
|
from werkzeug.exceptions import abort, HTTPException
|
||||||
|
|
||||||
|
@@ -113,7 +112,8 @@
|
||||||
|
def parse_authorization_header(value):
|
||||||
|
if not value:
|
||||||
|
return
|
||||||
|
- value = wsgi_to_bytes(value)
|
||||||
|
+ if not isinstance(value, bytes):
|
||||||
|
+ value = value.encode('latin1')
|
||||||
|
try:
|
||||||
|
auth_type, auth_info = value.split(None, 1)
|
||||||
|
auth_type = auth_type.lower()
|
||||||
|
@@ -127,9 +127,9 @@
|
||||||
|
except Exception:
|
||||||
|
return
|
||||||
|
return Authorization('session', {
|
||||||
|
- 'username': bytes_to_wsgi(username),
|
||||||
|
+ 'username': username.decode("latin1"),
|
||||||
|
'userid': userid,
|
||||||
|
- 'session': bytes_to_wsgi(session),
|
||||||
|
+ 'session': session.decode("latin1"),
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@@ -214,16 +214,16 @@
|
||||||
|
pool = Pool()
|
||||||
|
UserApplication = pool.get('res.user.application')
|
||||||
|
|
||||||
|
- authorization = wsgi_to_bytes(request.headers['Authorization'])
|
||||||
|
+ authorization = request.headers['Authorization']
|
||||||
|
try:
|
||||||
|
auth_type, auth_info = authorization.split(None, 1)
|
||||||
|
auth_type = auth_type.lower()
|
||||||
|
except ValueError:
|
||||||
|
abort(HTTPStatus.UNAUTHORIZED)
|
||||||
|
- if auth_type != b'bearer':
|
||||||
|
+ if auth_type != 'bearer':
|
||||||
|
abort(HTTPStatus.FORBIDDEN)
|
||||||
|
|
||||||
|
- application = UserApplication.check(bytes_to_wsgi(auth_info), name)
|
||||||
|
+ application = UserApplication.check(auth_info, name)
|
||||||
|
if not application:
|
||||||
|
abort(HTTPStatus.FORBIDDEN)
|
||||||
|
transaction = Transaction()
|
12
revert_werkzeug_setup.patch
Normal file
12
revert_werkzeug_setup.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -108,7 +108,7 @@
|
||||||
|
'python-dateutil',
|
||||||
|
'polib',
|
||||||
|
'python-sql >= 0.5',
|
||||||
|
- 'werkzeug < 1.0',
|
||||||
|
+ 'werkzeug',
|
||||||
|
'wrapt',
|
||||||
|
'passlib >= 1.7.0',
|
||||||
|
],
|
||||||
|
|
3
trytond-5.0.36.tar.gz
Normal file
3
trytond-5.0.36.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:a49073c88cc3fb6a4d80e56a4fa888f92ff797bb6fa65d79d7f3aabf0c35c9a0
|
||||||
|
size 660286
|
12
trytond-5.0.36.tar.gz.asc
Normal file
12
trytond-5.0.36.tar.gz.asc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG v2
|
||||||
|
|
||||||
|
iQEzBAABCgAdFiEEdP/VdIYNMe45RAljV09u/05HdRcFAmDLoPkACgkQV09u/05H
|
||||||
|
dRftPgf5AZAZvbFS876LerbKNJsYUPegdfDtojOpYYRIVLsad5Wcc5FKPvmKZqry
|
||||||
|
ba1L3PFaUAG8wLEYWF34ISw5aAS+BgdIypoWkj8BeiMnK3yGWZMvj7tE2Z/103QL
|
||||||
|
dtuLEGE0eTrYQhrQNEKiHt4Jo1aThpba3Mle4J52VavYaUCccobv9raZj3LK5snt
|
||||||
|
KwZbNWgSrHpKWO3lSCwEHDXSNmHC3eefFmFtkzt3qqB9ac9HVnT9Ia3TUXIOvguE
|
||||||
|
N9ATbyaqQl0KrcIsFkjXaXW+F3zbwdPoVk/YVdum6KoX0p78cSMh14y2zwRlolz1
|
||||||
|
tXoDOqHk9iETWaaQS7wTHFhOIABZpg==
|
||||||
|
=lOWf
|
||||||
|
-----END PGP SIGNATURE-----
|
3
trytond-5.0.44.tar.gz
Normal file
3
trytond-5.0.44.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:fea00a36f8d279f4d48fc458f824b4791596c91844397090f74e92f01adfad02
|
||||||
|
size 661565
|
12
trytond-5.0.44.tar.gz.asc
Normal file
12
trytond-5.0.44.tar.gz.asc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG v2
|
||||||
|
|
||||||
|
iQEzBAABCgAdFiEEdP/VdIYNMe45RAljV09u/05HdRcFAmH5aqAACgkQV09u/05H
|
||||||
|
dRe1Agf/aEs72XXkbooX4WEPZv8MwMzYXfGc/2Rp2yWMDlSLp37EqhfouYyaE2yI
|
||||||
|
Ae3uLZv+I6DTWPYSANFXakpOr0auPrVSvI12z5KcQ7A5dga9Gm3hxYCdmwaXthfp
|
||||||
|
/tUHAS6WTo1nzbI2SUnxSOFu9N8RZXiPoM7L2m2vHckP6yaFsr0oLuHbRf+Y1hPP
|
||||||
|
w8D/grArlyxCMMrxv0IQuF9TrNUtTV5p7vjFlpH5+vZT5C1QG6Dn3fAAzi1YI0jv
|
||||||
|
oZ9kZWH8QslAYg1S0ZkO+3/Pn6n89GVcLvwliIFdbRf+a7g6Tnsr6Mn9WMxv83RW
|
||||||
|
FsWim8WDhe0RDhKuEpGBE+mTo0CFjQ==
|
||||||
|
=sKp7
|
||||||
|
-----END PGP SIGNATURE-----
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:17f3149d275453640a46bb99d510fa50566a50fe4567978cbd908e2b7b1ca8de
|
|
||||||
size 852606
|
|
@ -1,12 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
Version: GnuPG v2
|
|
||||||
|
|
||||||
iQEzBAABCgAdFiEEdP/VdIYNMe45RAljV09u/05HdRcFAmPEOQQACgkQV09u/05H
|
|
||||||
dRegmAf+OvgY1Mba4p4X4c4Sm2pE5VyKea2aSr5UMlXctxrSn4sYa1yzECEv48gN
|
|
||||||
PfMdh8Mkt+G796G9izOZlx1umWLnSvLTEOApJLYfRClRH2GY5A2EgQ45qTih6Zfc
|
|
||||||
tYkokz3FJE4hjNmrPOuzQXiHKPMvzDFli7JWyTdOHtakVv5iuUXbbP8BK8UlVMe3
|
|
||||||
HN5bmqRE2SJeWCQrAq1VfTUf1b4TKfX5DDXE3Gg4G8Oc1VydHv5sp9GRM5USxfmX
|
|
||||||
2ZeObrhvOryNJfbY716CwssbTc9Ti/pqaGsw1aCTaSpWzGXZtnVxBBgawp/Hu7lA
|
|
||||||
2I6uRykB96C+F9sb1q0uxCZkLjYUjw==
|
|
||||||
=F5Jk
|
|
||||||
-----END PGP SIGNATURE-----
|
|
3
trytond-6.0.27.tar.gz
Normal file
3
trytond-6.0.27.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:dc955437e7af8bb2546d91212f941b563e0947c80f93465979c4a2005322dee1
|
||||||
|
size 852589
|
12
trytond-6.0.27.tar.gz.asc
Normal file
12
trytond-6.0.27.tar.gz.asc
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG v2
|
||||||
|
|
||||||
|
iQEzBAABCgAdFiEEdP/VdIYNMe45RAljV09u/05HdRcFAmPgFo4ACgkQV09u/05H
|
||||||
|
dRfj+Qf9ERTUFZkJT/DYphet7D7iooqg2vG/8p2a9C5p+q9+NfWuONKSVMSAddQ+
|
||||||
|
wDGiokFejqFa1Vc07eSL+tJQb+BTwSSoobU0zRYq9rNMAs5Ezak+J0OjDG8fRi7F
|
||||||
|
qB9qZLiKp94+0POqhteGQWw/mYIBbvFI8wAMdCU766bO4dj1axm0lTZNToXC4hTe
|
||||||
|
/F2y1coc3ebhUxT8moJ/z2btC77dsP+Y0NAN9BIYIAmO4Nme2W9Hvw5J83q8ieyl
|
||||||
|
OmpZGM3YLEf78SuHxx1xFOem55yZPVVOs6unSiZxDPyGjBvPiHRK2v53sH/JL5/Y
|
||||||
|
VFFze+mQmV8jRlchVcyESDeUhcwHzQ==
|
||||||
|
=tx+t
|
||||||
|
-----END PGP SIGNATURE-----
|
@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Feb 6 17:36:41 UTC 2023 - Axel Braun <axel.braun@gmx.de>
|
||||||
|
|
||||||
|
- Version 6.0.27 - Bugfix Release
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Jan 16 21:18:26 UTC 2023 - Axel Braun <axel.braun@gmx.de>
|
Mon Jan 16 21:18:26 UTC 2023 - Axel Braun <axel.braun@gmx.de>
|
||||||
|
|
||||||
|
143
trytond.conf.example
Normal file
143
trytond.conf.example
Normal file
@ -0,0 +1,143 @@
|
|||||||
|
# /etc/tryton/trytond.conf - Configuration file for Tryton Server (trytond)
|
||||||
|
#
|
||||||
|
# This file contains the most common settings for trytond (Defaults
|
||||||
|
# are commented).
|
||||||
|
# For more information read
|
||||||
|
# /usr/share/doc/packages/trytond
|
||||||
|
|
||||||
|
[database]
|
||||||
|
# Database related settings
|
||||||
|
|
||||||
|
# The URI to connect to the SQL database (following RFC-3986)
|
||||||
|
# uri = database://username:password@host:port/
|
||||||
|
# (Internal default: sqlite:// (i.e. a local SQLite database))
|
||||||
|
#
|
||||||
|
# PostgreSQL via Unix domain sockets
|
||||||
|
# (e.g. PostgreSQL database running on the same machine (localhost))
|
||||||
|
#uri = postgresql://tryton:tryton@/
|
||||||
|
#
|
||||||
|
#Default setting for a local postgres database
|
||||||
|
|
||||||
|
uri = postgresql:///
|
||||||
|
|
||||||
|
#
|
||||||
|
# PostgreSQL via TCP/IP
|
||||||
|
# (e.g. connecting to a PostgreSQL database running on a remote machine or
|
||||||
|
# by means of md5 authentication. Needs PostgreSQL to be configured to accept
|
||||||
|
# those connections (pg_hba.conf).)
|
||||||
|
#uri = postgresql://tryton:tryton@localhost:5432/
|
||||||
|
|
||||||
|
# The path to the directory where the Tryton Server stores files.
|
||||||
|
# The server must have write permissions to this directory.
|
||||||
|
# (Internal default: /var/lib/trytond)
|
||||||
|
path = /var/lib/tryton
|
||||||
|
|
||||||
|
# Shall available databases be listed in the client?
|
||||||
|
#list = True
|
||||||
|
|
||||||
|
# The number of retries of the Tryton Server when there are errors
|
||||||
|
# in a request to the database
|
||||||
|
#retry = 5
|
||||||
|
|
||||||
|
# The primary language, that is used to store entries in translatable
|
||||||
|
# fields into the database.
|
||||||
|
#language = en_US
|
||||||
|
|
||||||
|
[ssl]
|
||||||
|
# SSL settings
|
||||||
|
# Activation of SSL for all available protocols.
|
||||||
|
# Uncomment the following settings for key and certificate
|
||||||
|
# to enable SSL.
|
||||||
|
|
||||||
|
# The path to the private key
|
||||||
|
#privatekey = /etc/ssl/private/ssl-cert-snakeoil.key
|
||||||
|
|
||||||
|
# The path to the certificate
|
||||||
|
#certificate = /etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||||
|
|
||||||
|
[jsonrpc]
|
||||||
|
# Settings for the JSON-RPC network interface
|
||||||
|
|
||||||
|
# The IP/host and port number of the interface
|
||||||
|
# (Internal default: localhost:8000)
|
||||||
|
#
|
||||||
|
# Listen on all interfaces (IPv4)
|
||||||
|
|
||||||
|
listen = 0.0.0.0:8000
|
||||||
|
|
||||||
|
#
|
||||||
|
# Listen on all interfaces (IPv4 and IPv6)
|
||||||
|
#listen = [::]:8000
|
||||||
|
|
||||||
|
# The hostname for this interface
|
||||||
|
#hostname =
|
||||||
|
|
||||||
|
# The root path to retrieve data for GET requests
|
||||||
|
#data = jsondata
|
||||||
|
|
||||||
|
[xmlrpc]
|
||||||
|
# Settings for the XML-RPC network interface
|
||||||
|
|
||||||
|
# The IP/host and port number of the interface
|
||||||
|
#listen = localhost:8069
|
||||||
|
|
||||||
|
[webdav]
|
||||||
|
# Settings for the WebDAV network interface
|
||||||
|
|
||||||
|
# The IP/host and port number of the interface
|
||||||
|
#listen = localhost:8080
|
||||||
|
|
||||||
|
[session]
|
||||||
|
# Session settings
|
||||||
|
|
||||||
|
# The time (in seconds) until an inactive session expires
|
||||||
|
#timeout = 3600
|
||||||
|
|
||||||
|
# The server administration password used by the client for
|
||||||
|
# the execution of database management tasks. It is encrypted
|
||||||
|
# using using the Unix crypt(3) routine. A password can be
|
||||||
|
# generated using the following command line (on one line):
|
||||||
|
# $ python -c 'import getpass,crypt,random,string; \
|
||||||
|
# print crypt.crypt(getpass.getpass(), \
|
||||||
|
# "".join(random.sample(string.ascii_letters + string.digits, 8)))'
|
||||||
|
# Example password with 'admin'
|
||||||
|
super_pwd = jkUbZGvFNeugk
|
||||||
|
|
||||||
|
[email]
|
||||||
|
# Mail settings
|
||||||
|
|
||||||
|
# The URI to connect to the SMTP server.
|
||||||
|
# Available protocols are:
|
||||||
|
# - smtp: simple SMTP
|
||||||
|
# - smtp+tls: SMTP with STARTTLS
|
||||||
|
# - smtps: SMTP with SSL
|
||||||
|
#uri = smtp://localhost:25
|
||||||
|
|
||||||
|
# The From address used by the Tryton Server to send emails.
|
||||||
|
#from = tryton@localhost
|
||||||
|
|
||||||
|
[report]
|
||||||
|
# Report settings
|
||||||
|
|
||||||
|
# Unoconv parameters for connection to the unoconv service.
|
||||||
|
#unoconv = pipe,name=trytond;urp;StarOffice.ComponentContext
|
||||||
|
|
||||||
|
# Module settings
|
||||||
|
#
|
||||||
|
# Some modules are reading configuration parameters from this
|
||||||
|
# configuration file. These settings only apply when those modules
|
||||||
|
# are installed.
|
||||||
|
#
|
||||||
|
#[ldap_authentication]
|
||||||
|
# The URI to connect to the LDAP server.
|
||||||
|
#uri = ldap://host:port/dn?attributes?scope?filter?extensions
|
||||||
|
# A basic default URL could look like
|
||||||
|
#uri = ldap://localhost:389/
|
||||||
|
|
||||||
|
[web]
|
||||||
|
# Path for the web-frontend
|
||||||
|
#root = /usr/lib/node-modules/tryton-sao
|
||||||
|
|
||||||
|
[webdav]
|
||||||
|
# The port on which the webdav server listens
|
||||||
|
listen = [::]:8080
|
@ -20,7 +20,7 @@
|
|||||||
%define majorver 6.0
|
%define majorver 6.0
|
||||||
%define base_name tryton
|
%define base_name tryton
|
||||||
Name: trytond
|
Name: trytond
|
||||||
Version: %{majorver}.26
|
Version: %{majorver}.27
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: An Enterprise Resource Planning (ERP) system
|
Summary: An Enterprise Resource Planning (ERP) system
|
||||||
License: GPL-3.0-or-later
|
License: GPL-3.0-or-later
|
||||||
|
Loading…
Reference in New Issue
Block a user