[IMP] cosmetic changes
[odoo/odoo.git] / addons / sale / views / report_saleorder.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3 <data>
4 <template id="report_saleorder_document">
5     <t t-call="report.external_layout">
6         <div class="page">
7             <div class="oe_structure"/>
8             <div class="row">
9                 <div class="col-xs-6">
10                     <p t-if="o.partner_shipping_id == o.partner_invoice_id">Invoice and shipping address:</p>
11                     <p t-if="o.partner_shipping_id != o.partner_invoice_id">Invoice address: </p>
12                     <div t-field="o.partner_invoice_id" 
13                         t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true}'/>
14                     <p t-if="o.partner_id.vat">VAT: <span t-field="o.partner_id.vat"/></p>
15                     <div t-if="o.partner_shipping_id != o.partner_invoice_id">
16                         <p>Shipping address :</p>
17                         <div t-field="o.partner_shipping_id" 
18                             t-field-options='{"widget": "contact", "fields": ["address", "name", "phone", "fax"], "no_marker": true}'/>
19                         <p t-if="o.partner_id.vat">VAT: <span t-field="o.partner_id.vat"/></p>
20                     </div>                        
21                 </div>
22                 <div class="col-xs-5 col-xs-offset-1">
23                     <div t-field="o.partner_id"
24                         t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}' />
25                 </div>
26             </div>
27
28             <h2>
29                 <span t-if="o.state not in ['draft','sent']">Order N° </span>
30                 <span t-if="o.state in ['draft','sent']">Quotation N° </span>
31                 <span t-field="o.name"/>
32             </h2>
33
34             <div class="row mt32 mb32">
35                 <div t-if="o.client_order_ref" class="col-xs-3">
36                     <strong>Your Reference:</strong>
37                     <p t-field="o.client_order_ref"/>
38                 </div>
39                 <div t-if="o.date_order" class="col-xs-3">
40                     <strong t-if="o.state not in ['draft','sent']">Date Ordered:</strong>
41                     <strong t-if="o.state in ['draft','sent']">Quotation Date:</strong>
42                     <p t-field="o.date_order"/>
43                 </div>
44                 <div t-if="o.user_id.name" class="col-xs-3">
45                     <strong>Salesperson:</strong>
46                     <p t-field="o.user_id.name"/>
47                 </div>
48                 <div t-if="o.payment_term" class="col-xs-3">
49                     <strong>Payment Term:</strong>
50                     <p t-field="o.payment_term"/>
51                 </div>
52             </div>
53
54             <table class="table table-condensed">
55                 <thead>
56                     <tr>
57                         <th>Description</th>
58                         <th>Taxes</th>
59                         <th class="text-right">Quantity</th>
60                         <th class="text-right">Unit Price</th>
61                         <th groups="sale.group_discount_per_so_line">Disc.(%)</th>
62                         <th class="text-right">Price</th>
63                     </tr>
64                </thead>
65                <tbody class="sale_tbody">
66                     <tr t-foreach="o.order_line" t-as="l">
67                         <td>
68                            <span t-field="l.name"/>
69                         </td>
70                         <td>
71                             <span t-esc="', '.join(map(lambda x: x.name, l.tax_id))"/>
72                         </td>
73                         <td class="text-right">
74                             <span t-field="l.product_uom_qty"/>
75                             <span groups="product.group_uom" t-field="l.product_uom"/>
76                         </td>
77                         <td class="text-right">
78                             <span t-field="l.price_unit"/>
79                         </td>
80                         <td groups="sale.group_discount_per_so_line">
81                             <span t-field="l.discount"/>
82                         </td>
83                         <td class="text-right">
84                             <span t-field="l.price_subtotal"
85                                 t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
86                         </td>
87                     </tr>
88                 </tbody>
89             </table>
90
91             <div class="row">
92                 <div class="col-xs-4 pull-right">
93                     <table class="table table-condensed">
94                         <tr class="border-black">
95                             <td><strong>Total Without Taxes</strong></td>
96                             <td class="text-right">
97                                 <span t-field="o.amount_untaxed"
98                                     t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
99                             </td>
100                         </tr>
101                         <tr>
102                             <td>Taxes</td>
103                             <td class="text-right">
104                                 <span t-field="o.amount_tax"
105                                     t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
106                             </td>
107                         </tr>
108                         <tr class="border-black">
109                             <td><strong>Total</strong></td>
110                             <td class="text-right">
111                                 <span t-field="o.amount_total"
112                                     t-field-options='{"widget": "monetary", "display_currency": "o.pricelist_id.currency_id"}'/>
113                             </td>
114                         </tr>
115                     </table>
116                 </div>
117             </div>
118
119             <p t-field="o.note" />
120             <p t-if="o.payment_term">
121                 <strong>Payment Term:</strong>
122                 <span t-field="o.payment_term"/>
123             </p>
124             <div class="oe_structure"/>
125         </div>
126     </t>
127 </template>
128
129 <template id="report_saleorder">
130     <t t-call="report.html_container">
131         <t t-foreach="doc_ids" t-as="doc_id">
132             <t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'sale.report_saleorder_document')"/>
133         </t>
134     </t>
135 </template>
136 </data>
137 </openerp>