[tryton-debian-vcs] tryton-modules-sale branch upstream-3.8 updated. upstream/3.8.4-1-gea93fe8

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Sun Nov 12 16:34:39 UTC 2017


The following commit has been merged in the upstream-3.8 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-sale.git;a=commitdiff;h=upstream/3.8.4-1-gea93fe8

commit ea93fe80a1bf7886254543617fcabfe5759cc2ef
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Nov 11 17:49:49 2017 +0100

    Adding upstream version 3.8.5.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/.drone.yml b/.drone.yml
new file mode 100644
index 0000000..9d7c769
--- /dev/null
+++ b/.drone.yml
@@ -0,0 +1,9 @@
+image: python2.7
+env:
+  - POSTGRESQL_URI=postgresql://postgres@127.0.0.1:5432/
+  - MYSQL_URI=mysql://root@127.0.0.1:3306/
+script:
+  - pip install tox
+  - tox -e "py27-{sqlite,postgresql}"
+services:
+  - postgres
diff --git a/CHANGELOG b/CHANGELOG
index 1298bf5..5165f0f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.8.5 - 2017-11-07
+* Bug fixes (see mercurial logs for details)
+
 Version 3.8.4 - 2017-09-04
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index fcc3345..23f7c34 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_sale
-Version: 3.8.4
+Version: 3.8.5
 Summary: Tryton module for sale
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/invoice.py b/invoice.py
index 595102a..06a30ea 100644
--- a/invoice.py
+++ b/invoice.py
@@ -73,7 +73,8 @@ class Invoice:
 
     @classmethod
     def search_sales(cls, name, clause):
-        return [('lines.origin.sale',) + tuple(clause[1:]) + ('sale.line',)]
+        return [('lines.origin.sale' + clause[0].lstrip(name),)
+            + tuple(clause[1:3]) + ('sale.line',) + tuple(clause[3:])]
 
     @classmethod
     def copy(cls, invoices, default=None):
diff --git a/sale.py b/sale.py
index 8198a98..4067317 100644
--- a/sale.py
+++ b/sale.py
@@ -530,7 +530,8 @@ class Sale(Workflow, ModelSQL, ModelView, TaxableMixin):
 
     @classmethod
     def search_invoices(cls, name, clause):
-        return [('lines.invoice_lines.invoice',) + tuple(clause[1:])]
+        return [('lines.invoice_lines.invoice' + clause[0].lstrip(name),)
+            + tuple(clause[1:])]
 
     def get_invoice_state(self):
         '''
@@ -578,12 +579,12 @@ class Sale(Workflow, ModelSQL, ModelView, TaxableMixin):
         Search on shipments or returns
         '''
         def method(self, name, clause):
-            if isinstance(clause[2], basestring):
-                target = 'rec_name'
+            nested = clause[0].lstrip(name)
+            if nested:
+                return [('lines.moves.shipment' + nested,)
+                    + tuple(clause[1:3]) + (model_name,) + tuple(clause[3:])]
             else:
-                target = 'id'
-            return [('lines.moves.shipment.' + target,) + tuple(clause[1:])
-                + (model_name,)]
+                return [('lines.moves.shipment',) + tuple(clause[1:3])]
         return classmethod(method)
 
     search_shipments = search_shipments_returns('stock.shipment.out')
diff --git a/stock.py b/stock.py
index bc291ea..42b4e69 100644
--- a/stock.py
+++ b/stock.py
@@ -163,7 +163,8 @@ class Move:
 
     @classmethod
     def search_sale(cls, name, clause):
-        return [('origin.' + name,) + tuple(clause[1:]) + ('sale.line',)]
+        return [('origin.' + clause[0],) + tuple(clause[1:3])
+            + ('sale.line',) + tuple(clause[3:])]
 
     def get_sale_exception_state(self, name):
         SaleLine = Pool().get('sale.line')
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..e9d2876
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,17 @@
+[tox]
+envlist = py27-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
+
+[testenv]
+commands = {envpython} setup.py test
+deps =
+    py27-postgresql: psycopg2 >= 2.0
+    pypy-postgresql: psycopg2cffi >= 2.5
+    mysql: MySQL-python
+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/tryton.cfg b/tryton.cfg
index 6a5a102..72ac8a4 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.8.4
+version=3.8.5
 depends:
     account
     account_invoice
diff --git a/trytond_sale.egg-info/PKG-INFO b/trytond_sale.egg-info/PKG-INFO
index 7bd081e..88c7f0c 100644
--- a/trytond_sale.egg-info/PKG-INFO
+++ b/trytond_sale.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-sale
-Version: 3.8.4
+Version: 3.8.5
 Summary: Tryton module for sale
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond_sale.egg-info/SOURCES.txt b/trytond_sale.egg-info/SOURCES.txt
index 1bfccd0..9553d1a 100644
--- a/trytond_sale.egg-info/SOURCES.txt
+++ b/trytond_sale.egg-info/SOURCES.txt
@@ -1,16 +1,25 @@
+.drone.yml
+.hgtags
 CHANGELOG
 COPYRIGHT
 INSTALL
 LICENSE
 MANIFEST.in
 README
+__init__.py
+configuration.py
 configuration.xml
+invoice.py
 party.xml
+product.py
 product.xml
 sale.odt
+sale.py
 sale.xml
 setup.py
+stock.py
 stock.xml
+tox.ini
 tryton.cfg
 ./__init__.py
 ./configuration.py
@@ -79,7 +88,9 @@ locale/nl_NL.po
 locale/pt_BR.po
 locale/ru_RU.po
 locale/sl_SI.po
+tests/__init__.py
 tests/scenario_sale.rst
+tests/test_sale.py
 trytond_sale.egg-info/PKG-INFO
 trytond_sale.egg-info/SOURCES.txt
 trytond_sale.egg-info/dependency_links.txt
-- 
tryton-modules-sale



More information about the tryton-debian-vcs mailing list