Merge pull request #3332 from akretion/8.0-prepare-analytic-pos
[odoo/odoo.git] / addons / point_of_sale / views / report_detailsofsales.xml
1 <?xml version="1.0" encoding="utf-8"?>
2 <openerp>
3 <data>
4 <template id="report_detailsofsales">
5     <t t-call="report.html_container">
6         <t t-call="report.internal_layout">
7             <div class="page">
8                 <h2>Details of Sales</h2>
9
10                 <div class="row mt32">
11                     <div class="col-xs-3">
12                         <strong>Company</strong>:<br/>
13                         <span t-esc="res_company.name"/>
14                     </div>
15                     <div class="col-xs-3">
16                         <strong>Users</strong>:<br/>
17                         <span t-esc="get_user_names(data['form']['user_ids']) or 'All'"/>
18                     </div>
19                     <div class="col-xs-3">
20                         <strong>Print Date</strong>:<br/>
21                         <span t-esc="formatLang(time.strftime('%Y-%m-%d'),date=True)"/>
22                     </div>
23                 </div>
24                 <div class="row mb32">
25                     <div class="col-xs-3">
26                         <strong>Start Period</strong>:<br/>
27                         <span t-esc="formatLang(data['form']['date_start'],date=True)"/> 
28                     </div>
29                     <div class="col-xs-3">
30                         <strong>End Period</strong>:<br/>
31                         <span t-esc="formatLang(data['form']['date_end'],date=True)"/> 
32                     </div>
33                 </div>
34
35                 <table class="table table-condensed">
36                     <thead>
37                         <th><strong>Date</strong></th>
38                         <th><strong>Order</strong></th>
39                         <th><strong>Product</strong></th>
40                         <th class="text-right"><strong>Price</strong></th>
41                         <th class="text-center"><strong>Qty</strong></th>
42                         <th class="text-center"><strong>Disc(%)</strong></th>
43                         <th class="text-center"><strong>Invoiced</strong></th>
44                     </thead>
45                     <tbody>
46                         <tr t-foreach="pos_sales_details(data['form'])" t-as="line_ids">
47                             <td>
48                                 <span t-esc="formatLang(line_ids['date_order'], date_time=True)"/>
49                             </td>
50                             <td>
51                                 <span t-esc="line_ids['pos_name']"/>
52                             </td>
53                             <td>
54                                 [<t t-if="line_ids['code']">
55                                     <span t-esc="line_ids['code']"/>
56                                 </t>]
57                                 <span t-esc="line_ids['name']"/>
58                             </td>
59                             <td class="text-right">
60                                 <span t-esc="formatLang(line_ids['price_unit'], dp='Sale Price', currency_obj=res_company.currency_id)"/>
61                             </td>
62                             <td class="text-center">
63                                 <span t-esc="formatLang(line_ids['qty'])"/>
64                                 <span t-esc="line_ids['uom']"/>
65                             </td>
66                             <td class="text-center">
67                                 <span t-esc="formatLang(line_ids['discount'], dp='Sale Price')"/>
68                             </td>
69                             <td class="text-center">
70                                 <t t-if="line_ids['invoice_id']">
71                                     <span t-esc="getinvoice(line_ids['invoice_id'])"/>
72                                 </t>
73                             </td>
74                         </tr>
75                     </tbody>
76                 </table>
77
78                 <table class="table table-condensed">
79                     <tr t-if="gettaxamount(data['form'])"><td colspan="2"><strong>Taxes</strong></td></tr>
80                     <tr t-foreach="gettaxamount(data['form'])" t-as="tax">
81                         <td><span t-esc="tax['name']"/></td>
82                         <td class="text-right">
83                             <strong t-esc="formatLang(tax['amount'], currency_obj = res_company.currency_id)"/>
84                         </td>
85                     </tr>
86                     <tr>
87                         <td colspan="2"><strong>Payment</strong></td>
88                     </tr>
89                     <tr t-foreach="getpayments(data['form'])" t-as="payment">
90                         <td><span t-esc="payment['name']"/></td>
91                         <td class="text-right">
92                             <strong t-esc="formatLang(payment['sum'], dp='Account', currency_obj=res_company.currency_id)"/>
93                         </td>
94                     </tr>
95                     <tr>
96                         <td colspan="2"><strong>Summary</strong></td>
97                     </tr>
98                     <tr>
99                         <td><strong>Sales total(Revenue)</strong></td>
100                         <td class="text-right">
101                             <strong t-esc="formatLang(getsalestotal2(), dp='Sale Price', currency_obj=res_company.currency_id)"/>
102                         </td>
103                     </tr>
104                     <tr>
105                         <td><strong>Qty of product</strong></td>
106                         <td class="text-right">
107                             <strong t-esc="formatLang(getqtytotal2())"/>
108                         </td>
109                     </tr>
110                     <tr>
111                         <td><strong>Total invoiced</strong></td>
112                         <td class="text-right">
113                             <strong t-esc="formatLang(getsuminvoice2(data['form']), dp='Sale Price', currency_obj=res_company.currency_id)"/>
114                         </td>
115                     </tr>
116                     <tr>
117                         <td><strong>Total discount</strong></td>
118                         <td class="text-right">
119                             <strong t-esc="formatLang(getsumdisc(data['form']), dp='Sale Price', currency_obj=res_company.currency_id)"/>
120                         </td>
121                     </tr>
122                     <tr>
123                         <td><strong>Total paid</strong></td>
124                         <td class="text-right">
125                             <strong t-esc="formatLang(getpaidtotal2(), dp='Sale Price', currency_obj=res_company.currency_id)"/>
126                         </td>
127                     </tr>
128                     <tr>
129                         <td><strong>Total of the day</strong></td>
130                         <td class="text-right">
131                             <strong t-esc="formatLang(gettotaloftheday(data['form']), dp='Sale Price', currency_obj = res_company.currency_id)"/>
132                         </td>
133                     </tr>
134                 </table>
135             </div>
136         </t>
137     </t>
138 </template>
139 </data>
140 </openerp>