[tryton-debian-vcs] tryton-modules-account-invoice branch upstream-3.6 updated. upstream/3.6.2-1-ga957a30
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Wed Feb 10 19:53:21 UTC 2016
The following commit has been merged in the upstream-3.6 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-account-invoice.git;a=commitdiff;h=upstream/3.6.2-1-ga957a30
commit a957a3038c5d7d9f5dd07dc48c8dadaffd8eaf53
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Wed Feb 10 18:41:55 2016 +0100
Adding upstream version 3.6.3.
Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>
diff --git a/CHANGELOG b/CHANGELOG
index 042a2d3..0036060 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.6.3 - 2016-02-06
+* Bug fixes (see mercurial logs for details)
+
Version 3.6.2 - 2015-12-22
* Bug fixes (see mercurial logs for details)
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 d96689a..42dc640 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_account_invoice
-Version: 3.6.2
+Version: 3.6.3
Summary: Tryton module for invoicing
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/invoice.py b/invoice.py
index 739ef00..c981a53 100644
--- a/invoice.py
+++ b/invoice.py
@@ -440,13 +440,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):
@@ -721,8 +714,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):
@@ -2108,7 +2115,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 c6d9da1..05a2f31 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.6.2
+version=3.6.3
depends:
account
account_product
diff --git a/trytond_account_invoice.egg-info/PKG-INFO b/trytond_account_invoice.egg-info/PKG-INFO
index 5e42c1a..64e4648 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.6.2
+Version: 3.6.3
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