[tryton-debian-vcs] tryton-modules-account-asset branch upstream-2.8 updated. upstream/2.8.0-1-g5ae336e
Mathias Behrle
tryton-debian-vcs at alioth.debian.org
Mon May 12 16:06:42 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-asset.git;a=commitdiff;h=upstream/2.8.0-1-g5ae336e
commit 5ae336e69fa78d57324505947e603c1b90142ddc
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon May 12 16:26:54 2014 +0200
Adding upstream version 2.8.1.
diff --git a/CHANGELOG b/CHANGELOG
index 2ff50a4..3af64bc 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,2 +1,5 @@
+Version 2.8.1 - 2014-05-07
+* Bug fixes (see mercurial logs for details)
+
Version 2.8.0 - 2013-04-22
* Initial release
diff --git a/COPYRIGHT b/COPYRIGHT
index ccc12ff..f5633cb 100644
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -1,7 +1,7 @@
Copyright (C) 2012 Nicolas Évrard.
-Copyright (C) 2012-2013 Cédric Krier.
+Copyright (C) 2012-2014 Cédric Krier.
Copyright (C) 2012-2013 Bertrand Chenal.
-Copyright (C) 2012-2013 B2CK SPRL.
+Copyright (C) 2012-2014 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 --git a/PKG-INFO b/PKG-INFO
index 406f737..29a70e0 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_account_asset
-Version: 2.8.0
+Version: 2.8.1
Summary: Tryton module for assets management
Home-page: http://www.tryton.org/
Author: Tryton
diff --git a/asset.py b/asset.py
index 1fab996..ef0cfef 100644
--- a/asset.py
+++ b/asset.py
@@ -7,7 +7,7 @@ from dateutil import relativedelta
from dateutil import rrule
from trytond.model import Workflow, ModelSQL, ModelView, fields
-from trytond.pyson import Eval, Bool
+from trytond.pyson import Eval, Bool, If
from trytond.pool import Pool
from trytond.transaction import Transaction
from trytond.wizard import Wizard, StateView, StateTransition, Button
@@ -38,7 +38,10 @@ class Asset(Workflow, ModelSQL, ModelView):
supplier_invoice_line = fields.Many2One('account.invoice.line',
'Supplier Invoice Line',
domain=[
- ('product', '=', Eval('product', -1)),
+ If(Eval('product', None) == None,
+ ('product', '=', -1),
+ ('product', '=', Eval('product', -1)),
+ ),
('invoice.type', '=', 'in_invoice'),
],
states={
@@ -236,13 +239,14 @@ class Asset(Workflow, ModelSQL, ModelView):
invoice.currency)
else:
new_values['value'] = invoice_line.amount
- new_values['purchase_date'] = invoice.invoice_date
- new_values['start_date'] = invoice.invoice_date
- if invoice_line.product.depreciation_duration:
- duration = relativedelta.relativedelta(
- months=int(invoice_line.product.depreciation_duration),
- days=-1)
- new_values['end_date'] = new_values['start_date'] + duration
+ if invoice.invoice_date:
+ new_values['purchase_date'] = invoice.invoice_date
+ new_values['start_date'] = invoice.invoice_date
+ if invoice_line.product.depreciation_duration:
+ duration = relativedelta.relativedelta(
+ months=int(invoice_line.product.depreciation_duration),
+ days=-1)
+ new_values['end_date'] = new_values['start_date'] + duration
if not self.unit:
new_values['quantity'] = invoice_line.quantity
diff --git a/tryton.cfg b/tryton.cfg
index d380d83..2943db5 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,14 +1,14 @@
[tryton]
-version = 2.8.0
-depends =
+version=2.8.1
+depends:
ir
res
account
product
account_invoice
-extras_depend =
+extras_depend:
purchase
-xml =
+xml:
asset.xml
product.xml
invoice.xml
diff --git a/trytond_account_asset.egg-info/PKG-INFO b/trytond_account_asset.egg-info/PKG-INFO
index f55e21d..8ea489f 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.0
+Version: 2.8.1
Summary: Tryton module for assets management
Home-page: http://www.tryton.org/
Author: Tryton
--
tryton-modules-account-asset
More information about the tryton-debian-vcs
mailing list