| 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <odoo> |
| 3 | |
| 4 | <template id="sale_order_portal_content_inherit_sale_mrp" |
| 5 | name="Orders MOs" |
| 6 | inherit_id="sale.sale_order_portal_content"> |
| 7 | <xpath expr="//div[@id='informations']" position="inside"> |
| 8 | <t t-set="mrp_productions" t-value="sale_order.mrp_production_ids"/> |
| 9 | <t t-if="mrp_productions"> |
| 10 | <div> |
| 11 | <strong>Manufacturing Orders</strong> |
| 12 | </div> |
| 13 | <div> |
| 14 | <t t-foreach="mrp_productions" t-as="mo"> |
| 15 | <div class="d-flex flex-wrap align-items-center justify-content-between"> |
| 16 | <div> |
| 17 | <span t-out="mo.name"/> |
| 18 | <div class="small d-lg-inline-block ms-3"> |
| 19 | Date: |
| 20 | <span class="text-muted" |
| 21 | t-field="mo.date_finished" |
| 22 | t-options="{'date_only': True}"/> |
| 23 | </div> |
| 24 | </div> |
| 25 | <span t-if="mo.state in ['to_close', 'done']" |
| 26 | class="small badge text-bg-success orders_label_text_align"> |
| 27 | <i class="fa fa-fw fa-check"/> <b>Manufactured</b> |
| 28 | </span> |
| 29 | <span t-elif="mo.state == 'cancel'" |
| 30 | class="small badge text-bg-danger orders_label_text_align"> |
| 31 | <i class="fa fa-fw fa-times"/> <b>Cancelled</b> |
| 32 | </span> |
| 33 | <span t-elif="mo.state in ['confirmed']" |
| 34 | class="small badge text-bg-info orders_label_text_align"> |
| 35 | <i class="fa fa-fw fa-clock-o"/> <b>Confirmed</b> |
| 36 | </span> |
| 37 | <span t-elif="mo.state in ['progress']" |
| 38 | class="small badge text-bg-warning orders_label_text_align"> |
| 39 | <i class="fa fa-fw fa-clock-o"/> <b>In progress</b> |
| 40 | </span> |
| 41 | </div> |
| 42 | </t> |
| 43 | </div> |
| 44 | </t> |
| 45 | </xpath> |
| 46 | </template> |
| 47 | |
| 48 | </odoo> |