summaryrefslogtreecommitdiff
path: root/addons/sale_purchase/data/mail_data.xml
blob: 1531720fef8b69e66b321764b5e6c04f9f8cd2ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?xml version="1.0" encoding="utf-8"?>
<odoo>

<template id="exception_purchase_on_sale_quantity_decreased" name="Message: Alert on purchase orders when ordered quantity decreased on Sales Orders">
    <div>
        <p>
            Exception(s) occurred on the sale order(s):
            <t t-foreach="sale_orders" t-as="sale_order">
                <a href="#" data-oe-model="sale.order" t-att-data-oe-id="sale_order.id"><t t-esc="sale_order.name"/></a>.
            </t>
            Manual actions may be needed.
        </p>
        <div class="mt16">
            <p>Exception(s):</p>
            <ul t-foreach="sale_lines" t-as="sale_line">
                <li>
                    <t t-set="new_qty" t-value="sale_line.product_uom_qty"/>
                    <t t-set="old_qty" t-value="origin_values.get(sale_line.id, 0.0)"/>

                    <a href="#" data-oe-model="sale.order" t-att-data-oe-id="sale_line.order_id.id"><t t-esc="sale_line.order_id.name"/></a>:
                    <t t-esc="new_qty"/> <t t-esc="sale_line.product_uom.name"/> of <t t-esc="sale_line.product_id.name"/> ordered instead of <t t-esc="old_qty"/> <t t-esc="sale_line.product_uom.name"/>
                  </li>
            </ul>
        </div>
    </div>
</template>

<template id="exception_purchase_on_sale_cancellation" name="Message: Alert on purchase orders when sales orders are cancelled">
    <div>
        <p>
            Exception(s) occurred on the sale order(s):
            <t t-foreach="sale_orders" t-as="sale_order">
                <a href="#" data-oe-model="sale.order" t-att-data-oe-id="sale_order.id"><t t-esc="sale_order.name"/></a>
            </t>.
            Manual actions may be needed.
        </p>
        <div class="mt16">
            <p>Exception(s):</p>
            <ul t-foreach="sale_order_lines" t-as="sale_line">
                <li>
                    <a href="#" data-oe-model="sale.order" t-att-data-oe-id="sale_line.order_id.id"><t t-esc="sale_line.order_id.name"/></a>: <t t-esc="sale_line.product_uom_qty"/> <t t-esc="sale_line.product_uom.name"/> of <t t-esc="sale_line.product_id.name"/> cancelled
                </li>
            </ul>
        </div>
    </div>
</template>

<template id="exception_sale_on_purchase_cancellation" name="Message: Alert on sale orders when purchase orders are cancelled">
    <div>
        <p>
            Exception(s) occurred on the purchase order(s):
            <t t-foreach="purchase_orders" t-as="purchase_order">
                <a href="#" data-oe-model="purchase.order" t-att-data-oe-id="purchase_order.id"><t t-esc="purchase_order.name"/></a>
            </t>.
            Manual actions may be needed.
        </p>
        <div class="mt16">
            <p>Exception(s):</p>
            <ul t-foreach="purchase_order_lines" t-as="purchase_line">
                <li>
                    <a href="#" data-oe-model="purchase.order" t-att-data-oe-id="purchase_line.order_id.id"><t t-esc="purchase_line.order_id.name"/></a>: <t t-esc="purchase_line.product_qty"/> <t t-esc="purchase_line.product_uom.name"/> of <t t-esc="purchase_line.product_id.name"/> cancelled
                </li>
            </ul>
        </div>
    </div>
</template>

</odoo>