diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2025-09-17 11:27:47 +0000 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2025-09-17 11:27:47 +0000 |
| commit | 1fdeef8073eb35b407bb0b3cdb26bf635b3b1629 (patch) | |
| tree | 9c423f561f8929bdeee06ed707d2e08da9c3f246 /indoteknik_custom/models/account_move.py | |
| parent | ef9daab07049de822b7137b4a9a5d3f1fba53992 (diff) | |
| parent | 886c28f6ebf20dcca5252341a8f6b61cd4d89d71 (diff) | |
Merged in form-sp (pull request #423)
Form sp
Diffstat (limited to 'indoteknik_custom/models/account_move.py')
| -rw-r--r-- | indoteknik_custom/models/account_move.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/indoteknik_custom/models/account_move.py b/indoteknik_custom/models/account_move.py index f10ca23f..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,20 +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', } 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']}") + _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 |
