Displayed the name of Intrasat code in Intrasat Invoice report instead of browse...
[odoo/odoo.git] / addons / report_intrastat / views / report_intrastatinvoice.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3 <data>
4 <template id="report_intrastatinvoice_document">
5     <t t-call="report.external_layout">
6         <div class="page">
7             <div class="row">
8                 <div class="col-xs-5 col-xs-offset-7">
9                     <address t-field="o.partner_id"
10                         t-field-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": true}' />
11                     <span t-field="o.partner_id.vat"/>
12                 </div>
13             </div>
14
15             <h2>
16                 <span t-if="o.type == 'out_invoice' and (o.state == 'open' or o.state == 'paid')">Invoice</span>
17                 <span t-if="o.type == 'out_invoice' and o.state == 'proforma2'">PRO-FORMA</span>
18                 <span t-if="o.type == 'out_invoice' and o.state == 'draft'">Draft Invoice</span>
19                 <span t-if="o.type == 'out_invoice' and o.state == 'cancel'">Cancelled Invoice</span>
20                 <span t-if="o.type == 'out_refund'">Refund</span>
21                 <span t-if="o.type == 'in_refund'">Supplier Refund</span>
22                 <span t-if="o.type == 'in_invoice'">Supplier Invoice</span>
23                 <span t-field="o.number"/>
24             </h2>
25
26             <div class="row mt32 mb32">
27                 <div class="col-xs-3" t-if="o.name">
28                     <strong>Document:</strong>
29                     <p t-field="o.name"/>
30                 </div>
31                 <div class="col-xs-3" t-if="o.date_invoice">
32                     <strong>Invoice Date:</strong>
33                     <p t-field="o.date_invoice"/>
34                 </div>
35                 <div class="col-xs-3" t-if="o.partner_id.ref">
36                     <strong>Partner Ref.:</strong>
37                     <p t-field="o.partner_id.ref"/>
38                 </div>
39             </div>
40
41             <table class="table table-condensed">
42                 <thead>
43                     <tr>
44                         <th>Description</th>
45                         <th class="text-right">Taxes</th>
46                         <th class="text-right">Intrastat</th>
47                         <th class="text-right">Weight</th>
48                         <th class="text-right">Quantity</th>
49                         <th groups="product.group_uom">Unit of measure</th>
50                         <th class="text-right">Unit Price</th>
51                         <th class="text-right" groups="sale.group_discount_per_so_line">Discount (%)</th>
52                         <th class="text-right">Amount</th>
53                     </tr>
54                 </thead>
55                 <tbody>
56                     <tr t-foreach="o.invoice_line" t-as="l">
57                         <td><span t-field="l.name"/></td>
58                         <td class="text-right"><span t-esc="', '.join(map(lambda x: x.name, l.invoice_line_tax_id))"/></td>
59                         <td class="text-right"><span t-esc="l.product_id.intrastat_id.name"/></td>
60                         <td class="text-right"><span t-esc="l.product_id.weight"/></td>
61                         <td class="text-right"><span t-field="l.quantity"/></td>
62                         <td groups="product.group_uom"><span t-field="l.uos_id"/></td>
63                         <td class="text-right"><span t-field="l.price_unit"/></td>
64                         <td groups="sale.group_discount_per_so_line"><span t-field="l.discount"/></td>
65                         <td class="text-right">
66                             <span t-field="l.price_subtotal"
67                                 t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
68                         </td>
69                     </tr>
70                 </tbody>
71             </table>
72
73             <div class="row">
74                 <div class="col-xs-4 pull-right">
75                     <table class="table table-condensed">
76                         <tr class="border-black">
77                             <td><strong>Total Without Taxes</strong></td>
78                             <td class="text-right">
79                                 <span t-field="o.amount_untaxed" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
80                             </td>
81                         </tr>
82                         <tr>
83                             <td>Taxes</td>
84                             <td class="text-right">
85                                 <span t-field="o.amount_tax" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
86                             </td>
87                         </tr>
88                         <tr class="border-black">
89                             <td><strong>Total</strong></td>
90                             <td class="text-right">
91                                  <span t-field="o.amount_total" t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
92                             </td>
93                         </tr>
94                     </table>
95                 </div>
96             </div>
97
98             <div class="row" t-if="o.tax_line">
99                 <div class="col-xs-3">
100                     <table class="table table-condensed">
101                         <thead>
102                             <tr>
103                                 <th>Tax</th>
104                                 <th class="text-right">Base</th>
105                                 <th class="text-right">Amount</th>
106                             </tr>
107                         </thead>
108                         <tbody>
109                             <tr t-foreach="o.tax_line" t-as="t">
110                                 <td><span t-field="t.name"/></td>
111                                 <td class="text-right">
112                                     <span t-field="t.base"
113                                         t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
114                                 </td>
115                                 <td class="text-right">
116                                     <span t-field="t.amount"
117                                         t-field-options='{"widget": "monetary", "display_currency": "o.currency_id"}'/>
118                                 </td>
119                             </tr>
120                         </tbody>
121                     </table>
122                 </div>
123             </div>
124
125             <p t-if="o.comment">
126                 <strong>Comment:</strong>
127                 <span t-field="o.comment"/>
128             </p>
129             <p t-if="o.payment_term">
130                 <strong>Payment Term:</strong>
131                 <span t-field="o.payment_term"/>
132             </p>
133             <p t-if="o.fiscal_position">
134                 <strong>Fiscal Position:</strong>
135                 <span t-field="o.fiscal_position.note"/>
136             </p>
137         </div>
138     </t>
139 </template>
140
141 <template id="report_intrastatinvoice">
142     <t t-call="report.html_container">
143         <t t-foreach="doc_ids" t-as="doc_id">
144             <t t-raw="translate_doc(doc_id, doc_model, 'partner_id.lang', 'report_intrastat.report_intrastatinvoice_document')"/>
145         </t>
146     </t>
147 </template>
148 </data>
149 </openerp>