[tryton-debian-vcs] tryton-modules-account-invoice branch upstream-2.2 created. f7163f271628da0e51819986e60bc03f87127ec7
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Wed Nov 27 16:55:22 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-account-invoice.git;a=commitdiff;h=f7163f271628da0e51819986e60bc03f87127ec7
commit f7163f271628da0e51819986e60bc03f87127ec7
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Sat May 4 15:35:36 2013 +0200
Adding upstream version 2.2.3.
diff --git a/CHANGELOG b/CHANGELOG
index c865b2f..49f0fb1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.2.3 - 2013-05-02
+* Bug fixes (see mercurial logs for details)
+
Version 2.2.2 - 2012-05-07
* Bug fixes (see mercurial logs for details)
diff --git a/COPYRIGHT b/COPYRIGHT
index 83c0f58..244bb5d 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2008-2012 Cédric Krier.
+Copyright (C) 2008-2013 Cédric Krier.
Copyright (C) 2008-2011 Bertrand Chenal.
-Copyright (C) 2008-2012 B2CK SPRL.
+Copyright (C) 2008-2013 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 18378dc..c6da85c 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_account_invoice
-Version: 2.2.2
+Version: 2.2.3
Summary: Financial and Accounting Module with:
- Payment Term
- Invoice / Credit Note
diff --git a/__tryton__.py b/__tryton__.py
index 1d86fb5..90c134e 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -8,7 +8,7 @@
'name_es_ES': 'Facturación',
'name_fr_FR': 'Facturation',
'name_nl_NL': 'Facturatie',
- 'version': '2.2.2',
+ 'version': '2.2.3',
'author': 'B2CK',
'email': 'info at b2ck.com',
'website': 'http://www.tryton.org/',
diff --git a/invoice.py b/invoice.py
index bb3dacb..a8bda5c 100644
--- a/invoice.py
+++ b/invoice.py
@@ -384,6 +384,7 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView):
def _on_change_lines_taxes(self, vals):
currency_obj = Pool().get('currency.currency')
tax_obj = Pool().get('account.tax')
+ invoice_tax_obj = Pool().get('account.invoice.tax')
res = {
'untaxed_amount': Decimal('0.0'),
'tax_amount': Decimal('0.0'),
@@ -459,7 +460,8 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView):
if key not in tax_keys:
res['tax_amount'] += computed_taxes[key]['amount']
res['taxes'].setdefault('add', [])
- value = tax_obj.default_get(tax_obj._columns.keys())
+ value = invoice_tax_obj.default_get(
+ invoice_tax_obj._columns.keys())
value.update(computed_taxes[key])
res['taxes']['add'].append(value)
if currency:
diff --git a/trytond_account_invoice.egg-info/PKG-INFO b/trytond_account_invoice.egg-info/PKG-INFO
index e05271a..537feff 100644
--- a/trytond_account_invoice.egg-info/PKG-INFO
+++ b/trytond_account_invoice.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond-account-invoice
-Version: 2.2.2
+Version: 2.2.3
Summary: Financial and Accounting Module with:
- Payment Term
- Invoice / Credit Note
commit 164d60eb649b8a3d320eabe26558efe71720784d
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed May 9 11:47:27 2012 +0200
Adding upstream version 2.2.2.
diff --git a/CHANGELOG b/CHANGELOG
index a86d3b4..c865b2f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.2.2 - 2012-05-07
+* Bug fixes (see mercurial logs for details)
+
Version 2.2.1 - 2011-12-26
* 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 7b43f96..18378dc 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_account_invoice
-Version: 2.2.1
+Version: 2.2.2
Summary: Financial and Accounting Module with:
- Payment Term
- Invoice / Credit Note
diff --git a/__tryton__.py b/__tryton__.py
index 51239e5..1d86fb5 100644
--- a/__tryton__.py
+++ b/__tryton__.py
@@ -8,7 +8,7 @@
'name_es_ES': 'Facturación',
'name_fr_FR': 'Facturation',
'name_nl_NL': 'Facturatie',
- 'version': '2.2.1',
+ 'version': '2.2.2',
'author': 'B2CK',
'email': 'info at b2ck.com',
'website': 'http://www.tryton.org/',
diff --git a/invoice.py b/invoice.py
index 4c20569..bb3dacb 100644
--- a/invoice.py
+++ b/invoice.py
@@ -190,15 +190,23 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView):
if (table.column_exist('invoice_report')
and table.column_exist('invoice_report_cache')):
- cursor.execute('SELECT id, invoice_report '
+ limit = cursor.IN_MAX
+ cursor.execute('SELECT COUNT(id) '
'FROM "' + self._table + '"')
- for invoice_id, report in cursor.fetchall():
- if report:
- report = buffer(base64.decodestring(str(report)))
- cursor.execute('UPDATE "' + self._table + '" '
- 'SET invoice_report_cache = %s '
- 'WHERE id = %s', (report, invoice_id))
- table.drop_column('invoice_report')
+ invoice_count, = cursor.fetchone()
+ for offset in range(0, invoice_count, limit):
+ cursor.execute(cursor.limit_clause(
+ 'SELECT id, invoice_report '
+ 'FROM "' + self._table + '"'
+ 'ORDER BY id',
+ limit, offset))
+ for invoice_id, report in cursor.fetchall():
+ if report:
+ report = buffer(base64.decodestring(str(report)))
+ cursor.execute('UPDATE "' + self._table + '" '
+ 'SET invoice_report_cache = %s '
+ 'WHERE id = %s', (report, invoice_id))
+ table.drop_column('invoice_report')
# Add index on create_date
table.index_action('create_date', action='add')
@@ -451,7 +459,9 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView):
if key not in tax_keys:
res['tax_amount'] += computed_taxes[key]['amount']
res['taxes'].setdefault('add', [])
- res['taxes']['add'].append(computed_taxes[key])
+ value = tax_obj.default_get(tax_obj._columns.keys())
+ value.update(computed_taxes[key])
+ res['taxes']['add'].append(value)
if currency:
res['untaxed_amount'] = currency_obj.round(currency,
res['untaxed_amount'])
@@ -1135,7 +1145,7 @@ class Invoice(ModelWorkflow, ModelSQL, ModelView):
'amount_second_currency': amount_second_currency,
'second_currency': second_currency,
})
- if invoice.account.id == journal.debit_account.id:
+ if invoice.account.id == journal.credit_account.id:
self.raise_user_error('same_credit_account')
if not journal.credit_account:
self.raise_user_error('missing_credit_account')
diff --git a/trytond_account_invoice.egg-info/PKG-INFO b/trytond_account_invoice.egg-info/PKG-INFO
index d26eb65..e05271a 100644
--- a/trytond_account_invoice.egg-info/PKG-INFO
+++ b/trytond_account_invoice.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond-account-invoice
-Version: 2.2.1
+Version: 2.2.2
Summary: Financial and Accounting Module with:
- Payment Term
- Invoice / Credit Note
--
tryton-modules-account-invoice
More information about the tryton-debian-vcs
mailing list