Hi
I am trying to add a field to the Extra Info in the eCommerce Website Odoo V 14.0. I've enabled Extra Info and I've added my new Date field to the sale.order model (new field is website_delivery_date). I've added the following code to the views and it works, but I'm wondering if there is any way I can use the templating engine to dynamically create this field instead of having to hard code all the values...or is there any other better way to do this...new-oddo-er here, so this may be a simple question?
<odoo>
<data>
<!-- Override for Website Sale Addrees View -->
<template id="extra_info_custom" name="Checkout Extra Info with Delivery Date" inherit_id="website_sale.extra_info">
<xpath expr="//div[contains(@class,'s_website_form_submit')]" position="before">
<!-- Adding in Delivery Date at bottom of Form -->
<div class="form-group s_website_form_field col-12 s_website_form_custom" data-type="date" data-name="Field">
<div class="row s_col_no_resize s_col_no_bgcolor">
<label class="col-form-label col-sm-auto s_website_form_label " style="width: 200px" for="website_delivery_date">
<span class="s_website_form_label_content">Delivery Date</span>
</label>
<div class="col-sm">
<div class="s_website_form_date input-group date" id="datepicker_website_delivery_date" data-target-input="nearest">
<input type="text" class="form-control datetimepicker-input s_website_form_input" data-target="#datepicker_website_delivery_date" name="website_delivery_date" placeholder="" id="website_delivery_date" required="1" />
<div class="input-group-append" data-target="#datepicker_website_delivery_date" data-toggle="datetimepicker">
<div class="input-group-text">
<i class="fa fa-calendar"></i>
</div>
</div>
</div>
</div>
</div>
</div>
</xpath>
</template>
</data>
</odoo>
Thanks