[tryton-debian-vcs] tryton-modules-account-asset branch debian-jessie-2.8 updated. debian/2.8.2-1-3-g5231d98

Mathias Behrle tryton-debian-vcs at alioth.debian.org
Wed Nov 12 13:48:39 UTC 2014


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

commit 5231d98952797890743d8af870748722a17bb14d
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Nov 12 13:32:56 2014 +0100

    Releasing debian version 2.8.3-1.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/debian/changelog b/debian/changelog
index 718f7c5..9e2c730 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+tryton-modules-account-asset (2.8.3-1) unstable; urgency=medium
+
+  * Merging upstream version 2.8.3.
+  * Updating copyright file.
+
+ -- Mathias Behrle <mathiasb at m9s.biz>  Wed, 12 Nov 2014 13:32:56 +0100
+
 tryton-modules-account-asset (2.8.2-1) unstable; urgency=medium
 
   * Merging upstream version 2.8.2.
commit 7d8ff7b1e1a72896d586885e99df347192acf728
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Nov 12 13:32:55 2014 +0100

    Updating copyright file.

diff --git a/debian/copyright b/debian/copyright
index b321ffb..7ebe9fe 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,7 +1,7 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 
 Files: *
-Copyright: 2012 Nicolas Évrard
+Copyright: 2012-2014 Nicolas Évrard
            2012-2014 Cédric Krier
            2012-2013 Bertrand Chenal
            2012-2014 B2CK SPRL
commit 784bb1e90f9a7e36887ca9746f0eea514197f75a
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Nov 12 13:32:55 2014 +0100

    Merging upstream version 2.8.3.

diff --git a/CHANGELOG b/CHANGELOG
index 28cc95f..5783781 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 2.8.3 - 2014-11-06
+* Bug fixes (see mercurial logs for details)
+
 Version 2.8.2 - 2014-08-03
 * Bug fixes (see mercurial logs for details)
 
diff --git a/COPYRIGHT b/COPYRIGHT
index f5633cb..f3f7030 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,4 +1,4 @@
-Copyright (C) 2012 Nicolas Évrard.
+Copyright (C) 2012-2014 Nicolas Évrard.
 Copyright (C) 2012-2014 Cédric Krier.
 Copyright (C) 2012-2013 Bertrand Chenal.
 Copyright (C) 2012-2014 B2CK SPRL.
diff --git a/PKG-INFO b/PKG-INFO
index 7750533..16f6371 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_account_asset
-Version: 2.8.2
+Version: 2.8.3
 Summary: Tryton module for assets management
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/asset.py b/asset.py
index ef0cfef..7114b37 100644
--- a/asset.py
+++ b/asset.py
@@ -300,7 +300,7 @@ class Asset(Workflow, ModelSQL, ModelView):
         # dateutil >= 2.0 has replace __nonzero__ by __bool__ which doesn't
         # work in Python < 3
         if delta == relativedelta.relativedelta():
-            return []
+            return [self.end_date]
         if self.frequency == 'monthly':
             rule = rrule.rrule(rrule.MONTHLY, dtstart=self.start_date,
                 bymonthday=-1)
@@ -324,7 +324,10 @@ class Asset(Workflow, ModelSQL, ModelView):
                     - relativedelta.relativedelta(days=1)]
                 + [l.date for l in self.lines])
             first_delta = dates[0] - start_date
-            last_delta = dates[-1] - dates[-2]
+            if len(dates) > 1:
+                last_delta = dates[-1] - dates[-2]
+            else:
+                last_delta = first_delta
             if self.frequency == 'monthly':
                 _, first_ndays = calendar.monthrange(
                     dates[0].year, dates[0].month)
diff --git a/invoice.py b/invoice.py
index 3d5e93a..9f14ead 100644
--- a/invoice.py
+++ b/invoice.py
@@ -35,11 +35,14 @@ class InvoiceLine:
 
     def on_change_product(self):
         new_values = super(InvoiceLine, self).on_change_product()
-        if (not self.product
-                or self.invoice.type not in ('in_invoice', 'in_credit_note')):
-            return new_values
+        if self.invoice and self.invoice.type:
+            type_ = self.invoice.type
+        else:
+            type_ = self.invoice_type
 
-        if self.product.type == 'assets' and self.product.depreciable:
+        if (self.product and type_ in ('in_invoice', 'in_credit_note')
+                and self.product.type == 'assets'
+                and self.product.depreciable):
             new_values['account'] = self.product.account_asset_used.id
             new_values['account.rec_name'] = \
                 self.product.account_asset_used.rec_name
diff --git a/tryton.cfg b/tryton.cfg
index b52b0f9..3a722d4 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=2.8.2
+version=2.8.3
 depends:
     ir
     res
diff --git a/trytond_account_asset.egg-info/PKG-INFO b/trytond_account_asset.egg-info/PKG-INFO
index a5aaf9b..418438e 100644
--- a/trytond_account_asset.egg-info/PKG-INFO
+++ b/trytond_account_asset.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond-account-asset
-Version: 2.8.2
+Version: 2.8.3
 Summary: Tryton module for assets management
 Home-page: http://www.tryton.org/
 Author: Tryton
diff --git a/trytond_account_asset.egg-info/SOURCES.txt b/trytond_account_asset.egg-info/SOURCES.txt
index 0cfb1eb..0769058 100644
--- a/trytond_account_asset.egg-info/SOURCES.txt
+++ b/trytond_account_asset.egg-info/SOURCES.txt
@@ -12,12 +12,35 @@ setup.py
 tryton.cfg
 ./__init__.py
 ./account.py
+./account.xml
 ./asset.py
+./asset.xml
 ./invoice.py
+./invoice.xml
 ./product.py
+./product.xml
 ./purchase.py
+./tryton.cfg
+./locale/ca_ES.po
+./locale/de_DE.po
+./locale/es_AR.po
+./locale/es_CO.po
+./locale/es_ES.po
+./locale/fr_FR.po
 ./tests/__init__.py
+./tests/scenario_account_asset.rst
 ./tests/test_account_asset.py
+./view/asset_create_moves_start_form.xml
+./view/asset_form.xml
+./view/asset_line_form.xml
+./view/asset_line_tree.xml
+./view/asset_tree.xml
+./view/asset_update_show_depreciation_form.xml
+./view/asset_update_start_form.xml
+./view/category_form.xml
+./view/configuration_form.xml
+./view/invoice_line_form.xml
+./view/template_form.xml
 doc/index.rst
 locale/ca_ES.po
 locale/de_DE.po
-- 
tryton-modules-account-asset



More information about the tryton-debian-vcs mailing list