Hi All,
I want to send the customer statement in bulk.
how can I do that?
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Hi,
Odoo only lets you send statements individually.
For bulk sending, you have two good options:
Install an OCA module that extends statements with mass send features.
Or implement a custom server action / scheduled job that generates PDFs and sends them via email templates automatically.
- Automated Server Action / Scheduled Action
You can create a scheduled job that:
Loops through all customers with an open balance.
Generates the customer statement PDF (report_action).
Sends it by email using an email template.
Example (Python in server action / cron job):
partners = env['res.partner'].search([('customer_rank', '>', 0)])
for partner in partners:
# Generate statement report
pdf = env.ref('account_reports.action_report_partner_statement')._render_qweb_pdf([partner.id])[0]
attachment = env['ir.attachment'].create({
'name': f'Statement_{partner.name}.pdf',
'type': 'binary',
'datas': base64.b64encode(pdf),
'res_model': 'res.partner',
'res_id': partner.id,
'mimetype': 'application/pdf'
})
# Send email
template = env.ref('your_module.email_template_partner_statement')
env['mail.template'].browse(template.id).send_mail(partner.id, force_send=True)
For more information, refer to the following
OCA Module
* https://odoo-community.org/shop/partner-statement-4804#attr=2869
* https://odoo-community.org/shop/account-financial-reports-196#attr=942162
References
*https://www.cybrosys.com/blog/overview-of-customer-statement-in-odoo-18-accounting
* https://www.odoo.com/sl_SI/forum/pomoc-1/customer-statements-237640
Hope it helps
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng ký