diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2023-08-16 09:04:55 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2023-08-16 09:04:55 +0700 |
| commit | a4fee08d8d069142805fb8c9507807611dbede6d (patch) | |
| tree | 30cff76a5a03d65f3316b0e0a962a0ba1bc75cef | |
| parent | ce423d99e574ebc87482c71dc2b8f4ca64c34d74 (diff) | |
fix mail template
| -rwxr-xr-x | indoteknik_custom/models/purchase_order.py | 2 | ||||
| -rw-r--r-- | indoteknik_custom/views/mail_template_po.xml | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/indoteknik_custom/models/purchase_order.py b/indoteknik_custom/models/purchase_order.py index d73f9037..9e851ef9 100755 --- a/indoteknik_custom/models/purchase_order.py +++ b/indoteknik_custom/models/purchase_order.py @@ -196,7 +196,7 @@ class PurchaseOrder(models.Model): for line in self.order_line: if not line.product_id.purchase_ok: raise UserError("Terdapat barang yang tidak bisa diproses") - if line.price_vendor != 0 and line.price_unit != line.price_vendor: + if line.price_unit != line.price_vendor: send_email = True break diff --git a/indoteknik_custom/views/mail_template_po.xml b/indoteknik_custom/views/mail_template_po.xml index 410520b3..5937f8f2 100644 --- a/indoteknik_custom/views/mail_template_po.xml +++ b/indoteknik_custom/views/mail_template_po.xml @@ -1,12 +1,12 @@ <?xml version="1.0" ?> <odoo> - <data noupdate="0"> + <data noupdate="1"> <record id="mail_template_po_sync_price" model="mail.template"> <field name="name">PO: Sync Unit Price Purchase Pricelist</field> <field name="model_id" ref="model_purchase_order" /> <field name="subject">Your PO ${object.name}</field> <field name="email_from"></field> - <field name="email_to">darren@indoteknik.co.id</field> + <field name="email_to">darren@indoteknik.co.id, tyas@indoteknik.com, azkan4elll@gmail.com</field> <field name="body_html" type="html"> <table border="0" cellpadding="0" cellspacing="0" style="padding-top: 16px; background-color: #F1F1F1; font-family:Verdana, Arial,sans-serif; color: #454748; width: 100%; border-collapse:separate;"> @@ -51,7 +51,7 @@ <br/><br/> Berikut adalah rincian PO: % for line in object.order_line: - % if line.price_vendor != 0 and line.price_unit != line.price_vendor + % if line.price_unit != line.price_vendor <ul> <li>Nama Produk: ${line.product_id.name}</li> <li>Harga Unit dalam PO: Rp ${'{:,.2f}'.format(line.price_unit)}</li> |
