[FIX] account_voucher: import invoice doesn't show credit notes and when amount is...
authorRavi Gohil (Open ERP) <rgo@tinyerp.com>
Mon, 6 Aug 2012 13:19:27 +0000 (18:49 +0530)
committerRavi Gohil (Open ERP) <rgo@tinyerp.com>
Mon, 6 Aug 2012 13:19:27 +0000 (18:49 +0530)
bzr revid: rgo@tinyerp.com-20120806131927-j0k5un40krxxm37y

addons/account_voucher/account_voucher.py
addons/account_voucher/wizard/account_statement_from_invoice_view.xml

index f382641..b60b42a 100644 (file)
@@ -467,8 +467,6 @@ class account_voucher(osv.osv):
 
         if not context.get('move_line_ids', False):
             domain = [('state','=','valid'), ('account_id.type', '=', account_type), ('reconcile_id', '=', False), ('partner_id', '=', partner_id)]
-            if context.get('invoice_id', False):
-                   domain.append(('invoice', '=', context['invoice_id']))
             ids = move_line_pool.search(cr, uid, domain, context=context)
         else:
             ids = context['move_line_ids']
index 3213bae..a123600 100644 (file)
@@ -38,7 +38,7 @@
                 <form string="Import Entries">
                     <group colspan="4" expand="1">
                         <separator string="Payable and Receivables" colspan="4"/>
-                        <field height="300" width="700" name="line_ids" colspan="4" nolabel="1" domain="[('account_id.type','in',['receivable','payable']),('reconcile_id','=',False), ('journal_id.type','in',['sale','purchase']), ('state', '=', 'valid')]"/>
+                        <field height="300" width="700" name="line_ids" colspan="4" nolabel="1" domain="[('account_id.type','in',['receivable','payable']),('reconcile_id','=',False),('state', '=', 'valid')]"/>
                     </group>
                     <group colspan="4" col="6">
                         <label string ="" colspan="2"/>