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

<!--
    Copyright (C) 2016-TODAY LasLabs [https://laslabs.com]
    @license AGPL-3
-->

<odoo>

    <template id="prescription_lines" name="Prescription Lines">
        <h3 class="page-header">
            Prescriptions
        </h3>
        <t t-if="not patients">
            <p>There are currently no prescriptions associated with your account.</p>
        </t>
        <t t-if="patients">
            <h5>
                If you would like to order a medication, please click the green
                button to add to cart.
            </h5>
            <div class="container">
                <div class="row">
                <t t-foreach="prescription_order_lines" t-as="line">
                    <div class="col-xs-12 col-sm-6">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <span t-field="line.patient_id.name" /> - <span t-field="line.medicament_id.display_name" />
                            </div>
                            <div class="panel-body">
                                <p>
                                    <label class="label label-info">Rx Number</label>
                                    <span t-field="line.name" />
                                </p>
                                <p>
                                    <label class="label label-info">Remain</label>
                                    <span t-field="line.can_dispense_qty" />
                                </p>

                                <t t-if="line.can_dispense_qty">
                                    <t t-set="product" t-value="line.medicament_id.product_id" />
                                    <form action="/shop/cart/update" method="POST">
                                        <input type="hidden"
                                                name="csrf_token"
                                                t-att-value="request.csrf_token()"
                                                />
                                        <input type="hidden"
                                                class="product_id"
                                                name="product_id"
                                                t-att-value="int(product.product_variant_ids[0]) if len(product.product_variant_ids) == 1 else '0'"
                                                />
                                        <input type="hidden" name="set_qty" t-att-value="line.qty" />
                                        <t t-if="line.id in order_lines_filtered.ids or [line.id] == order_lines_filtered.ids">
                                            <button type="submit"
                                                    class="btn btn-success btn-xs mt8 pull-right"
                                                    >
                                                <i class="fa fa-2x fa-cart-plus" />
                                            </button>
                                        </t>
                                    </form>
                                </t>
                                <t t-if="not line.can_dispense_qty">
                                    <i class="fa fa-2x fa-times" />
                                </t>
                            </div>
                        </div>
                    </div>
                </t>
                </div>
            </div>
        </t>
    </template>

</odoo>
<commit_msg>[10.0][FIX] website_portal_medical_prescription_order_line: Fix text when no rx<commit_after><?xml version="1.0" encoding="utf-8"?>

<!--
    Copyright (C) 2016-TODAY LasLabs [https://laslabs.com]
    @license AGPL-3
-->

<odoo>

    <template id="prescription_lines" name="Prescription Lines">
        <h3 class="page-header">
            Prescriptions
        </h3>
        <t t-if="not prescription_order_lines">
            <p>There are currently no prescriptions associated with your account.</p>
        </t>
        <t t-if="prescription_order_lines">
            <h5>
                If you would like to order a medication, please click the green
                button to add to cart.
            </h5>
            <div class="container">
                <div class="row">
                <t t-foreach="prescription_order_lines" t-as="line">
                    <div class="col-xs-12 col-sm-6">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <span t-field="line.patient_id.name" /> - <span t-field="line.medicament_id.display_name" />
                            </div>
                            <div class="panel-body">
                                <p>
                                    <label class="label label-info">Rx Number</label>
                                    <span t-field="line.name" />
                                </p>
                                <p>
                                    <label class="label label-info">Remain</label>
                                    <span t-field="line.can_dispense_qty" />
                                </p>

                                <t t-if="line.can_dispense_qty">
                                    <t t-set="product" t-value="line.medicament_id.product_id" />
                                    <form action="/shop/cart/update" method="POST">
                                        <input type="hidden"
                                                name="csrf_token"
                                                t-att-value="request.csrf_token()"
                                                />
                                        <input type="hidden"
                                                class="product_id"
                                                name="product_id"
                                                t-att-value="int(product.product_variant_ids[0]) if len(product.product_variant_ids) == 1 else '0'"
                                                />
                                        <input type="hidden" name="set_qty" t-att-value="line.qty" />
                                        <t t-if="line.id in order_lines_filtered.ids or [line.id] == order_lines_filtered.ids">
                                            <button type="submit"
                                                    class="btn btn-success btn-xs mt8 pull-right"
                                                    >
                                                <i class="fa fa-2x fa-cart-plus" />
                                            </button>
                                        </t>
                                    </form>
                                </t>
                                <t t-if="not line.can_dispense_qty">
                                    <i class="fa fa-2x fa-times" />
                                </t>
                            </div>
                        </div>
                    </div>
                </t>
                </div>
            </div>
        </t>
    </template>

</odoo>

{'fraction_non_alphanumeric': 0.10463832136940916, 'fraction_numerical': 0.006212037548315848, 'mean_word_length': 0.7508458192363461, 'pattern_counts': {'":': 0, '<': 119, '<?xml version=': 2, '>': 119, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 80, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6005026', 'n_tokens_mistral': 1655, 'n_tokens_neox': 1569, 'n_words': 316}