summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <it@fixcomart.co.id>2025-09-17 18:25:29 +0700
committerunknown <it@fixcomart.co.id>2025-09-17 18:25:29 +0700
commit886c28f6ebf20dcca5252341a8f6b61cd4d89d71 (patch)
treeb0f3c4f498af16932f2d0980e028737988efd1d9
parentbdbeb11a258a648c2733171a35117316f64dad1a (diff)
fix
-rw-r--r--indoteknik_custom/models/account_move.py20
1 files changed, 7 insertions, 13 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py
index 9061f541..ec23c626 100644
--- a/indoteknik_custom/models/account_move.py
+++ b/indoteknik_custom/models/account_move.py
@@ -218,8 +218,7 @@ class AccountMove(models.Model):
('payment_state', 'not in', ['paid', 'in_payment', 'reversed']),
('invoice_date_due', '<', today),
('date_terima_tukar_faktur', '!=', False),
- ('invoice_payment_term_id.name', 'ilike', 'tempo'),
- ('partner_id', 'in', [94603])])
+ ('invoice_payment_term_id.name', 'ilike', 'tempo')])
_logger.info(f"Found {len(invoices)} invoices overdue for reminder {invoices}.")
if not invoices:
_logger.info("Tidak ada invoice yang overdue")
@@ -423,25 +422,20 @@ class AccountMove(models.Model):
# Siapkan email values
values = {
- 'subject': f"Reminder Invoice Due Test - {partner.name}",
+ 'subject': f"Reminder Invoice Due - {partner.name}",
'email_to': 'andrifebriyadiputra@gmail.com',
- # 'email_to': email_to,
+ 'email_to': email_to,
'email_from': 'finance@indoteknik.co.id',
- # 'email_cc': ",".join(sorted(set(cc_list))),
+ 'email_cc': ",".join(sorted(set(cc_list))),
'body_html': body_html,
- # 'reply_to': 'finance@indoteknik.co.id',
+ 'reply_to': 'finance@indoteknik.co.id',
}
-<<<<<<< HEAD
- # template.send_mail(invs[0].id, force_send=True, email_values=values)
- _logger.info(f"Mengirim email ke: {values['email_to']} > email CC: {values['email_cc']}")
-=======
template.send_mail(invs[0].id, force_send=True, email_values=values)
- # _logger.info(f"Mengirim email ke: {values['email_to']} > email CC: {values['email_cc']}")
->>>>>>> 23d713fc686d56ef5b5e8004b91b3f4fe54117e6
+ _logger.info(f"Mengirim email ke: {values['email_to']} > email CC: {values['email_cc']}")
_logger.info(f"Reminder terkirim ke {partner.name} ({values['email_to']}) → {len(invs)} invoice (dtd = {dtd})")
# flag
- # invs.write({'reminder_sent_date': today})
+ invs.write({'reminder_sent_date': today})
# Post ke chatter
user_system = self.env['res.users'].browse(25)
system_id = user_system.partner_id.id if user_system else False