Comment 1 for bug 935564

Revision history for this message
Ana Juaristi Olalde (ajuaristio) wrote : Re: Several bug account_asset 4

That is... the required changes would be:
http://bazaar.launchpad.net/~openerp/openobject-addons/trunk/view/head:/account_asset/account_asset_invoice.py line 51

                vals = {
                    'name': line.name,
                    'code': line.invoice_id.number or False,
                    'category_id': line.asset_category_id.id,
                    'purchase_value': line.price_subtotal,
                    'period_id': line.invoice_id.period_id.id,
                    'partner_id': line.invoice_id.partner_id.id,
                    'company_id': line.invoice_id.company_id.id,
                    'currency_id': line.invoice_id.currency_id.id,
                }

ADD field:
                    'purchase_date' : line.invoice_id.date_invoice,

-----

On same point the default values of asset should be taken from asset category instead of being hardcoded on asset defaults:

                    'method': line.asset_category_id.method,
                    'method_number': line.asset_category_id.method_number,
                    'method_time': line.asset_category_id.method_time,
                    'method_period': line.asset_category_id.method_period,
                    'method_progress_factor': line.asset_category_id.method_progress_factor,
                    'method_end': line.asset_category_id.method_end,
                    'prorata': line.asset_category_id.prorata,

And... I think that are all little bugs I found in account_asset modules. Wishing it will be helpful:

Ana