diff -Nru tryton-modules-account-asset-2.8.1/asset.py tryton-modules-account-asset-2.8.4/asset.py --- tryton-modules-account-asset-2.8.1/asset.py 2014-05-07 20:00:19.000000000 +0000 +++ tryton-modules-account-asset-2.8.4/asset.py 2015-03-02 16:17:50.000000000 +0000 @@ -235,8 +235,8 @@ if invoice.company.currency != invoice.currency: with Transaction().set_context(date=invoice.currency_date): new_values['value'] = Currency.compute( - invoice.company.currency, invoice_line.amount, - invoice.currency) + invoice.currency, invoice_line.amount, + invoice.company.currency) else: new_values['value'] = invoice_line.amount if invoice.invoice_date: @@ -300,7 +300,7 @@ # 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 @@ - 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 -Nru tryton-modules-account-asset-2.8.1/CHANGELOG tryton-modules-account-asset-2.8.4/CHANGELOG --- tryton-modules-account-asset-2.8.1/CHANGELOG 2014-05-07 20:00:31.000000000 +0000 +++ tryton-modules-account-asset-2.8.4/CHANGELOG 2015-03-02 16:18:02.000000000 +0000 @@ -1,3 +1,12 @@ +Version 2.8.4 - 2015-03-02 +* Bug fixes (see mercurial logs for details) + +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) + Version 2.8.1 - 2014-05-07 * Bug fixes (see mercurial logs for details) diff -Nru tryton-modules-account-asset-2.8.1/COPYRIGHT tryton-modules-account-asset-2.8.4/COPYRIGHT --- tryton-modules-account-asset-2.8.1/COPYRIGHT 2014-05-07 20:00:30.000000000 +0000 +++ tryton-modules-account-asset-2.8.4/COPYRIGHT 2015-03-02 16:18:01.000000000 +0000 @@ -1,7 +1,7 @@ -Copyright (C) 2012 Nicolas Évrard. -Copyright (C) 2012-2014 Cédric Krier. +Copyright (C) 2012-2015 Nicolas Évrard. +Copyright (C) 2012-2015 Cédric Krier. Copyright (C) 2012-2013 Bertrand Chenal. -Copyright (C) 2012-2014 B2CK SPRL. +Copyright (C) 2012-2015 B2CK SPRL. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff -Nru tryton-modules-account-asset-2.8.1/debian/changelog tryton-modules-account-asset-2.8.4/debian/changelog --- tryton-modules-account-asset-2.8.1/debian/changelog 2014-06-26 15:57:10.000000000 +0000 +++ tryton-modules-account-asset-2.8.4/debian/changelog 2015-04-24 09:03:06.000000000 +0000 @@ -1,8 +1,28 @@ -tryton-modules-account-asset (2.8.1-1ubuntu0~ppa2~precise) precise; urgency=low +tryton-modules-account-asset (2.8.4-1ubuntu0~ppa1~precise) precise; urgency=low * Ubuntu build - -- Ilya Melnikov Thu, 26 Jun 2014 21:22:43 +0600 + -- Ilya Melnikov Fri, 24 Apr 2015 12:54:14 +0500 + +tryton-modules-account-asset (2.8.4-1) unstable; urgency=medium + + * Merging upstream version 2.8.4. + * Updating copyright file. + + -- Mathias Behrle Tue, 03 Mar 2015 12:48:30 +0100 + +tryton-modules-account-asset (2.8.3-1) unstable; urgency=medium + + * Merging upstream version 2.8.3. + * Updating copyright file. + + -- Mathias Behrle 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. + + -- Mathias Behrle Tue, 26 Aug 2014 13:43:43 +0200 tryton-modules-account-asset (2.8.1-1) unstable; urgency=medium diff -Nru tryton-modules-account-asset-2.8.1/debian/copyright tryton-modules-account-asset-2.8.4/debian/copyright --- tryton-modules-account-asset-2.8.1/debian/copyright 2014-06-26 14:44:28.000000000 +0000 +++ tryton-modules-account-asset-2.8.4/debian/copyright 2015-04-24 07:45:50.000000000 +0000 @@ -1,10 +1,10 @@ Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Files: * -Copyright: 2012 Nicolas Évrard - 2012-2014 Cédric Krier +Copyright: 2012-2015 Nicolas Évrard + 2012-2015 Cédric Krier 2012-2013 Bertrand Chenal - 2012-2014 B2CK SPRL + 2012-2015 B2CK SPRL License: GPL-3+ Files: debian/* diff -Nru tryton-modules-account-asset-2.8.1/invoice.py tryton-modules-account-asset-2.8.4/invoice.py --- tryton-modules-account-asset-2.8.1/invoice.py 2014-03-04 23:17:49.000000000 +0000 +++ tryton-modules-account-asset-2.8.4/invoice.py 2014-11-06 20:46:36.000000000 +0000 @@ -35,11 +35,14 @@ 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 -Nru tryton-modules-account-asset-2.8.1/PKG-INFO tryton-modules-account-asset-2.8.4/PKG-INFO --- tryton-modules-account-asset-2.8.1/PKG-INFO 2014-05-07 20:00:38.000000000 +0000 +++ tryton-modules-account-asset-2.8.4/PKG-INFO 2015-03-02 16:18:09.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: trytond_account_asset -Version: 2.8.1 +Version: 2.8.4 Summary: Tryton module for assets management Home-page: http://www.tryton.org/ Author: Tryton diff -Nru tryton-modules-account-asset-2.8.1/setup.py tryton-modules-account-asset-2.8.4/setup.py --- tryton-modules-account-asset-2.8.1/setup.py 2014-03-04 23:17:49.000000000 +0000 +++ tryton-modules-account-asset-2.8.4/setup.py 2014-08-03 19:12:27.000000000 +0000 @@ -48,7 +48,7 @@ ], package_data={ 'trytond.modules.account_asset': (info.get('xml', []) - + ['tryton.cfg', 'view/*.xml', 'locale/*.po']), + + ['tryton.cfg', 'view/*.xml', 'locale/*.po', 'tests/*.rst']), }, classifiers=[ 'Development Status :: 5 - Production/Stable', diff -Nru tryton-modules-account-asset-2.8.1/tryton.cfg tryton-modules-account-asset-2.8.4/tryton.cfg --- tryton-modules-account-asset-2.8.1/tryton.cfg 2014-03-04 23:17:50.000000000 +0000 +++ tryton-modules-account-asset-2.8.4/tryton.cfg 2014-11-06 20:47:00.000000000 +0000 @@ -1,5 +1,5 @@ [tryton] -version=2.8.1 +version=2.8.4 depends: ir res diff -Nru tryton-modules-account-asset-2.8.1/trytond_account_asset.egg-info/PKG-INFO tryton-modules-account-asset-2.8.4/trytond_account_asset.egg-info/PKG-INFO --- tryton-modules-account-asset-2.8.1/trytond_account_asset.egg-info/PKG-INFO 2014-05-07 20:00:37.000000000 +0000 +++ tryton-modules-account-asset-2.8.4/trytond_account_asset.egg-info/PKG-INFO 2015-03-02 16:18:08.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: trytond-account-asset -Version: 2.8.1 +Version: 2.8.4 Summary: Tryton module for assets management Home-page: http://www.tryton.org/ Author: Tryton diff -Nru tryton-modules-account-asset-2.8.1/trytond_account_asset.egg-info/SOURCES.txt tryton-modules-account-asset-2.8.4/trytond_account_asset.egg-info/SOURCES.txt --- tryton-modules-account-asset-2.8.1/trytond_account_asset.egg-info/SOURCES.txt 2014-05-07 20:00:37.000000000 +0000 +++ tryton-modules-account-asset-2.8.4/trytond_account_asset.egg-info/SOURCES.txt 2015-03-02 16:18:08.000000000 +0000 @@ -12,12 +12,35 @@ 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