summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2024-07-22 10:22:09 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2024-07-22 10:22:09 +0700
commitf25cdb1a793740a91d9f5813b80da6bd0308961e (patch)
tree61d28495f693f6cfe80684787c6abb4b773b0481
parent6e4e4d919fc3c3500934de17fb17856502171949 (diff)
add new email template and add email finance, sales on contact
-rwxr-xr-xindoteknik_custom/__manifest__.py1
-rw-r--r--indoteknik_custom/models/res_partner.py2
-rw-r--r--indoteknik_custom/views/mail_template_invoice_po.xml33
-rw-r--r--indoteknik_custom/views/res_partner.xml2
4 files changed, 38 insertions, 0 deletions
diff --git a/indoteknik_custom/__manifest__.py b/indoteknik_custom/__manifest__.py
index 724796c0..6848ca7c 100755
--- a/indoteknik_custom/__manifest__.py
+++ b/indoteknik_custom/__manifest__.py
@@ -93,6 +93,7 @@
'views/product_attribute_value.xml',
'views/mail_template_po.xml',
'views/mail_template_efaktur.xml',
+ 'views/mail_template_invoice_po.xml',
'views/price_group.xml',
'views/mrp_production.xml',
'views/apache_solr.xml',
diff --git a/indoteknik_custom/models/res_partner.py b/indoteknik_custom/models/res_partner.py
index ea06854d..19699aab 100644
--- a/indoteknik_custom/models/res_partner.py
+++ b/indoteknik_custom/models/res_partner.py
@@ -40,6 +40,8 @@ class ResPartner(models.Model):
('PNR', 'Pareto Non Repeating'),
('NP', 'Non Pareto')
])
+ email_finance = fields.Char(string='Email Finance')
+ email_sales = fields.Char(string='Email Sales')
user_payment_terms_sales = fields.Many2one('res.users', string='Users Update Payment Terms')
date_payment_terms_sales = fields.Datetime(string='Date Update Payment Terms')
diff --git a/indoteknik_custom/views/mail_template_invoice_po.xml b/indoteknik_custom/views/mail_template_invoice_po.xml
new file mode 100644
index 00000000..00ced360
--- /dev/null
+++ b/indoteknik_custom/views/mail_template_invoice_po.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" ?>
+<odoo>
+ <data>
+ <record id="mail_template_invoice_po_document" model="mail.template">
+ <field name="name">Invoice: Send mail Invoice PO document</field>
+ <field name="model_id" ref="model_purchase_order" />
+ <field name="subject">Your Invoice ${object.name}</field>
+ <field name="email_from">pajak@indoteknik.co.id</field>
+ <field name="reply_to">pajak@indoteknik.co.id</field>
+ <field name="email_cc">sales@indoteknik.com, pajak@indoteknik.co.id</field>
+ <field name="email_to">${object.partner_id.email|safe}</field>
+ <field name="body_html" type="html">
+ <p>Dengan Hormat Bpk/Ibu ${object.partner_id.name},</p>
+ <p>Berikut terlampir pesanan pembelian <strong>${object.name}</strong> sebesar <strong>Rp${object.amount_total}</strong> dari PT. INDOTEKNIK DOTCOM GEMILANG.</p>
+ <p>Barang telah diterima pada tanggal ${object.picking_ids.date_done}.</p>
+ <p>Tolong dibantu kirimkan softcopy invoice, surat jalan, dan faktur pajak atas PO terlampir dengan membalas email ini.</p>
+ <p>Dan kirimkan dokumen asli yang lengkap ke alamat :</p>
+ <p>
+ <strong>PT. INDOTEKNIK DOTCOM GEMILANG</strong><br/>
+ UP : FINANCE (021-2933-8828)<br/>
+ Gedung Altama Building : Jl. Bandengan Utara 85A No.8-9, RT.3/RW.16,<br/>
+ Penjaringan, Kec. Penjaringan, Jakarta Utara, DKI Jakarta 14440
+ </p>
+ <p>Terima kasih.</p>
+ <p>Best Regards,<br/>
+ Dept. Finance<br/>
+ PT. INDOTEKNIK DOTCOM GEMILANG</p>
+ </field>
+
+ <field name="auto_delete" eval="True" />
+ </record>
+ </data>
+</odoo>
diff --git a/indoteknik_custom/views/res_partner.xml b/indoteknik_custom/views/res_partner.xml
index fd8c8202..b928b046 100644
--- a/indoteknik_custom/views/res_partner.xml
+++ b/indoteknik_custom/views/res_partner.xml
@@ -36,6 +36,8 @@
<field name="leadtime"/>
</group>
<field name="vat" position="after">
+ <field name="email_finance" widget="email"/>
+ <field name="email_sales" widget="email"/>
<field name="use_so_approval" attrs="{'invisible': [('parent_id', '!=', False), ('company_type', '!=', 'company')]}" />
<field name="use_only_ready_stock" attrs="{'invisible': [('parent_id', '!=', False), ('company_type', '!=', 'company')]}" />
<field name="web_role" attrs="{'invisible': ['|', ('parent_id', '=', False), ('company_type', '=', 'company')]}" />