Merge lp:~openerp-dev/openobject-addons/trunk-bug-1244210-cod into lp:openobject-addons

Proposed by Chirag Dodiya(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1244210-cod
Merge into: lp:openobject-addons
Diff against target: 15 lines (+5/-0)
1 file modified
account_asset/account_asset.py (+5/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1244210-cod
Reviewer Review Type Date Requested Status
Bharat Devnani (Open ERP) (community) Approve
OpenERP Core Team Pending
Review via email: mp+199228@code.launchpad.net

Description of the change

Hello,

       I have fixed this bug "asset inconsistent behavior of create and write", added write method to computes the correct depreciation table on edit record.

Thanks,
Chirag Dodiya(cod).

To post a comment you must log in.
Revision history for this message
Bharat Devnani (Open ERP) (bde-openerp) wrote :

Hello Chirag Dodiya,

Your code seems and works fine. Thanks for your work.

Regards,
Devnani Bharat R.

review: Approve

Unmerged revisions

9018. By Chirag Dodiya(OpenERP)

[FIX] Fixed asset inconsistent behavior of create and write

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_asset/account_asset.py'
2--- account_asset/account_asset.py 2013-10-27 12:31:04 +0000
3+++ account_asset/account_asset.py 2013-12-17 08:44:32 +0000
4@@ -347,6 +347,11 @@
5 self.compute_depreciation_board(cr, uid, [asset_id], context=context)
6 return asset_id
7
8+ def write(self, cr, uid, ids, vals, context=None):
9+ result = super(account_asset_asset, self).write(cr, uid, ids, vals, context=context)
10+ self.compute_depreciation_board(cr, uid, ids, context=context)
11+ return result
12+
13 def open_entries(self, cr, uid, ids, context=None):
14 if context is None:
15 context = {}

Subscribers

People subscribed via source and target branches

to all changes: