[tryton-debian-vcs] tryton-modules-account branch upstream-2.8 updated. upstream/2.8.2-1-gd794f9d

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Mar 26 20:35:10 UTC 2014


The following commit has been merged in the upstream-2.8 branch:
https://alioth.debian.org/plugins/scmgit/cgi-bin/gitweb.cgi/?p=tryton/tryton-modules-account.git;a=commitdiff;h=upstream/2.8.2-1-gd794f9d

commit d794f9d86a39afa9fdb5783c9280ddb393be0f17
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Mar 26 21:24:00 2014 +0100

    Adding upstream version 2.8.3.

diff --git a/CHANGELOG b/CHANGELOG
index 950ee18..ff31f81 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.8.3 - 2014-03-22
+* Bug fixes (see mercurial logs for details)
+
 Version 2.8.2 - 2013-10-01
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index 5d422e0..77715d8 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,6 +1,6 @@
-Copyright (C) 2008-2013 Cédric Krier.
+Copyright (C) 2008-2014 Cédric Krier.
 Copyright (C) 2008-2013 Bertrand Chenal.
-Copyright (C) 2008-2013 B2CK SPRL.
+Copyright (C) 2008-2014 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 16121e7..e3ef27a 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_account
-Version: 2.8.2
+Version: 2.8.3
 Summary: Tryton module for accounting
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/tax.py b/tax.py
index edc830d..49c2410 100644
--- a/tax.py
+++ b/tax.py
@@ -767,48 +767,60 @@ class Tax(ModelSQL, ModelView):
 
         if self.template:
             vals = self.template._get_tax_value(tax=self)
-            if (self.template.invoice_account
-                    and self.invoice_account.id != template2account.get(
-                        self.template.invoice_account.id)):
+            invoice_account_id = (self.invoice_account.id
+                if self.invoice_account else None)
+            if (self.template.invoice_account and
+                    invoice_account_id != template2account.get(
+                            self.template.invoice_account.id)):
                 vals['invoice_account'] = template2account.get(
                     self.template.invoice_account.id)
             elif (not self.template.invoice_account
                     and self.invoice_account):
                 vals['invoice_account'] = None
-            if (self.template.credit_note_account
-                    and self.credit_note_account.id != template2account.get(
+            credit_note_account_id = (self.credit_note_account.id
+                if self.credit_note_account else None)
+            if (self.template.credit_note_account and
+                    credit_note_account_id != template2account.get(
                         self.template.credit_note_account.id)):
                 vals['credit_note_account'] = template2account.get(
                     self.template.credit_note_account.id)
             elif (not self.template.credit_note_account
                     and self.credit_note_account):
                 vals['credit_note_account'] = None
-            if (self.template.invoice_base_code
-                    and self.invoice_base_code.id != template2tax_code.get(
-                        self.template.invoice_base_code.id)):
+            invoice_base_code_id = (self.invoice_base_code.id
+                if self.invoice_base_code else None)
+            if (self.template.invoice_base_code and
+                    invoice_base_code_id != template2tax_code.get(
+                            self.template.invoice_base_code.id)):
                 vals['invoice_base_code'] = template2tax_code.get(
                     self.template.invoice_base_code.id)
             elif (not self.template.invoice_base_code
                     and self.invoice_base_code):
                 vals['invoice_base_code'] = None
+            invoice_tax_code_id = (self.invoice_tax_code.id
+                if self.invoice_tax_code else None)
             if (self.template.invoice_tax_code
-                    and self.invoice_tax_code.id != template2tax_code.get(
+                    and invoice_tax_code_id != template2tax_code.get(
                         self.template.invoice_tax_code.id)):
                 vals['invoice_tax_code'] = template2tax_code.get(
                     self.template.invoice_tax_code.id)
             elif (not self.template.invoice_tax_code
                     and self.invoice_tax_code):
                 vals['invoice_tax_code'] = None
+            credit_note_base_code_id = (self.credit_note_base_code.id
+                if self.credit_note_base_code else None)
             if (self.template.credit_note_base_code
-                    and self.credit_note_base_code.id != template2tax_code.get(
+                    and credit_note_base_code_id != template2tax_code.get(
                         self.template.credit_note_base_code.id)):
                 vals['credit_note_base_code'] = template2tax_code.get(
                     self.template.credit_note_base_code.id)
             elif (not self.template.credit_note_base_code
                     and self.credit_note_base_code):
                 vals['credit_note_base_code'] = None
+            credit_note_tax_code_id = (self.credit_note_tax_code.id
+                if self.credit_note_tax_code else None)
             if (self.template.credit_note_tax_code
-                    and self.credit_note_tax_code.id != template2tax_code.get(
+                    and credit_note_tax_code_id != template2tax_code.get(
                         self.template.credit_note_tax_code.id)):
                 vals['credit_note_tax_code'] = template2tax_code.get(
                     self.template.credit_note_tax_code.id)
@@ -1079,8 +1091,6 @@ class TaxRuleLineTemplate(ModelSQL, ModelView):
         res = {}
         if not rule_line or rule_line.group != self.group:
             res['group'] = self.group.id if self.group else None
-        if not rule_line or rule_line.origin_tax != self.origin_tax:
-            res['origin_tax'] = self.origin_tax.id if self.origin_tax else None
         if not rule_line or rule_line.sequence != self.sequence:
             res['sequence'] = self.sequence
         if not rule_line or rule_line.template != self:
@@ -1230,14 +1240,22 @@ class TaxRuleLine(ModelSQL, ModelView):
                 vals['rule'] = template2rule[self.template.rule.id]
             if self.origin_tax:
                 if self.template.origin_tax:
-                    if self.origin_tax.id != \
-                            template2tax[self.template.origin_tax.id]:
+                    if (self.origin_tax.id !=
+                            template2tax[self.template.origin_tax.id]):
                         vals['origin_tax'] = template2tax[
                             self.template.origin_tax.id]
+                else:
+                    vals['origin_tax'] = None
+            elif self.template.origin_tax:
+                vals['origin_tax'] = template2tax[self.template.origin_tax.id]
             if self.tax:
                 if self.template.tax:
                     if self.tax.id != template2tax[self.template.tax.id]:
                         vals['tax'] = template2tax[self.template.tax.id]
+                else:
+                    vals['tax'] = None
+            elif self.template.tax:
+                vals['tax'] = template2tax[self.template.tax.id]
             if vals:
                 self.write([self], vals)
             template2rule_line[self.template.id] = self.id
diff --git a/tryton.cfg b/tryton.cfg
index e47ec54..a855244 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=2.8.2
+version=2.8.3
 depends:
     company
     currency
diff --git a/trytond_account.egg-info/PKG-INFO b/trytond_account.egg-info/PKG-INFO
index 352160c..0d4ce4b 100644
--- a/trytond_account.egg-info/PKG-INFO
+++ b/trytond_account.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-account
-Version: 2.8.2
+Version: 2.8.3
 Summary: Tryton module for accounting
 Home-page: http://www.tryton.org/
 Author: Tryton
-- 
tryton-modules-account



More information about the tryton-debian-vcs mailing list