Merge lp:~rr.clearcorp/openobject-addons/6.1-account_asset into lp:openobject-addons/6.1

Proposed by Ronald Rubi
Status: Needs review
Proposed branch: lp:~rr.clearcorp/openobject-addons/6.1-account_asset
Merge into: lp:openobject-addons/6.1
Diff against target: 19 lines (+1/-1)
1 file modified
account_asset/account_asset.py (+1/-1)
To merge this branch: bzr merge lp:~rr.clearcorp/openobject-addons/6.1-account_asset
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+167082@code.launchpad.net

Description of the change

[FIX] Error correction in 'compute assets' wizard. The wizard closes all assets.

To post a comment you must log in.

Unmerged revisions

7214. By Ronald Rubi

[FIX] Error correction in 'compute assets' wizard. The wizard closes all assets.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'account_asset/account_asset.py'
--- account_asset/account_asset.py 2012-01-31 13:36:57 +0000
+++ account_asset/account_asset.py 2013-06-03 16:16:16 +0000
@@ -343,7 +343,6 @@
343 }343 }
344344
345 def create_move(self, cr, uid, ids, context=None):345 def create_move(self, cr, uid, ids, context=None):
346 can_close = False
347 if context is None:346 if context is None:
348 context = {}347 context = {}
349 asset_obj = self.pool.get('account.asset.asset')348 asset_obj = self.pool.get('account.asset.asset')
@@ -353,6 +352,7 @@
353 currency_obj = self.pool.get('res.currency')352 currency_obj = self.pool.get('res.currency')
354 created_move_ids = []353 created_move_ids = []
355 for line in self.browse(cr, uid, ids, context=context):354 for line in self.browse(cr, uid, ids, context=context):
355 can_close = False
356 if currency_obj.is_zero(cr, uid, line.asset_id.currency_id, line.remaining_value):356 if currency_obj.is_zero(cr, uid, line.asset_id.currency_id, line.remaining_value):
357 can_close = True357 can_close = True
358 depreciation_date = line.asset_id.prorata and line.asset_id.purchase_date or time.strftime('%Y-%m-%d')358 depreciation_date = line.asset_id.prorata and line.asset_id.purchase_date or time.strftime('%Y-%m-%d')