sale/sale.py _invoiced_search returns wrong results for "unpaid"

Bug #661653 reported by Ferdinand
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Fix Released
Low
OpenERP R&D Addons Team 3

Bug Description

searching for 'unpaid' also returns canceled invoices which makes no sense

(the attached patch might be rejected, due to the fact that my chricar branch - sale.py is heavily modified)

     def _invoiced_search(self, cursor, user, obj, name, args, context):
@@ -221,7 +231,7 @@
                 if arg[2]:
                     clause += 'AND inv.state = \'paid\''
                 else:
- clause += 'AND inv.state <> \'paid\''
+ clause += 'AND inv.state not in ( \'paid\',\'cancel\')'
                     no_invoiced = True
         cursor.execute('SELECT rel.order_id ' \
                 'FROM sale_order_invoice_rel AS rel, account_invoice AS inv ' \

Related branches

Revision history for this message
Ferdinand (office-chricar) wrote :
Revision history for this message
Ferdinand (office-chricar) wrote :

IMHO unpaid should not find sale orders with stock.picking (out) != 'done' and invoice from picking.
yes of course these are unpaid, but there is nothing to pay if not shipped and invoice are to be created from shipped pickings.

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
Changed in openobject-addons:
milestone: none → 6.0-rc2
Revision history for this message
vth(openerp) (vth-tinyerp) wrote :

Hello ,

I had done changes in branch lp:~openerp-commiter/openobject-addons/trunk-dev-addons3-vth2 and
revision-id: <email address hidden>

Thank you,
vth

summary: - [V5] sale/sale.py _invoiced_search returns wrong results for "unpaid"
+ sale/sale.py _invoiced_search returns wrong results for "unpaid"
Changed in openobject-addons:
status: In Progress → 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.