<commit_before><?xml version="1.0" encoding="utf-8"?>
<odoo>

    <data noupdate="1">
        <!--Email template -->
        <record id="email_template_edi_purchase" model="mail.template">
            <field name="name">RFQ - Send by Email</field>
            <field name="email_from">${(object.create_uid.email and '%s &lt;%s&gt;' % (object.create_uid.name, object.create_uid.email) or '')|safe}</field>
            <field name="subject">${object.company_id.name} Order (Ref ${object.name or 'n/a' })</field>
            <field name="partner_to">${object.partner_id.id}</field>
            <field name="model_id" ref="purchase.model_purchase_order"/>
            <field name="auto_delete" eval="True"/>
            <field name="report_template" ref="report_purchase_quotation"/>
            <field name="report_name">RFQ_${(object.name or '').replace('/','_')}</field>
            <field name="lang">${object.partner_id.lang}</field>
            <field name="body_html"><![CDATA[
<p>Dear
% if object.partner_id.is_company and object.child_ids:
    ${object.partner_id.child_ids[0].name}
% else :
    ${object.partner_id.name}
% endif
,</p><p>
Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} <strong>${object.name}</strong>
% if object.partner_ref:
    with reference: ${object.partner_ref}
% endif
% if object.origin:
    (RFQ origin: ${object.origin})
% endif
amounting in <strong>${object.amount_total} ${object.currency_id.name}</strong>
from ${object.company_id.name}.
</p>

<p>If you have any question, do not hesitate to contact us.</p>
<p>Best regards,</p>
]]></field>
        </record>


        <!--Email template -->
        <record id="email_template_edi_purchase_done" model="mail.template">
            <field name="name">Purchase Order - Send by Email</field>
            <field name="email_from">${(object.create_uid.email and '%s &lt;%s&gt;' % (object.create_uid.name, object.create_uid.email) or '')|safe}</field>
            <field name="subject">${object.company_id.name} Order (Ref ${object.name or 'n/a' })</field>
            <field name="partner_to">${object.partner_id.id}</field>
            <field name="model_id" ref="purchase.model_purchase_order"/>
            <field name="auto_delete" eval="True"/>
            <field name="report_template" ref="action_report_purchase_order"/>
            <field name="report_name">PO_${(object.name or '').replace('/','_')}</field>
            <field name="lang">${object.partner_id.lang}</field>
            <field name="body_html"><![CDATA[
<p>Dear
% if object.partner_id.is_company and object.child_ids:
    ${object.partner_id.child_ids[0].name}
% else :
    ${object.partner_id.name}
% endif
,</p><p>
Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} <strong>${object.name}</strong>
% if object.partner_ref:
    with reference: ${object.partner_ref}
% endif
% if object.origin:
    (RFQ origin: ${object.origin})
% endif
amounting <strong>${object.amount_total} ${object.currency_id.name}</strong>
from ${object.company_id.name}.
</p>

<p>If you have any question, do not hesitate to contact us.</p>
<p>Best regards,</p>
]]></field>
        </record>

    </data>
</odoo>
<commit_msg>[IMP] purchase: improved email template<commit_after><?xml version="1.0" encoding="utf-8"?>
<odoo>

    <data noupdate="1">
        <!--Email template -->
        <record id="email_template_edi_purchase" model="mail.template">
            <field name="name">RFQ - Send by Email</field>
            <field name="email_from">${(object.create_uid.email and '%s &lt;%s&gt;' % (object.create_uid.name, object.create_uid.email) or '')|safe}</field>
            <field name="subject">${object.company_id.name} Order (Ref ${object.name or 'n/a' })</field>
            <field name="partner_to">${object.partner_id.id}</field>
            <field name="model_id" ref="purchase.model_purchase_order"/>
            <field name="auto_delete" eval="True"/>
            <field name="report_template" ref="report_purchase_quotation"/>
            <field name="report_name">RFQ_${(object.name or '').replace('/','_')}</field>
            <field name="lang">${object.partner_id.lang}</field>
            <field name="body_html"><![CDATA[
<p>Dear
% if object.partner_id.is_company and object.child_ids:
    ${object.partner_id.child_ids[0].name}
% else :
    ${object.partner_id.name}
% endif
,</p><p>
Here is a ${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} <strong>${object.name}</strong>
% if object.partner_ref:
    with reference: ${object.partner_ref}
% endif
% if object.origin:
    (RFQ origin: ${object.origin})
% endif
amounting in <strong>${object.amount_total} ${object.currency_id.name}</strong>
from ${object.company_id.name}.
</p>

<p>If you have any question, do not hesitate to contact us.</p>
<p>Best regards,</p>
]]></field>
        </record>


        <!--Email template -->
        <record id="email_template_edi_purchase_done" model="mail.template">
            <field name="name">Purchase Order - Send by Email</field>
            <field name="email_from">${(object.create_uid.email and '%s &lt;%s&gt;' % (object.create_uid.name, object.create_uid.email) or '')|safe}</field>
            <field name="subject">${object.company_id.name} Order (Ref ${object.name or 'n/a' })</field>
            <field name="partner_to">${object.partner_id.id}</field>
            <field name="model_id" ref="purchase.model_purchase_order"/>
            <field name="auto_delete" eval="True"/>
            <field name="report_template" ref="action_report_purchase_order"/>
            <field name="report_name">PO_${(object.name or '').replace('/','_')}</field>
            <field name="lang">${object.partner_id.lang}</field>
            <field name="body_html"><![CDATA[
<p>Dear ${object.partner_id.name} 
% if object.partner_id.parent_id:
    (<i>${object.partner_id.parent_id.name}</i>)
% endif
,</p>
<p>
Please find in attachment a <strong>${object.state in ('draft', 'sent') and 'request for quotation' or 'purchase order confirmation'} ${object.name}</strong>
% if object.partner_ref:
    with reference: ${object.partner_ref}
% endif
% if object.origin:
    (RFQ origin: ${object.origin})
% endif
amounting <strong>${object.amount_total} ${object.currency_id.name}</strong>
from ${object.company_id.name}.
</p>

<p>You can reply to this email if you have any questions.</p>
<p>Thank you,</p>
]]></field>
        </record>

    </data>
</odoo>

{'fraction_non_alphanumeric': 0.18414634146341463, 'fraction_numerical': 0.001676829268292683, 'mean_word_length': 3.6598011363636362, 'pattern_counts': {'":': 0, '<': 147, '<?xml version=': 2, '>': 147, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3620100', 'n_tokens_mistral': 2179, 'n_tokens_neox': 2145, 'n_words': 444}