[tryton-debian-vcs] tryton-server branch debian updated. debian/4.6.1-1-2-gc69aefb
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Sun Jan 7 13:03:18 UTC 2018
The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-server.git;a=commitdiff;h=debian/4.6.1-1-2-gc69aefb
commit c69aefb8e9f403c0bd44f87f2d95e9a3e7f4ec78
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sat Jan 6 11:49:44 2018 +0100
Releasing debian version 4.6.2-1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/debian/changelog b/debian/changelog
index 16e9d01..a3377ea 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+tryton-server (4.6.2-1) unstable; urgency=medium
+
+ * Merging upstream version 4.6.2.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Sat, 06 Jan 2018 11:49:44 +0100
+
tryton-server (4.6.1-1) unstable; urgency=medium
* Merging upstream version 4.6.1.
commit 4ad4c3250ae9797d71ba98ada30c8e39a63d0602
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sat Jan 6 11:49:44 2018 +0100
Merging upstream version 4.6.2.
diff --git a/.drone.yml b/.drone.yml
new file mode 100644
index 0000000..e0bc2f7
--- /dev/null
+++ b/.drone.yml
@@ -0,0 +1,51 @@
+clone:
+ hg:
+ image: plugins/hg
+
+pipeline:
+ tox:
+ image: ${IMAGE}
+ environment:
+ - CFLAGS=-O0
+ - DB_CACHE=/cache
+ - TOX_TESTENV_PASSENV=CFLAGS DB_CACHE
+ - POSTGRESQL_URI=postgresql://postgres@postgresql:5432/
+ commands:
+ - pip install tox
+ - tox -e "${TOXENV}-${DATABASE}"
+ volumes:
+ - cache:/root/.cache
+
+services:
+ postgresql:
+ image: postgres
+ when:
+ matrix:
+ DATABASE: postgresql
+
+matrix:
+ include:
+ - IMAGE: python:2.7
+ TOXENV: py27
+ DATABASE: sqlite
+ - IMAGE: python:2.7
+ TOXENV: py27
+ DATABASE: postgresql
+ - IMAGE: python:3.4
+ TOXENV: py34
+ DATABASE: sqlite
+ - IMAGE: python:3.4
+ TOXENV: py34
+ DATABASE: postgresql
+ - IMAGE: python:3.5
+ TOXENV: py35
+ DATABASE: sqlite
+ - IMAGE: python:3.5
+ TOXENV: py35
+ DATABASE: postgresql
+ - IMAGE: python:3.6
+ TOXENV: py36
+ DATABASE: sqlite
+ - IMAGE: python:3.6
+ TOXENV: py36
+ DATABASE: postgresql
diff --git a/CHANGELOG b/CHANGELOG
index df74520..2684e1f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.6.2 - 2018-01-04
+* Bug fixes (see mercurial logs for details)
+
Version 4.6.1 - 2017-12-04
* Bug fixes (see mercurial logs for details)
diff --git a/PKG-INFO b/PKG-INFO
index 4347157..65e2cdb 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond
-Version: 4.6.1
+Version: 4.6.2
Summary: Tryton server
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..bd4664a
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,19 @@
+[tox]
+envlist = {py27,py34,py35,py36}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
+
+[testenv]
+commands = {envpython} setup.py test
+deps =
+ mock
+ {py27,py34,py35,py36}-postgresql: psycopg2 >= 2.5
+ pypy-postgresql: psycopg2cffi >= 2.5
+ mysql: MySQL-python
+ sqlite: sqlitebck
+setenv =
+ sqlite: TRYTOND_DATABASE_URI={env:SQLITE_URI:sqlite://}
+ postgresql: TRYTOND_DATABASE_URI={env:POSTGRESQL_URI:postgresql://}
+ mysql: TRYTOND_DATABASE_URI={env:MYSQL_URI:mysql://}
+ sqlite: DB_NAME={env:SQLITE_NAME::memory:}
+ postgresql: DB_NAME={env:POSTGRESQL_NAME:test}
+ mysql: DB_NAME={env:MYSQL_NAME:test}
+install_command = pip install --pre --find-links https://trydevpi.tryton.org/ {opts} {packages}
diff --git a/trytond.egg-info/PKG-INFO b/trytond.egg-info/PKG-INFO
index 4347157..65e2cdb 100644
--- a/trytond.egg-info/PKG-INFO
+++ b/trytond.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond
-Version: 4.6.1
+Version: 4.6.2
Summary: Tryton server
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/trytond.egg-info/SOURCES.txt b/trytond.egg-info/SOURCES.txt
index 78e7f03..b2c0f9e 100644
--- a/trytond.egg-info/SOURCES.txt
+++ b/trytond.egg-info/SOURCES.txt
@@ -1,3 +1,5 @@
+.drone.yml
+.hgtags
CHANGELOG
COPYRIGHT
INSTALL
@@ -5,6 +7,7 @@ LICENSE
MANIFEST.in
README
setup.py
+tox.ini
bin/trytond
bin/trytond-admin
bin/trytond-cron
@@ -71,6 +74,7 @@ trytond/security.py
trytond/sendmail.py
trytond/test_loader.py
trytond/transaction.py
+trytond/tryton.rnc
trytond/url.py
trytond/wsgi.py
trytond.egg-info/PKG-INFO
diff --git a/trytond/__init__.py b/trytond/__init__.py
index 80d083f..8c41c91 100644
--- a/trytond/__init__.py
+++ b/trytond/__init__.py
@@ -5,7 +5,7 @@ import time
import warnings
from email import charset
-__version__ = "4.6.1"
+__version__ = "4.6.2"
os.environ['TZ'] = 'UTC'
if hasattr(time, 'tzset'):
diff --git a/trytond/model/fields/field.py b/trytond/model/fields/field.py
index 139d0f5..95cda07 100644
--- a/trytond/model/fields/field.py
+++ b/trytond/model/fields/field.py
@@ -365,10 +365,9 @@ class Field(object):
class FieldTranslate(Field):
def _get_translation_join(self, Model, name,
- translation, model, table):
- language = Transaction().language
+ translation, model, table, from_, language):
if Model.__name__ == 'ir.model':
- return table.join(translation, 'LEFT',
+ return from_.join(translation, 'LEFT',
condition=(translation.name == Concat(Concat(
table.model, ','), name))
& (translation.res_id == -1)
@@ -380,7 +379,7 @@ class FieldTranslate(Field):
type_ = 'field'
else:
type_ = 'help'
- return table.join(model, 'LEFT',
+ return from_.join(model, 'LEFT',
condition=model.id == table.model).join(
translation, 'LEFT',
condition=(translation.name == Concat(Concat(
@@ -390,7 +389,7 @@ class FieldTranslate(Field):
& (translation.type == type_)
& (translation.fuzzy == False))
else:
- return table.join(translation, 'LEFT',
+ return from_.join(translation, 'LEFT',
condition=(translation.res_id == table.id)
& (translation.name == '%s,%s' % (Model.__name__, name))
& (translation.lang == language)
@@ -398,6 +397,7 @@ class FieldTranslate(Field):
& (translation.fuzzy == False))
def convert_domain(self, domain, tables, Model):
+ from trytond.tools import get_parent_language
pool = Pool()
Translation = pool.get('ir.translation')
IrModel = pool.get('ir.model')
@@ -405,16 +405,20 @@ class FieldTranslate(Field):
return super(FieldTranslate, self).convert_domain(
domain, tables, Model)
- table = Model.__table__()
- translation = Translation.__table__()
+ table = join = Model.__table__()
model = IrModel.__table__()
name, operator, value = domain
- join = self._get_translation_join(Model, name,
- translation, model, table)
+ language = Transaction().language
+ column = None
+ while language:
+ translation = Translation.__table__()
+ join = self._get_translation_join(
+ Model, name, translation, model, table, join, language)
+ column = Coalesce(NullIf(column, ''), translation.value)
+ language = get_parent_language(language)
+ column = Coalesce(NullIf(column, ''), self.sql_column(table))
Operator = SQL_OPERATORS[operator]
assert name == self.name
- column = Coalesce(NullIf(translation.value, ''),
- self.sql_column(table))
where = Operator(column, self._domain_value(operator, value))
if isinstance(where, operators.In) and not where.right:
where = Literal(False)
@@ -424,6 +428,7 @@ class FieldTranslate(Field):
return tables[None][0].id.in_(join.select(table.id, where=where))
def convert_order(self, name, tables, Model):
+ from trytond.tools import get_parent_language
pool = Pool()
Translation = pool.get('ir.translation')
IrModel = pool.get('ir.model')
@@ -433,28 +438,34 @@ class FieldTranslate(Field):
assert name == self.name
table, _ = tables[None]
- key = name + '.translation'
- if key not in tables:
- translation = Translation.__table__()
- model = IrModel.__table__()
- join = self._get_translation_join(Model, name,
- translation, model, table)
- if join.left == table:
- tables[key] = {
- None: (join.right, join.condition),
- }
- else:
- tables[key] = {
- None: (join.left.right, join.left.condition),
- 'translation': {
+
+ join = table
+ language = Transaction().language
+ column = None
+ while language:
+ key = name + '.translation-' + language
+ if key not in tables:
+ translation = Translation.__table__()
+ model = IrModel.__table__()
+ join = self._get_translation_join(
+ Model, name, translation, model, table, table, language)
+ if join.left == table:
+ tables[key] = {
None: (join.right, join.condition),
- },
- }
- else:
- if 'translation' not in tables[key]:
- translation, _ = tables[key][None]
+ }
+ else:
+ tables[key] = {
+ None: (join.left.right, join.left.condition),
+ 'translation': {
+ None: (join.right, join.condition),
+ },
+ }
else:
- translation, _ = tables[key]['translation'][None]
+ if 'translation' not in tables[key]:
+ translation, _ = tables[key][None]
+ else:
+ translation, _ = tables[key]['translation'][None]
+ column = Coalesce(NullIf(column, ''), translation.value)
+ language = get_parent_language(language)
- return [Coalesce(NullIf(translation.value, ''),
- self.sql_column(table))]
+ return [Coalesce(column, self.sql_column(table))]
diff --git a/trytond/tryton.rnc b/trytond/tryton.rnc
new file mode 100644
index 0000000..fe87698
--- /dev/null
+++ b/trytond/tryton.rnc
@@ -0,0 +1,32 @@
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+
+tryton = element tryton { attlist.tryton, data* }
+attlist.tryton &= empty
+data = element data { attlist.data, (record | menuitem)* }
+attlist.data &=
+ [ a:defaultValue = "0" ] attribute noupdate { "0" | "1" }?
+attlist.data &=
+ [ a:defaultValue = "0" ] attribute grouped { "0" | "1" }?
+attlist.data &= attribute depends { text }
+record = element record { attlist.record, field* }
+attlist.record &= attribute model { text }
+attlist.record &= attribute id { text }
+attlist.record &=
+ [ a:defaultValue = "0" ] attribute update { "0" | "1" }?
+field = element field { attlist.field, text }
+attlist.field &= attribute name { text }
+attlist.field &= attribute search { text }?
+attlist.field &= attribute ref { text }?
+attlist.field &= attribute eval { text }?
+attlist.field &= attribute pyson { "0" | "1" }?
+attlist.field &= attribute type { "xml" }?
+menuitem = element menuitem { attlist.menuitem, empty }
+attlist.menuitem &= attribute id { text }
+attlist.menuitem &= attribute name { text }?
+attlist.menuitem &= attribute icon { text }?
+attlist.menuitem &= attribute sequence { text }?
+attlist.menuitem &= attribute parent { text }?
+attlist.menuitem &= attribute action { text }?
+attlist.menuitem &= attribute groups { text }?
+attlist.menuitem &= attribute active { text }?
+start = tryton
--
tryton-server
More information about the tryton-debian-vcs
mailing list