[IMP] purchase_requisition: adapt to report layout
task-3447407 Part-of: odoo/odoo#135739 Co-authored-by: Prakash Prajapati <ppr@odoo.com>, Dheeraj Pandey <padh@odoo.com>
This commit is contained in:
committed by
Prakash Prajapati
co-authored by
Prakash Prajapati <ppr@odoo.com>, Dheeraj Pandey <padh@odoo.com>
parent
63c1ccab81
commit
e95ea1ab3d
@@ -5,36 +5,37 @@
|
||||
<t t-set="o" t-value="o.with_context(lang=o.vendor_id.lang)"/>
|
||||
<t t-call="web.external_layout">
|
||||
<t t-set="address">
|
||||
<div t-field="o.vendor_id"
|
||||
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'/>
|
||||
<p t-if="o.vendor_id.vat"><t t-esc="o.company_id.account_fiscal_country_id.vat_label or 'Tax ID'"/>: <span t-field="o.vendor_id.vat"/></p>
|
||||
<span t-field="o.vendor_id"
|
||||
t-options='{"widget": "contact", "fields": ["address", "name", "phone"], "no_marker": True, "phone_icons": True}'>VAT123</span>
|
||||
<p t-if="o.vendor_id.vat"><t t-out="o.company_id.account_fiscal_country_id.vat_label or 'Tax ID'"/>: <span t-field="o.vendor_id.vat">VAT_DEMO</span></p>
|
||||
</t>
|
||||
<div class="page">
|
||||
<div class="oe_structure"/>
|
||||
|
||||
<h2><span t-out="o.type_id.name"/> <span t-field="o.name"/></h2>
|
||||
<h2><span t-out="o.type_id.name">VAT</span> <span t-field="o.name">Type Demo</span></h2>
|
||||
|
||||
<div class="row my-2">
|
||||
<div class="col-3">
|
||||
<strong><span t-out="o.type_id.name"/> Reference:</strong><br/>
|
||||
<span t-field="o.name"/>
|
||||
<strong><span t-out="o.type_id.name">Reference:</span></strong><br/>
|
||||
<span t-field="o.name">Reference Demo</span>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<strong>Scheduled Ordering Date:</strong><br/>
|
||||
<span t-field="o.ordering_date"/>
|
||||
<span t-field="o.ordering_date">2023-08-20</span>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<strong>Agreement Deadline:</strong><br/>
|
||||
<span t-field="o.date_end"/>
|
||||
<span t-field="o.date_end">2023-09-15</span>
|
||||
</div>
|
||||
<div class="col-3">
|
||||
<strong>Source:</strong><br/>
|
||||
<span t-field="o.origin"/>
|
||||
<span t-field="o.origin">Origin Demo</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<t t-if="o.line_ids">
|
||||
<h3>Products</h3>
|
||||
<div class="oe_structure"></div>
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -51,27 +52,25 @@
|
||||
<tbody>
|
||||
<tr t-foreach="o.line_ids" t-as="line_ids">
|
||||
<td>
|
||||
<t t-if="line_ids.product_id.code"><!--internal reference exists-->
|
||||
[ <span t-field="line_ids.product_id.code"/> ]
|
||||
</t>
|
||||
<span t-field="line_ids.product_id.name"/>
|
||||
<span t-if="line_ids.product_id.code"><!--internal reference exists-->
|
||||
[ <span t-field="line_ids.product_id.code">Code</span> ]
|
||||
</span>
|
||||
<span t-field="line_ids.product_id.name">Product</span>
|
||||
</td>
|
||||
<td>
|
||||
<span t-field="line_ids.product_description_variants"/>
|
||||
<span t-field="line_ids.product_description_variants">Description Demo</span>
|
||||
</td>
|
||||
<td class="text-end">
|
||||
<span t-field="line_ids.product_qty"/>
|
||||
<span t-field="line_ids.product_qty">5</span>
|
||||
</td>
|
||||
<td class="text-center" groups="uom.group_uom">
|
||||
<span t-field="line_ids.product_uom_id.name">Unit</span>
|
||||
</td>
|
||||
<t>
|
||||
<td class="text-center" groups="uom.group_uom">
|
||||
<span t-field="line_ids.product_uom_id.name"/>
|
||||
</td>
|
||||
</t>
|
||||
<td t-if="o.type_id == env.ref('purchase_requisition.type_single')">
|
||||
<span t-field="line_ids.price_unit" t-options='{"widget": "monetary", "display_currency": line_ids.requisition_id.currency_id}'/>
|
||||
<span t-field="line_ids.price_unit" t-options='{"widget": "monetary", "display_currency": line_ids.requisition_id.currency_id}'>Price</span>
|
||||
</td>
|
||||
<td class="text-end">
|
||||
<span t-field="line_ids.schedule_date"/>
|
||||
<span t-field="line_ids.schedule_date">2023-08-11</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@@ -91,13 +90,13 @@
|
||||
<tbody>
|
||||
<tr t-foreach="o.purchase_ids" t-as="purchase_ids">
|
||||
<td>
|
||||
<span t-field="purchase_ids.partner_id.name"/>
|
||||
<span t-field="purchase_ids.partner_id.name">Vendor Name</span>
|
||||
</td>
|
||||
<td class="text-end">
|
||||
<span t-field="purchase_ids.date_order"/>
|
||||
<span t-field="purchase_ids.date_order">2023-08-15</span>
|
||||
</td>
|
||||
<td class="text-end">
|
||||
<span t-field="purchase_ids.name"/>
|
||||
<span t-field="purchase_ids.name">Reference Demo</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user