Pular para o conteúdo
Menu
Esta pergunta foi sinalizada

How can filter out the only due amount paid invoices with for the specific day odoo16


domain = [('payment_type', '=', 'inbound'),
('state', 'in', ['posted']),
('date', '>=', self.date),
('date', '<=', self.date)]

# Search for the paid invoices with due amount based on the search domain
invoices = self.env['account.payment'].sudo().search(domain)
print("invoices",invoices)
result = []
sl_no = 1
journal_bank_total = 0.0
journal_cash_total = 0.0
journal_online_total = 0.0
journal_cheque_total = 0.0
# Iterate over the paid invoices and calculate the total amount of due paid invoices
for
invoice in invoices:
print("invoice",invoice)
if invoice.move_type == 'out_refund':
continue
print
("sfsfs")

if isinstance(invoice.invoice_payments_widget, dict):
payments = invoice.invoice_payments_widget.get('content', [])
print(payments)
# rest of the code
else
:
payments = []

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
jan. 24
2034
1
out. 23
2188
1
set. 23
2000
0
fev. 23
2827
3
abr. 24
1843