131
131
( 'state', 'in', ['open', 'paid', 'cancel'] ),
132
132
( 'date_invoice', '>=', date_start.strftime("%Y-%m-%d %H:%M:%S") ),
133
133
( 'date_invoice', '<', date_end.strftime("%Y-%m-%d %H:%M:%S") ),
134
#( 'number', '<>', False )
134
( 'number', '<>', False ),
135
135
], order='date_invoice', context=context)
141
141
( 'state', 'in', ['cancel'] ),
142
142
( 'date_invoice_cancel', '>=', date_start.strftime("%Y-%m-%d %H:%M:%S") ),
143
143
( 'date_invoice_cancel', '<', date_end.strftime("%Y-%m-%d %H:%M:%S") ),
144
#( 'number', '<>', False )
144
( 'number', '<>', False ),
145
145
], order='date_invoice', context=context)
147
147
invoice_ids = list(set(invoice_ids))
167
167
( 'state', 'in', ['open', 'paid', 'cancel'] ),
168
168
( 'date_invoice', '>=', date_start ),
169
169
( 'date_invoice', '<', date_end ),
170
( 'number', '<>', False )
171
], order='date_invoice', context=context)
170
( 'internal_number', '<>', False ),
171
], order='date_invoice', context=context)
174
invoice_obj.search(cr, uid, [
175
( 'type', 'in', ['out_invoice', 'out_refund'] ),
176
( 'state', 'in', ['cancel'] ),
177
( 'date_invoice_cancel', '>=', date_start ),
178
( 'date_invoice_cancel', '<', date_end ),
179
( 'internal_number', '<>', False ),
180
], order='date_invoice', context=context)
174
182
return {'invoice_ids': invoice_ids}