c2c-oerpscenario team mailing list archive
-
c2c-oerpscenario team
-
Mailing list archive
-
Message #21807
[Bug 757687] Re: Wrong account for invoice lines created from delivery for service products
** Changed in: openobject-addons
Status: Confirmed => In Progress
--
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/757687
Title:
Wrong account for invoice lines created from delivery for service
products
Status in OpenERP Modules (addons):
In Progress
Bug description:
Version 6.0.1
When a invoices is created from a delivery in the sales flow with
shipping policy "Invoice from Delivery" the wrong account is used for
services products.
Steps to reproduce:
1) Create a new SO
2) Add a stockable and a service product to the SO
3) Select shipping policy "Invoice from Delivery"
4) Go the delivery and create the invoice
6) Open the generated invoice
Result observed:
The account used for the service product invoice line is wrong, the one used for the stockable product is correct. The account set in property_account_expense is used for the service product.
Expeted result:
The account set in property_account_receivable should be used.
Potential problem solution:
Function action_invoice_create in addons/sale/stock.py does not care on the invoice type as done in inherited method action_invoice_create in addons/stock/stock.py line 978. As the type has the value "None" the sale_line.product_id.product_tmpl_id.property_account_expense.id is used on line 157.
Either use the value set in the context ('inv_type') or use the
function self._get_invoice_type(picking) as done in
addons/stock/stock.py line 978.
References