← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 757687] Re: Wrong account for invoice lines created from delivery for service products

 

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.

-- 
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):
  Fix Committed

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