Wrong account for invoice lines created from delivery for service products

Bug #757687 reported by Samuel Bissig (Toradex)
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 3

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.

Related branches

Amit Parik (amit-parik)
Changed in openobject-addons:
assignee: nobody → OpenERP R&D Addons Team 3 (openerp-dev-addons3)
importance: Undecided → Low
status: New → Confirmed
Changed in openobject-addons:
status: Confirmed → In Progress
Revision history for this message
Ashvin Rathod (OpenERP) (ara-tinyerp) wrote :

Hello Samuel_B,

Its fixed in lp:~openerp-dev/openobject-addons/trunk-bug-757687-ara branch. It will be merge soon with trunk addons.

Revision ID: <email address hidden>
Revision No: 4640

Thanks,
Ashvin Rathod

Changed in openobject-addons:
status: In Progress → Fix Committed
Changed in openobject-addons:
milestone: none → 6.1
Revision history for this message
mouad hamri (mouad-hamri) wrote :

Hello,
In fact I have also this issue and with all kinds of product: stockable and services in both selling and buying processes!!
Can you please let me know if this issue has been already fixed? if yes what should I do to fix it?
Thank you.

qdp (OpenERP) (qdp)
Changed in openobject-addons:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.