Amit Parik (OpenERP) has proposed merging
lp:~openerp-dev/openobject-addons/trunk-bug-935469-amp into
lp:openobject-addons.
Requested reviews:
OpenERP Core Team (openerp)
Related bugs:
Bug #935469 in OpenERP Addons: "Several bug account_asset 1."
https://bugs.launchpad.net/openobject-addons/+bug/935469
For more details, see:
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-935469-amp/+merge/99690
In account_asset_depreciation_line object Depreciation Date defined as a char
field and then on asset analysis report we have type casting for it.
That is better If we have defined a date field on Depreciation Date so need to
casting a field on report. If someone change the depreciation date as a char at
depreciation line and try the asset analysis report, It will gives a error.
This fix is solved this problem.
Thanks!
--
https://code.launchpad.net/~openerp-dev/openobject-addons/trunk-bug-935469-amp/+merge/99690
Your team OpenERP R&D Team is subscribed to branch
lp:~openerp-dev/openobject-addons/trunk-bug-935469-amp.
=== modified file 'account_asset/account_asset.py'
--- account_asset/account_asset.py 2012-01-31 13:36:57 +0000
+++ account_asset/account_asset.py 2012-03-28 10:05:23 +0000
@@ -337,7 +337,7 @@
'amount': fields.float('Depreciation Amount', required=True),
'remaining_value': fields.float('Amount to Depreciate', required=True),
'depreciated_value': fields.float('Amount Already Depreciated', required=True),
- 'depreciation_date': fields.char('Depreciation Date', size=64, select=1),
+ 'depreciation_date': fields.date('Depreciation Date', select=1),
'move_id': fields.many2one('account.move', 'Depreciation Entry'),
'move_check': fields.function(_get_move_check, method=True, type='boolean', string='Posted', store=True)
}
=== modified file 'account_asset/report/account_asset_report.py'
--- account_asset/report/account_asset_report.py 2011-07-05 14:23:22 +0000
+++ account_asset/report/account_asset_report.py 2012-03-28 10:05:23 +0000
@@ -50,7 +50,7 @@
select
min(dl.id) as id,
dl.name as name,
- to_date(dl.depreciation_date, 'YYYY-MM-DD') as depreciation_date,
+ dl.depreciation_date as depreciation_date,
a.purchase_date as purchase_date,
(CASE WHEN (select min(d.id) from account_asset_depreciation_line as d
left join account_asset_asset as ac ON (ac.id=d.asset_id)
@@ -77,7 +77,7 @@
from account_asset_depreciation_line dl
left join account_asset_asset a on (dl.asset_id=a.id)
group by
- dl.amount,dl.asset_id,to_date(dl.depreciation_date, 'YYYY-MM-DD'),dl.name,
+ dl.amount,dl.asset_id,dl.depreciation_date,dl.name,
a.purchase_date, dl.move_check, a.state, a.category_id, a.partner_id, a.company_id,
a.purchase_value, a.id, a.salvage_value
)""")
_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help : https://help.launchpad.net/ListHelp