[tryton-debian-vcs] tryton-modules-purchase branch upstream-2.2 created. 5283408204c6fd37e026fd9973f48ac7a0f7f972

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Nov 27 17:07:43 UTC 2013


The following commit has been merged in the upstream-2.2 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-purchase.git;a=commitdiff;h=5283408204c6fd37e026fd9973f48ac7a0f7f972
commit 5283408204c6fd37e026fd9973f48ac7a0f7f972
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Sun Feb 24 19:46:19 2013 +0100

    Adding upstream version 2.2.2.

diff --git a/CHANGELOG b/CHANGELOG
index 7aaf5f3..63b2c4f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.2.2 - 2012-11-05
+* Bug fixes (see mercurial logs for details)
+
 Version 2.2.1 - 2012-05-07
 * Bug fixes (see mercurial logs for details)
 
diff --git a/PKG-INFO b/PKG-INFO
index c42f61d..3450098 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_purchase
-Version: 2.2.1
+Version: 2.2.2
 Summary: Define purchase order.
 Add product supplier and purchase informations.
 Define the purchase price as the supplier price or the cost price.
diff --git a/__tryton__.py b/__tryton__.py
index 55cfc67..85b0b1d 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -7,7 +7,7 @@
     'name_es_CO': 'Compras',
     'name_es_ES': 'Compras',
     'name_fr_FR': 'Achat',
-    'version': '2.2.1',
+    'version': '2.2.2',
     'author': 'B2CK',
     'email': 'info at b2ck.com',
     'website': 'http://www.tryton.org/',
diff --git a/purchase.py b/purchase.py
index 6a733ed..f3e4462 100644
--- a/purchase.py
+++ b/purchase.py
@@ -888,7 +888,8 @@ class PurchaseLine(ModelSQL, ModelView):
             'required': Eval('type') == 'line',
             'readonly': ~Eval('_parent_purchase'),
             }, on_change=['product', 'quantity', 'unit',
-            '_parent_purchase.currency', '_parent_purchase.party'],
+            '_parent_purchase.currency', '_parent_purchase.party',
+            '_parent_purchase.purchase_date'],
         depends=['unit_digits', 'type'])
     unit = fields.Many2One('product.uom', 'Unit',
         states={
@@ -913,7 +914,8 @@ class PurchaseLine(ModelSQL, ModelView):
             'invisible': Eval('type') != 'line',
             'readonly': ~Eval('_parent_purchase'),
             }, on_change=['product', 'unit', 'quantity', 'description',
-            '_parent_purchase.party', '_parent_purchase.currency'],
+            '_parent_purchase.party', '_parent_purchase.currency',
+            '_parent_purchase.purchase_date'],
         context={
             'locations': If(Bool(Eval('_parent_purchase', {}).get(
                         'warehouse')),
@@ -1748,7 +1750,7 @@ class Move(ModelSQL, ModelView):
         return res
 
     def search_purchase(self, name, clause):
-        return [('purchase_line.' + name,) + clause[1:]]
+        return [('purchase_line.' + name,) + tuple(clause[1:])]
 
     def get_purchase_fields(self, ids, names):
         res = {}
@@ -1806,7 +1808,7 @@ class Move(ModelSQL, ModelView):
         return res
 
     def search_supplier(self, name, clause):
-        return [('purchase_line.purchase.party',) + clause[1:]]
+        return [('purchase_line.purchase.party',) + tuple(clause[1:])]
 
     def write(self, ids, vals):
         purchase_obj = Pool().get('purchase.purchase')
diff --git a/trytond_purchase.egg-info/PKG-INFO b/trytond_purchase.egg-info/PKG-INFO
index 2ff677d..d55ee35 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: 2.2.1
+Version: 2.2.2
 Summary: Define purchase order.
 Add product supplier and purchase informations.
 Define the purchase price as the supplier price or the cost price.
commit d466c08a7d26e12fa512f1260fa79ee169a8b71c
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed May 9 12:01:17 2012 +0200

    Adding upstream version 2.2.1.

diff --git a/CHANGELOG b/CHANGELOG
index 9e84f65..7aaf5f3 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.2.1 - 2012-05-07
+* Bug fixes (see mercurial logs for details)
+
 Version 2.2.0 - 2011-10-25
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index a9feb41..83c0f58 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2008-2011 Cédric Krier.
+Copyright (C) 2008-2012 Cédric Krier.
 Copyright (C) 2008-2011 Bertrand Chenal.
-Copyright (C) 2008-2011 B2CK SPRL.
+Copyright (C) 2008-2012 B2CK SPRL.
 Copyright (C) 2004-2008 Tiny SPRL.
 
 This program is free software: you can redistribute it and/or modify
diff --git a/PKG-INFO b/PKG-INFO
index 0ced27d..c42f61d 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: trytond_purchase
-Version: 2.2.0
+Version: 2.2.1
 Summary: Define purchase order.
 Add product supplier and purchase informations.
 Define the purchase price as the supplier price or the cost price.
diff --git a/__tryton__.py b/__tryton__.py
index 57f5d5f..55cfc67 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -7,7 +7,7 @@
     'name_es_CO': 'Compras',
     'name_es_ES': 'Compras',
     'name_fr_FR': 'Achat',
-    'version': '2.2.0',
+    'version': '2.2.1',
     'author': 'B2CK',
     'email': 'info at b2ck.com',
     'website': 'http://www.tryton.org/',
diff --git a/invoice.py b/invoice.py
index 07e14b8..4baf305 100644
--- a/invoice.py
+++ b/invoice.py
@@ -9,6 +9,13 @@ class Invoice(ModelSQL, ModelView):
     purchases = fields.Many2Many('purchase.purchase-account.invoice',
             'invoice', 'purchase', 'Purchases', readonly=True)
 
+    def copy(self, ids, default=None):
+        if default is None:
+            default = {}
+        default = default.copy()
+        default.setdefault('purchases', False)
+        return super(Invoice, self).copy(ids, default=default)
+
 Invoice()
 
 
@@ -18,4 +25,11 @@ class InvoiceLine(ModelSQL, ModelView):
     purchase_lines = fields.Many2Many('purchase.line-account.invoice.line',
             'invoice_line', 'purchase_line', 'Purchase Lines', readonly=True)
 
+    def copy(self, ids, default=None):
+        if default is None:
+            default = {}
+        default = default.copy()
+        default.setdefault('purchase_lines', False)
+        return super(InvoiceLine, self).copy(ids, default=default)
+
 InvoiceLine()
diff --git a/purchase.py b/purchase.py
index 9d3fbb5..6a733ed 100644
--- a/purchase.py
+++ b/purchase.py
@@ -935,7 +935,7 @@ class PurchaseLine(ModelSQL, ModelView):
             states={
                 'invisible': ~Eval('type').in_(['line', 'subtotal']),
                 'readonly': ~Eval('_parent_purchase'),
-                }, on_change_with=['type', 'quantity', 'unit_price',
+                }, on_change_with=['type', 'quantity', 'unit_price', 'unit',
                 '_parent_purchase.currency'],
             depends=['type']), 'get_amount')
     description = fields.Text('Description', size=None, required=True)
@@ -1226,6 +1226,8 @@ class PurchaseLine(ModelSQL, ModelView):
         else:
             ignored_ids = ()
         for invoice_line in line.invoice_lines:
+            if invoice_line.type != 'line':
+                continue
             if ((invoice_line.invoice and
                     invoice_line.invoice.state != 'cancel') or
                 invoice_line.id in ignored_ids):
diff --git a/trytond_purchase.egg-info/PKG-INFO b/trytond_purchase.egg-info/PKG-INFO
index c64b585..2ff677d 100644
--- a/trytond_purchase.egg-info/PKG-INFO
+++ b/trytond_purchase.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
-Metadata-Version: 1.0
+Metadata-Version: 1.1
 Name: trytond-purchase
-Version: 2.2.0
+Version: 2.2.1
 Summary: Define purchase order.
 Add product supplier and purchase informations.
 Define the purchase price as the supplier price or the cost price.
-- 
tryton-modules-purchase



More information about the tryton-debian-vcs mailing list