From 42235ffc1fc187821f96098428217f39f5168913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 25 Oct 2011 10:23:28 +0200 Subject: [PATCH 01/12] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 57f5d5f2f7..55cfc6766c 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@b2ck.com', 'website': 'http://www.tryton.org/', From 3610635e0761721c4f4b2686fa57f698cea0d57a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Thu, 1 Mar 2012 10:20:43 +0100 Subject: [PATCH 02/12] Don't link copied invoice to purchase issue2466 review259001 (transplanted from 7b21402747e668a958b203d5da26d67050189b1b) --- invoice.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/invoice.py b/invoice.py index 07e14b8121..4baf3056ae 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() From 33dfcf77bdccae996b739d9464601c2bfeaba15b Mon Sep 17 00:00:00 2001 From: Robin Baumgartner Date: Wed, 21 Mar 2012 08:47:42 +0100 Subject: [PATCH 03/12] Change purchase line with amount issue2465 review257001 (transplanted from 48478a0cb31264c5fdaa3e174c23403b40179836) --- purchase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/purchase.py b/purchase.py index 9d3fbb5d49..d535f376c0 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) From 07fc18a582903dc4d3b1e102e5afaf57483193a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 13 Apr 2012 13:17:58 +0200 Subject: [PATCH 04/12] Skip invoice line not type "line" when compute invoiced quantities review322002 (transplanted from bbd264311886bffbb50cde8749cc9b8b588f2143) --- purchase.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/purchase.py b/purchase.py index d535f376c0..6a733ede2c 100644 --- a/purchase.py +++ b/purchase.py @@ -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): From cced055ca6ceb3e5eef2d09bb88286bc866709ac Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 7 May 2012 11:09:57 +0200 Subject: [PATCH 05/12] Prepare release 2.2.1 --- CHANGELOG | 3 +++ COPYRIGHT | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 9e84f65cae..7aaf5f3e09 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 a9feb419c1..83c0f58495 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 From 1dcdfeed20e600bf38f115ee1661da26417ca01d Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 7 May 2012 11:09:58 +0200 Subject: [PATCH 06/12] Added tag 2.2.1 for changeset 1be08e529e22 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index 9e12185c85..fb84bf365a 100644 --- a/.hgtags +++ b/.hgtags @@ -5,3 +5,4 @@ eaeea51fd310f387cc5593ac03caa0a7926ed377 1.6.0 c5a5d252430911794635b127796bb69727c4c50f 1.8.0 cf37cf340aadf693703bb72cd9090349698f5eec 2.0.0 155968df100be420b04452a4a66bff26d9b09d9c 2.2.0 +1be08e529e22736ece7739a12d28ca18f6aca16e 2.2.1 From 01753847b8ff84b884850b9962a24993a1bcf352 Mon Sep 17 00:00:00 2001 From: Mathias Behrle Date: Mon, 7 May 2012 11:10:03 +0200 Subject: [PATCH 07/12] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 55cfc6766c..85b0b1d23c 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@b2ck.com', 'website': 'http://www.tryton.org/', From dda4cbcec9350e3f23160a206e52367a388a0af9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 4 Sep 2012 22:56:49 +0200 Subject: [PATCH 08/12] Add missing purchase_date on some on_change (transplanted from 77f83b533286699cd46d3a9b8471fa5ab75633f2) --- purchase.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/purchase.py b/purchase.py index 6a733ede2c..7bdfe2999a 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')), From 7dc18a3e78211e07b7d1f7d18b93a31dd8323307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 4 Sep 2012 22:56:05 +0200 Subject: [PATCH 09/12] Ensure clause concatination works with tuple vs list (transplanted from 3d76a745fddda78eea54f5c75824e78dc4e7d1f0) --- purchase.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/purchase.py b/purchase.py index 7bdfe2999a..f3e4462c2d 100644 --- a/purchase.py +++ b/purchase.py @@ -1750,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 = {} @@ -1808,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') From c45b0a9ae20ff8672b79002ed13e8d705da5059f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 5 Nov 2012 18:30:42 +0100 Subject: [PATCH 10/12] Prepare release 2.2.2 --- CHANGELOG | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 7aaf5f3e09..63b2c4ffbd 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) From 072f906ed3328f20aed27eda85d3804e5912fa6d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 5 Nov 2012 18:30:43 +0100 Subject: [PATCH 11/12] Added tag 2.2.2 for changeset c639b1f020b2 --- .hgtags | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgtags b/.hgtags index fb84bf365a..064b70eab0 100644 --- a/.hgtags +++ b/.hgtags @@ -6,3 +6,4 @@ c5a5d252430911794635b127796bb69727c4c50f 1.8.0 cf37cf340aadf693703bb72cd9090349698f5eec 2.0.0 155968df100be420b04452a4a66bff26d9b09d9c 2.2.0 1be08e529e22736ece7739a12d28ca18f6aca16e 2.2.1 +c639b1f020b259beeb3266b02273dd078f8ffddd 2.2.2 From 548848279253f19257870ebfae69007c23e22953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 5 Nov 2012 18:30:54 +0100 Subject: [PATCH 12/12] Increase version number --- __tryton__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/__tryton__.py b/__tryton__.py index 85b0b1d23c..976ccb7aa5 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.2', + 'version': '2.2.3', 'author': 'B2CK', 'email': 'info@b2ck.com', 'website': 'http://www.tryton.org/',