[tryton-debian-vcs] tryton-modules-purchase branch upstream-4.2 updated. upstream/4.2.2-1-g3315432

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.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-purchase.git;a=commitdiff;h=upstream/4.2.2-1-g3315432

commit 3315432add6a57c5d66f30ad282c872c7792ebca
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sat Nov 11 15:13:36 2017 +0100

    Adding upstream version 4.2.3.
    
    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 3526902..a5ce6db 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 4.2.3 - 2017-11-07
+* Bug fixes (see mercurial logs for details)
+
 Version 4.2.2 - 2017-09-04
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index d19edce..dde9455 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_purchase
-Version: 4.2.2
+Version: 4.2.3
 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 c4e1083..b0c0cba 100644
--- a/purchase.py
+++ b/purchase.py
@@ -500,7 +500,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):
         '''
@@ -1056,7 +1057,7 @@ class PurchaseLine(sequence_ordered(), 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..08e43cf
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,18 @@
+[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
+    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/tryton.cfg b/tryton.cfg
index 90b3c27..32e8670 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=4.2.2
+version=4.2.3
 depends:
     account
     account_invoice
diff --git a/trytond_purchase.egg-info/PKG-INFO b/trytond_purchase.egg-info/PKG-INFO
index 4c84831..16c5e98 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.2.2
+Version: 4.2.3
 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 436af72..239dbec 100644
--- a/trytond_purchase.egg-info/SOURCES.txt
+++ b/trytond_purchase.egg-info/SOURCES.txt
@@ -1,16 +1,26 @@
+.drone.yml
+.hgtags
 CHANGELOG
 COPYRIGHT
 INSTALL
 LICENSE
 MANIFEST.in
 README
+__init__.py
+configuration.py
 configuration.xml
+invoice.py
+party.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
@@ -86,7 +96,9 @@ locale/pt_BR.po
 locale/ru.po
 locale/sl.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