[tryton-debian-vcs] tryton-modules-account-asset branch upstream-3.0 updated. upstream/3.0.2-1-gde9d316

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


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

commit de9d3161eb54d0adb1c835ae86d42172c2d19dab
Author: Mathias Behrle <mathiasb at m9s.biz>
Date:   Wed Nov 12 13:06:27 2014 +0100

    Adding upstream version 3.0.3.
    
    Signed-off-by: Mathias Behrle <mathiasb at m9s.biz>

diff --git a/CHANGELOG b/CHANGELOG
index 016f55f..22870bd 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.0.3 - 2014-11-06
+* Bug fixes (see mercurial logs for details)
+
 Version 3.0.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 02248dc..8cccc2f 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: trytond_account_asset
-Version: 3.0.2
+Version: 3.0.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 7a06224..e747a5b 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
 [tryton]
-version=3.0.2
+version=3.0.3
 depends:
     ir
     res
diff --git a/trytond_account_asset.egg-info/PKG-INFO b/trytond_account_asset.egg-info/PKG-INFO
index 65e151c..b306fd3 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: 3.0.2
+Version: 3.0.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 887f0e3..14c1a37 100644
--- a/trytond_account_asset.egg-info/SOURCES.txt
+++ b/trytond_account_asset.egg-info/SOURCES.txt
@@ -12,12 +12,36 @@ 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
+./locale/sl_SI.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