← Back to team overview

credativ team mailing list archive

[Bug 917120] [NEW] [SALE] wrong account when creating a invoice from picking

 

Public bug reported:

Hello

Scenario
- having the account on the product correctly configured
- Create a sale order with the policy 'invoice from packing'
- validate the sale order
- send the picking
- generate the invoice form the picking

=> result the invoice line doesn't have the right account selected, the
account expected is the account 'property_account_income' the account
that openerp choose here is 'property_account_expense'

The problem is simple the type of invoice is set to "None" in the wizard that generate the invoice. And the the wrong account is selected later.
stock/wizard/stock_invoice_onshipping.py

         res = picking_pool.action_invoice_create(cr, uid, active_ids,
               journal_id = onshipdata_obj[0]['journal_id'],
               group = onshipdata_obj[0]['group'],
-              type = None,
+              type = inv_type,
               context=context)
         return res

Have a nice day

** Affects: openobject-addons
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Framework Experts, which is subscribed to OpenERP Addons.
https://bugs.launchpad.net/bugs/917120

Title:
  [SALE] wrong account when creating a invoice from picking

Status in OpenERP Addons (modules):
  New

Bug description:
  Hello

  Scenario
  - having the account on the product correctly configured
  - Create a sale order with the policy 'invoice from packing'
  - validate the sale order
  - send the picking
  - generate the invoice form the picking

  => result the invoice line doesn't have the right account selected,
  the account expected is the account 'property_account_income' the
  account that openerp choose here is 'property_account_expense'

  The problem is simple the type of invoice is set to "None" in the wizard that generate the invoice. And the the wrong account is selected later.
  stock/wizard/stock_invoice_onshipping.py

           res = picking_pool.action_invoice_create(cr, uid, active_ids,
                 journal_id = onshipdata_obj[0]['journal_id'],
                 group = onshipdata_obj[0]['group'],
  -              type = None,
  +              type = inv_type,
                 context=context)
           return res

  Have a nice day

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-addons/+bug/917120/+subscriptions


Follow ups

References