[tryton-debian-vcs] tryton-modules-purchase branch upstream-4.0 updated. upstream/4.0.4-1-ge1a10c9

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


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

commit e1a10c914eba9a546d914fe6751f961c8df3578d
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Nov 11 15:11:57 2017 +0100

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

diff --git a/.drone.yml b/.drone.yml
new file mode 100644
index 0000000..c4fd423
--- /dev/null
+++ b/.drone.yml
@@ -0,0 +1,9 @@
+image: python:all
+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,py33,py34,py35}-{sqlite,postgresql}" --skip-missing-interpreters
+services:
+  - postgres
diff --git a/CHANGELOG b/CHANGELOG
index f75d121..98bfe63 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.0.5 - 2017-11-07
+* Bug fixes (see mercurial logs for details)
+
 Version 4.0.4 - 2017-09-04
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index 7ca45de..019b13d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_purchase
-Version: 4.0.4
+Version: 4.0.5
 Summary: Tryton module for purchase
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/invoice.py b/invoice.py
index 004783b..7452759 100644
--- a/invoice.py
+++ b/invoice.py
@@ -66,8 +66,8 @@ class Invoice:
 
     @classmethod
     def search_purchases(cls, name, clause):
-        return [('lines.origin.purchase',) + tuple(clause[1:])
-            + ('purchase.line',)]
+        return [('lines.origin.purchase' + clause[0].lstrip(name),)
+            + tuple(clause[1:3]) + ('purchase.line',) + tuple(clause[3:])]
 
     @classmethod
     @process_purchase
diff --git a/purchase.py b/purchase.py
index 2b2f923..b8b83a6 100644
--- a/purchase.py
+++ b/purchase.py
@@ -505,7 +505,8 @@ class Purchase(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):
         '''
@@ -1051,7 +1052,7 @@ class PurchaseLine(ModelSQL, ModelView):
         if self.unit:
             context['uom'] = self.unit.id
         else:
-            self.product.purchase_uom.id
+            context['uom'] = self.product.purchase_uom.id
         context['taxes'] = [t.id for t in self.taxes]
         return context
 
diff --git a/stock.py b/stock.py
index 191e829..ed493d6 100644
--- a/stock.py
+++ b/stock.py
@@ -248,7 +248,8 @@ class Move:
 
     @classmethod
     def search_purchase(cls, name, clause):
-        return [('origin.' + name,) + tuple(clause[1:]) + ('purchase.line',)]
+        return [('origin.' + clause[0],) + tuple(clause[1:3])
+            + ('purchase.line',) + tuple(clause[3:])]
 
     def get_purchase_exception_state(self, name):
         PurchaseLine = Pool().get('purchase.line')
@@ -300,8 +301,8 @@ class Move:
 
     @classmethod
     def search_supplier(cls, name, clause):
-        return [('origin.purchase.party',) + tuple(clause[1:]) +
-            ('purchase.line',)]
+        return [('origin.purchase.party' + clause[0].lstrip(name),)
+            + tuple(clause[1:3]) + ('purchase.line',) + tuple(clause[3:])]
 
     @classmethod
     @ModelView.button
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..3dda9ab
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,17 @@
+[tox]
+envlist = {py27,py33,py34,py35}-{sqlite,postgresql,mysql},pypy-{sqlite,postgresql}
+
+[testenv]
+commands = {envpython} setup.py test
+deps =
+    {py27,py33,py34,py35}-postgresql: psycopg2 >= 2.5
+    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 0a7d63a..c68484d 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=4.0.4
+version=4.0.5
 depends:
     account
     account_invoice
diff --git a/trytond_purchase.egg-info/PKG-INFO b/trytond_purchase.egg-info/PKG-INFO
index efd85cf..b9642c4 100644
--- a/trytond_purchase.egg-info/PKG-INFO
+++ b/trytond_purchase.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-purchase
-Version: 4.0.4
+Version: 4.0.5
 Summary: Tryton module for purchase
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond_purchase.egg-info/SOURCES.txt b/trytond_purchase.egg-info/SOURCES.txt
index 99faf84..f99329f 100644
--- a/trytond_purchase.egg-info/SOURCES.txt
+++ b/trytond_purchase.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
 purchase.odt
+purchase.py
 purchase.xml
 setup.py
+stock.py
 stock.xml
+tox.ini
 tryton.cfg
 ./__init__.py
 ./configuration.py
@@ -89,7 +98,9 @@ locale/pt_BR.po
 locale/ru_RU.po
 locale/sl_SI.po
 locale/zh_CN.po
+tests/__init__.py
 tests/scenario_purchase.rst
+tests/test_purchase.py
 trytond_purchase.egg-info/PKG-INFO
 trytond_purchase.egg-info/SOURCES.txt
 trytond_purchase.egg-info/dependency_links.txt
-- 
tryton-modules-purchase



More information about the tryton-debian-vcs mailing list