← Back to team overview

openerp-india team mailing list archive

[Bug 1118195] [NEW] Grouping of invoices from sale order generates multiple invoices

 

Public bug reported:

When you select multiple sale order and generate a grouped invoice, then
openerp will generate one invoice correctly grouped and another invoice
for every sale order with wrong amount.

- Generate 3 sale order for the same customer
- approve them
- select this 3 order in list view an click "create draft invoice" from top menu
- then check "grouped by partner"

Then you can see 4 invoices. The one correct grouped and 3 with wrong
amount.

What wrong means: The invoice has the lines from the sale order in
positive amount and all lines from the other sale order in negative
amount. This is for all 3 wrong invoices.

You can do the following to correct this issue:

server/openerp/addons/sale/wizard/sale_make_invoice.py

54c54
<         order_obj.action_invoice_create(cr, uid, context.get(('active_ids'), []), data['grouped'], date_inv = data['invoice_date'])
---
>         order_obj.action_invoice_create(cr, uid, context.get(('active_ids'), []), data['grouped'], date_invoice = data['invoice_date'])
56,57c56,57
<         for id in context.get(('active_ids'), []):
<             wf_service.trg_validate(uid, 'sale.order', id, 'manual_invoice', cr)
---
>         #for id in context.get(('active_ids'), []):
>         #    wf_service.trg_validate(uid, 'sale.order', id, 'manual_invoice', cr)

You can see, you have to fix the "date_inv" bug first:
https://bugs.launchpad.net/openobject-addons/+bug/1092843

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

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

Title:
  Grouping of invoices from sale order generates multiple invoices

Status in OpenERP Addons (modules):
  New

Bug description:
  When you select multiple sale order and generate a grouped invoice,
  then openerp will generate one invoice correctly grouped and another
  invoice for every sale order with wrong amount.

  - Generate 3 sale order for the same customer
  - approve them
  - select this 3 order in list view an click "create draft invoice" from top menu
  - then check "grouped by partner"

  Then you can see 4 invoices. The one correct grouped and 3 with wrong
  amount.

  What wrong means: The invoice has the lines from the sale order in
  positive amount and all lines from the other sale order in negative
  amount. This is for all 3 wrong invoices.

  You can do the following to correct this issue:

  server/openerp/addons/sale/wizard/sale_make_invoice.py

  54c54
  <         order_obj.action_invoice_create(cr, uid, context.get(('active_ids'), []), data['grouped'], date_inv = data['invoice_date'])
  ---
  >         order_obj.action_invoice_create(cr, uid, context.get(('active_ids'), []), data['grouped'], date_invoice = data['invoice_date'])
  56,57c56,57
  <         for id in context.get(('active_ids'), []):
  <             wf_service.trg_validate(uid, 'sale.order', id, 'manual_invoice', cr)
  ---
  >         #for id in context.get(('active_ids'), []):
  >         #    wf_service.trg_validate(uid, 'sale.order', id, 'manual_invoice', cr)

  You can see, you have to fix the "date_inv" bug first:
  https://bugs.launchpad.net/openobject-addons/+bug/1092843

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


Follow ups

References