[tryton-debian-vcs] tryton-modules-account-invoice branch debian updated. debian/3.8.0-1-3-gb97eb85
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Wed Feb 10 19:53:20 UTC 2016
The following commit has been merged in the debian branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-account-invoice.git;a=commitdiff;h=debian/3.8.0-1-3-gb97eb85
commit b97eb8598f4b4447e40076d37729fdfae7894806
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Feb 10 18:40:14 2016 +0100
Releasing debian version 3.8.1-1.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/debian/changelog b/debian/changelog
index e4e76c9..2b442e7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+tryton-modules-account-invoice (3.8.1-1) unstable; urgency=medium
+
+ * Merging upstream version 3.8.1.
+ * Updating copyright file.
+
+ -- Mathias Behrle <mathiasb at m9s.biz> Wed, 10 Feb 2016 18:40:14 +0100
+
tryton-modules-account-invoice (3.8.0-1) unstable; urgency=medium
* Adapting section naming in gbp.conf to current git-buildpackage.
commit 9928483819f10859a694f0c333801732a509a684
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Feb 10 18:40:14 2016 +0100
Updating copyright file.
diff --git a/debian/copyright b/debian/copyright
index f8372ae..0cb70c3 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,9 +1,9 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Files: *
-Copyright: 2008-2015 Cédric Krier
+Copyright: 2008-2016 Cédric Krier
2008-2013 Bertrand Chenal
- 2008-2015 B2CK SPRL
+ 2008-2016 B2CK SPRL
2004-2008 Tiny SPRL
License: GPL-3+
commit bd6110cb53c55f6e9565b4f15cacbbfd10340014
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Feb 10 18:40:14 2016 +0100
Merging upstream version 3.8.1.
diff --git a/CHANGELOG b/CHANGELOG
index 5147e51..d701442 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.8.1 - 2016-02-06
+* Bug fixes (see mercurial logs for details)
+
Version 3.8.0 - 2015-11-02
* Bug fixes (see mercurial logs for details)
* Don't set default unit price on invoice line
diff --git a/COPYRIGHT b/COPYRIGHT
index 3a28212..48f96af 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2008-2015 Cédric Krier.
+Copyright (C) 2008-2016 Cédric Krier.
Copyright (C) 2008-2013 Bertrand Chenal.
-Copyright (C) 2008-2015 B2CK SPRL.
+Copyright (C) 2008-2016 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 0a568ed..dd7c347 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_account_invoice
-Version: 3.8.0
+Version: 3.8.1
Summary: Tryton module for invoicing
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/invoice.py b/invoice.py
index 811bb88..b77135d 100644
--- a/invoice.py
+++ b/invoice.py
@@ -452,13 +452,6 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin):
if self.lines:
for line in self.lines:
self.untaxed_amount += getattr(line, 'amount', None) or 0
- for attribute, default_value in (
- ('taxes', []),
- ('unit_price', Decimal(0)),
- ('quantity', 0.),
- ):
- if not getattr(line, attribute, None):
- setattr(line, attribute, default_value)
computed_taxes = self._get_taxes()
def is_zero(amount):
@@ -733,8 +726,22 @@ class Invoice(Workflow, ModelSQL, ModelView, TaxableMixin):
@property
def taxable_lines(self):
- return [(l.taxes, l.unit_price, l.quantity) for l in self.lines
- if l.type == 'line']
+ taxable_lines = []
+ # In case we're called from an on_change we have to use some sensible
+ # defaults
+ for line in self.lines:
+ if getattr(line, 'type', None) != 'line':
+ continue
+ taxable_lines.append(tuple())
+ for attribute, default_value in [
+ ('taxes', []),
+ ('unit_price', Decimal(0)),
+ ('quantity', 0.),
+ ]:
+ value = getattr(line, attribute, None)
+ taxable_lines[-1] += (
+ value if value is not None else default_value,)
+ return taxable_lines
@property
def tax_type(self):
@@ -2091,7 +2098,7 @@ class InvoiceTax(ModelSQL, ModelView):
if not self.tax:
return
if self.invoice:
- context = self.invoice.get_tax_context()
+ context = self.invoice._get_tax_context()
else:
context = {}
with Transaction().set_context(**context):
diff --git a/tryton.cfg b/tryton.cfg
index 7f11b80..0d3ddd2 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.8.0
+version=3.8.1
depends:
account
account_product
diff --git a/trytond_account_invoice.egg-info/PKG-INFO b/trytond_account_invoice.egg-info/PKG-INFO
index 50ad2bb..ea6b7a3 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: 3.8.0
+Version: 3.8.1
Summary: Tryton module for invoicing
Home-page: http://www.tryton.org/
Author: Tryton
--
tryton-modules-account-invoice
More information about the tryton-debian-vcs
mailing list