Migrate to 5.4.

This commit refs #12039
This commit is contained in:
Sergio Morillo 2020-02-24 16:56:00 +01:00
parent 98dd16415f
commit 83cea0773c
9 changed files with 32 additions and 48 deletions

2
.gitconfig Normal file
View File

@ -0,0 +1,2 @@
[core]
excludesfile = ~/.gitignore

22
.gitignore vendored Normal file
View File

@ -0,0 +1,22 @@
*.py{c,o}
dist/
build/
_build/
*.egg-info/
*.egg/
*.eggs/
.coverage
*,cover
*.rej
*.orig
*.jasper
node_modules/
bower_components/
.tox/
.git/
.review.cfg
.idea
.DS_Store
.~lock.*
__pycache__/
*.diff

View File

@ -90,7 +90,6 @@ RUN hg clone http://hg.tryton.org/trytond/ -b ${SERIES}
COPY --chown=trytond:trytond patches ${WORK_DIR}
RUN cd trytond \
&& hg import trytondexportlocale.diff \
&& python3.6 setup.py develop --user
# Clone and install proteus and dvconfig

View File

@ -10,7 +10,7 @@ set -e
: ${PYTHONOPTIMIZE:=1}
# Remove PYTHONOPTIMIZE to get working asserts
export TRYTOND_DATABASE_URI
export TRYTOND_DATABASE_URI PYTHONOPTIMIZE
if [ "${1:0:1}" = '-' ]; then
set -- uwsgi --ini /home/trytond/tryton/etc/uwsgi.conf "$@"

View File

@ -1,5 +1,5 @@
FROM datalife/tryton:5.0
LABEL org.label-schema.version="5.0-office"
FROM datalife/tryton:5.4
LABEL org.label-schema.version="5.4-office"
USER root

View File

@ -1,39 +0,0 @@
# HG changeset patch
# User Cédric Krier <cedric.krier@b2ck.com>
Use locale format for data export and import
issue8196
review255151002
Index: trytond/model/modelstorage.py
===================================================================
--- a/trytond/model/modelstorage.py
+++ b/trytond/model/modelstorage.py
@@ -815,13 +815,21 @@
elif field_type == 'numeric':
res = Decimal(value) if value else None
elif field_type == 'date':
- res = (datetime.datetime.strptime(value,
- '%Y-%m-%d').date()
- if value else None)
+ if isinstance(value, datetime.date):
+ res = value
+ elif value:
+ res = datetime.datetime.strptime(
+ value, '%Y-%m-%d').date()
+ else:
+ res = None
elif field_type == 'datetime':
- res = (datetime.datetime.strptime(value,
- '%Y-%m-%d %H:%M:%S')
- if value else None)
+ if isinstance(value, datetime.datetime):
+ res = value
+ elif value:
+ res = datetime.datetime.strptime(
+ value, '%Y-%m-%d %H:%M:%S')
+ else:
+ res = None
elif field_type == 'many2one':
res = get_many2one(this_field_def['relation'], value)
elif field_type == 'many2many':

View File

@ -1,9 +1,9 @@
#!/bin/sh
docker build -q --rm --no-cache -t datalife/tryton:5.0 -t datalife/tryton:latest .
docker build -q --rm --no-cache -t datalife/tryton:5.0-office -t datalife/tryton:office office
docker build -q --rm --no-cache -t datalife/tryton:5.4 -t datalife/tryton:latest .
docker build -q --rm --no-cache -t datalife/tryton:5.4-office -t datalife/tryton:office office
docker push datalife/tryton:5.0-office
docker push datalife/tryton:5.0
docker push datalife/tryton:5.4-office
docker push datalife/tryton:5.4
docker push datalife/tryton:office
docker push datalife/tryton:latest

View File

@ -4,7 +4,7 @@ master=true
env=TRYTOND_CONFIG=$(TRYTOND_CONFIG)
env=TRYTOND_DATABASE_URI=$(TRYTOND_DATABASE_URI)
# comment to get asserts working
#env=PYTHONOPTIMIZE=$(PYTHONOPTIMIZE)
env=PYTHONOPTIMIZE=$(PYTHONOPTIMIZE)
wsgi=trytond.application:app
cheaper=1
processes=8