Merge lp:~openerp-dev/openobject-addons/trunk-bug-876320-uco into lp:openobject-addons

Proposed by Ujjvala Collins
Status: Rejected
Rejected by: Fabien (Open ERP)
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-876320-uco
Merge into: lp:openobject-addons
Diff against target: 12 lines (+2/-0)
1 file modified
account_asset/account_asset_invoice.py (+2/-0)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-876320-uco
Reviewer Review Type Date Requested Status
Ujjvala Collins (community) Needs Resubmitting
qdp (OpenERP) Needs Fixing
Review via email: mp+79652@code.launchpad.net

Description of the change

[FIX] account_asset:
-----------------------------------
* Fixed problem of category on change when creating asset from supplier invoice.

To post a comment you must log in.
Revision history for this message
qdp (OpenERP) (qdp) wrote :

noooo

you should have done that in account_asset/account_asset_invoice.py around line 44..

please improve.
Quentin

review: Needs Fixing
Revision history for this message
Ujjvala Collins (uco-openerp) wrote :

Hello Quentin,

I have improved the code as per your suggestion. Please check.

Thanks,
Ujjvala

review: Needs Resubmitting
Revision history for this message
Fabien (Open ERP) (fp-tinyerp) wrote :

the asset computation was not correct, fixed in r5621

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'account_asset/account_asset_invoice.py'
2--- account_asset/account_asset_invoice.py 2011-11-08 20:14:25 +0000
3+++ account_asset/account_asset_invoice.py 2011-11-09 11:53:30 +0000
4@@ -51,6 +51,8 @@
5 'company_id': line.invoice_id.company_id.id,
6 'currency_id': line.invoice_id.currency_id.id,
7 }
8+ changed_vals = asset_obj.onchange_category_id(cr, uid, [], vals['category_id'], context=context)
9+ vals.update(changed_vals['value'])
10 asset_id = asset_obj.create(cr, uid, vals, context=context)
11 if line.asset_category_id.open_asset:
12 asset_obj.validate(cr, uid, [asset_id], context=context)

Subscribers

People subscribed via source and target branches

to all changes: