[FIX] account_asset_invoice: setting account_id on an invoice line with an asset
[FIX] account_asset_invoice: setting account_id on an invoice line with an asset

Thanks to this commit: 342dad44cd78e1567bc9e7ae95a75be8adb26c4e

(1) Asset Account
(2) Depreciation Entries: Asset Account
(3) Depreciation Entries: Expense Account

Now it's possible in 9.0 to set the account_income_recognition_id.
So in the case of a vendor bill if the account_income_recognition_id(3) is set,
it means that the depreciation entries are debited on this account(3).
Then the asset account can be used on the invoice line.

NB: When the account_income_recognition_id(3) is not set, it means that

The Asset Account(1) is used to debit the depreciation entries so it cannot be used as an asset account.
In this case, (1) is used as (3)
And the Depreciation Entries: Asset Account(2) is used as (1) and (2) because the all assets are first debited
on this account and progressively the depreciation entries are credited on this account too.

This is why in 10.0, there is an onchange on account_asset_id on model "account.asset.category" which sets
the same value for (1) and (2).

Example with account_income_recognition_id set: Purchase of 100k with a 5 years depreciation:

on (1) debit=100k and credit=0

on (2) each year debit=0 and credit=20k

on (3) each year debit=20k and credit=0

Example without account_income_recognition_id set: Purchase of 100k with a 5 years depreciation:

on (2) debit=100k and credit=0

on (2) each year debit=0 and credit=20k

on (1) each year debit=20k and credit=0

This behavior can be analysed in function create_move on model "account.asset.depreciation.line"

opw:702265

ygol/odoo,dfang/odoo,hip-odoo/odoo,bplancher/odoo,laslabs/odoo,hip-odoo/odoo,dfang/odoo,laslabs/odoo,Elico-Corp/odoo_OCB,dfang/odoo,Elico-Corp/odoo_OCB,hip-odoo/odoo,dfang/odoo,ygol/odoo,Elico-Corp/odoo_OCB,bplancher/odoo,Elico-Corp/odoo_OCB,ygol/odoo,bplancher/odoo,Elico-Corp/odoo_OCB,Elico-Corp/odoo_OCB,dfang/odoo,ygol/odoo,ygol/odoo,ygol/odoo,hip-odoo/odoo,bplancher/odoo,laslabs/odoo,bplancher/odoo,laslabs/odoo,hip-odoo/odoo,laslabs/odoo,hip-odoo/odoo,laslabs/odoo,ygol/odoo,dfang/odoo,bplancher/odoo