[tryton-debian-vcs] tryton-modules-account-asset branch upstream-3.0 updated. upstream/3.0.0-1-gbf0553b
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-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.0-1-gbf0553b
commit bf0553b6d4d0262732ef5b987a587df301e7f322
Author: Mathias Behrle <mathiasb at m9s.biz>
Date: Mon May 12 16:29:27 2014 +0200
Adding upstream version 3.0.1.
diff --git a/CHANGELOG b/CHANGELOG
index cd2dc58..c232b47 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+Version 3.0.1 - 2014-05-07
+* Bug fixes (see mercurial logs for details)
+
Version 3.0.0 - 2013-10-21
* Bug fixes (see mercurial logs for details)
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 ef513fb..5951001 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: trytond_account_asset
-Version: 3.0.0
+Version: 3.0.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 1f9f7fe..649d7a2 100644
--- a/tryton.cfg
+++ b/tryton.cfg
@@ -1,5 +1,5 @@
[tryton]
-version=3.0.0
+version=3.0.1
depends:
ir
res
diff --git a/trytond_account_asset.egg-info/PKG-INFO b/trytond_account_asset.egg-info/PKG-INFO
index a3710dd..6ebac44 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.0
+Version: 3.0.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