Skip to content

Commit

Permalink
imp
Browse files Browse the repository at this point in the history
  • Loading branch information
Kev-Roche committed Feb 21, 2023
1 parent b285d78 commit 774a7e3
Show file tree
Hide file tree
Showing 12 changed files with 605 additions and 186 deletions.
1 change: 0 additions & 1 deletion purchase_requisition_proposal/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"views/purchase_order.xml",
"views/sale_order.xml",
"views/purchase_requisition.xml",
"views/purchase_requisition_proposal.xml",
"views/purchase_requisition_type.xml",
"wizard/wizard_requisition_proposal.xml",
"views/ir_config.xml",
Expand Down
90 changes: 87 additions & 3 deletions purchase_requisition_proposal/data/data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,7 @@
width="100%"
>
<tbody>
<tr
style="${loop.cycle('background-color:#f2f2f2', 'background-color: #ffffff')}"
>
<tr>
<td
align="left"
>${line.product_id.display_name}</td>
Expand Down Expand Up @@ -104,4 +102,90 @@
<field name="lang">${object.company_id.lang}</field>
<field name="auto_delete" eval="True" />
</record>

<record id="mail_template_result_proposal" model="mail.template">
<field name="name">Requistion Call: Send Result by email</field>
<field name="model_id" ref="purchase_requisition.model_purchase_requisition" />
<field
name="subject"
>${object.company_id.name} Closed Call for Proposals (Ref ${object.name or 'n/a' })</field>
<field
name="partner_to"
>${','.join([str(partner.id) for partner in object.company_to_call_ids.partner_id]}</field>
<field name="body_html" type="xml">
<div style="margin: 0px; padding: 0px;">
<p style="margin: 0px; padding: 0px; font-size: 13px;">
Dear collaborator,<br /><br />
The Call <strong>${object.name}</strong> from <strong
>${object.company_id.name}</strong> is now closed.<br />
Please find the selected proposals below:
<br /><br />
<div style="margin:0px;padding: 0px;">
% for line in object.line_ids:
<h4>${line.product_id.display_name}</h4>
<ul>
<li>Schedule Date: ${format_date(line.schedule_date)}</li>
<li
>Quantity: ${line.product_qty} ${line.product_uom_id.name}</li>
<li>Unit Price: ${line.price_unit}</li>
</ul>

% for prop in line.proposal_line_ids:
<table
style="color:#454748;font-size: 12px; border-collapse: collapse;"
width="70%"
>
<tbody>
<tr style="border-bottom:2px solid #dee2e6;">
<td width="10%" align="left"><strong
>Proposal</strong></td>
<td width="25%" align="center"><strong
>Company</strong></td>
<td width="15%" align="center"><strong
>Planned Quantity</strong></td>
<td width="15%" align="right"><strong
>Planned Date</strong></td>
</tr>
</tbody>
</table>
% if prop.qty_planned:
<table width="70%">
<tbody>
<tr>
<td width="10%" align="left">${prop.name}</td>
<td
width="25%"
align="center"
>${prop.partner_id.name} </td>
<td
width="15%"
align="center"
>${prop.qty_planned} ${prop.product_uom_id.name}</td>
<td width="15%" align="right"><strong>
${prop.date_planned}
</strong></td>
</tr>
</tbody>
</table>
<br />
% endif
% endfor
% endfor
<br /><br />
Thank you for your participation.
<br />
Best regards,
% if user.signature:
<br />
${user.signature | safe}
% endif
</div>
</p>
</div>
</field>
<field name="report_name">${(object.name or '').replace('/','-')}</field>
<field name="lang">${object.company_id.lang}</field>
<field name="auto_delete" eval="True" />
</record>

</odoo>
Loading

0 comments on commit 774a7e3

Please sign in to comment.