<?xml version="1.0" encoding="utf-8"?>
<openerp>
	<data>
		<report id="report_stock_product"
            model="report.stock.product"
            string="Listado General stock"
            report_type="qweb-pdf"
            name="report_stock_product.informe_stock_product_view"
            file="report_stock_product.informe_stock_product_view"
        />

		<template id="informe_stock_product_view">
			<t t-call="report.html_container">
				<t t-call="report.internal_layout">
					<div class="page">
						<style type="text/css">
							.crm_tcab{
							font-size: 3mm;
							font-family: Arial, Helvetica, sans-serif;
							}

							.crm_tbody{
							font-size: 2.8mm;
							font-family: Arial, Helvetica, sans-serif;
							}

							.logo1{
							width: 100%;
							top: 1.5cm;
							}

							.total1{
							font-size: 2.8mm;
							font-family: Arial, Helvetica, sans-serif;
							}

						</style>
						<h4 class="text-center">Listado General de stock</h4>
						<div class="logo1" />

						<table class="table table-condensed">
							<thead class="crm_tcab">
								<tr class="active">
									<th>Referencia</th>
									<th>Producto</th>
									<th class="text-right">Cantidad</th>
								</tr>
							</thead>
							<t t-foreach="docs" t-as="o">
							<tbody>
									<tr>
										<td>
											<span t-field="o.factory_reference"/>
										</td>
										<td>
											<span t-field="o.product_id"/>
										</td>

										<td class="text-right">
											<span t-field="o.quantity"/>
										</td>

									</tr>
							</tbody>
							</t>
							<tr>
                <td colspan="3"></td>
              </tr>
              <tr class="border-black">
               <td colspan="3">Total:</td>
								<td class="text-right">
                  <t t-set="total" t-value="sum([x.quantity for x in docs])"/>
                  <span t-esc="total"/>
                </td>
              </tr>
						</table>
					</div>
				</t>
			</t>
		</template>
	</data>
</openerp>
