ソースを参照

commit inicial

Adrielso 8 年 前
コミット
4ab0dc83f3

+ 0 - 0
__init__.py


BIN
__init__.pyc


+ 7 - 5
__openerp__.py

@@ -1,14 +1,16 @@
 # -*- encoding: utf-8 -*-
 {
-    'name': 'Warehouse Transfer Print',
+    'name': 'Listado de Coste de Producto',
     'version': '0.1',
-    'category': 'Purchase',
+    'category': 'Product',
     'description': """
-Impresion de transferencia Interna
+Impresion de coste de Producto
 ==========================================================
 """,
     'author': 'Adrielso Kunert',
-    'depends': ['stock_warehouse_transfer',],
-    'data': ['views/print_stock_product_view.xml',],
+    'depends': ['sale',],
+    'data': ['views/print_product_standard_view.xml',
+             'views/product_template_standardprice_tree.xml',
+             'views/product_coste_valorizado_view.xml',],
     'installable': True,
 }

+ 0 - 0
static/description/icon.png


+ 47 - 0
views/print_product_standard_view.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+	<data>
+		<report id="list_coste_product" model="product.template" string="Precio Coste de Producto" report_type="qweb-pdf"
+            name="report_product.print_product_standard_view" file="report_product.print_product_standard_view" />
+
+		<template id="print_product_standard_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;
+								}
+							</style>
+						  <h2 class="text-center"><strong>Listado de Precio Coste de Productos</strong></h2>
+            	<table class="table table-condensed">
+						  <thead class="crm_tcab">
+								<tr class="active">
+						      <th><strong>Producto</strong></th>
+						      <th><strong>Referencia de Fabrica</strong></th>
+						      <th><strong>Precio de Coste</strong></th>
+									<th><strong>Precio de Venta</strong></th>
+						    </tr>
+						  </thead>
+							<t t-foreach="docs" t-as="o">
+						  <tbody class="crm_tbody">
+								<tr>
+						     	<td> <span t-field="o.name"/> </td>
+						     	<td> <span t-field="o.factory_reference"/> </td>
+								 	<td> <span t-field="o.standard_price"/> </td>
+								 	<td> <span t-field="o.list_price"/> </td>
+							 	</tr>
+							</tbody>
+							</t>
+						  </table>
+						</div>
+				</t>
+			</t>
+		</template>
+	</data>
+</openerp>

+ 0 - 56
views/print_stock_product_view.xml

@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<openerp>
-	<data>
-		<report id="report_warehouse_transfer" model="stock.warehouse.transfer" string="Transferencia" report_type="qweb-pdf"
-            name="stock_warehouse_transfer_report.print_stock_product_view" file="stock_warehouse_transfer_report.print_stock_product_view" />
-
-		<template id="print_stock_product_view">
-			<t t-call="report.html_container">
-				<t t-foreach="docs" t-as="o">
-					<t t-call="report.internal_layout">
-						<div class="page">
-							<h2 class="text-center"><strong>Transferencia Interna de Productos</strong></h2>
-
-							<div t-if="o.name" name="Transferencia" class="col-xs-12">
-					 			<p><strong>Operación numero :</strong><span t-field="o.name"/></p>
-					 		</div>
-
-							<div t-if="o.source_warehouse" name="Origin" class="col-xs-6">
-									<p><strong>Sucursal de Origen :</strong><span t-field="o.source_warehouse"/></p>
-							</div>
-							<div t-if="o.dest_warehouse" name="Destino" class="col-xs-6">
-									<p><strong>Sucursal de Destino :</strong><span t-field="o.dest_warehouse"/></p>
-							</div>
-
-							<div t-if="o.create_uid" name="user" class="col-xs-6">
-								<p><strong>Creado por :</strong><span t-field="o.create_uid"/></p>
-							</div>
-
-							<div t-if="o.date" class="col-xs-6">
-								<p><strong>Fecha de Creación :</strong><span t-field="o.date"/></p>
-							</div>
-
-							<br></br>
-							<table class="table table-condensed">
-						    <thead>
-						    	<tr>
-						        <th><strong>Producto</strong></th>
-						        <th><strong>Referencia de Fabrica</strong></th>
-						        <th><strong>Cantidad</strong></th>
-						      </tr>
-						    </thead>
-						    <tbody>
-						      <tr t-foreach="o.lines" t-as="line">
-						         <td> <span t-field="line.product_id"/> </td>
-						         <td> <span t-field="line.factory_reference"/> </td>
-										 <td> <span t-field="line.product_qty"/> </td>
-						      </tr>
-						    </tbody>
-						  </table>
-						</div>
-					</t>
-				</t>
-			</t>
-		</template>
-	</data>
-</openerp>

+ 59 - 0
views/product_coste_valorizado_view.xml

@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="utf-8"?>
+<openerp>
+	<data>
+		<report id="list_coste_product_valorizado" model="product.template" string="Precio Coste Valorizado" report_type="qweb-pdf"
+            name="report_product.product_coste_valorizado_view" file="report_product.product_coste_valorizado_view" />
+
+		<template id="product_coste_valorizado_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;
+								}
+							</style>
+						  <h2 class="text-center"><strong>Listado de Precio Coste de Productos</strong></h2>
+            	<table class="table table-condensed">
+						  <thead class="crm_tcab">
+								<tr class="active">
+						      <th><strong>Producto</strong></th>
+						      <th><strong>Referencia de Fabrica</strong></th>
+									<th class="text-right"><strong>Cantidad</strong></th>
+						      <th class="text-right"><strong>Precio de Coste</strong></th>
+									<th class="text-right"><strong>Coste Valoreizado</strong></th>
+						    </tr>
+						  </thead>
+							<t t-foreach="docs" t-as="o">
+						  <tbody class="crm_tbody">
+								<tr>
+						     	<td> <span t-field="o.name"/> </td>
+						     	<td> <span t-field="o.factory_reference"/> </td>
+									<td class="text-right"> <span t-field="o.qty_available"/></td>
+ 								 	<td class="text-right"> <span t-field="o.standard_price"/> </td>
+									<t t-set="total" t-value="o.qty_available * o.standard_price"/>
+								 	<td class="text-right"> <span t-esc="total"/> </td>
+							 	</tr>
+							</tbody>
+							</t>
+							<tr class="border-black">
+							 <td colspan="4">Total:</td>
+								<td class="text-right">
+									<!-- <t t-set="standard_pri" t-value="sum([x.standard_price for x in docs])"/> -->
+									<t t-set="tot" t-value="sum([(x.qty_available * x.standard_price)  for x in docs])"/>
+									<!-- <t t-set="tot" t-value="tot"/> -->
+									<span t-esc="tot"/>
+								</td>
+							</tr>
+						  </table>
+						</div>
+				</t>
+			</t>
+		</template>
+	</data>
+</openerp>

+ 17 - 0
views/product_template_standardprice_tree.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+  <data>
+    <record model="ir.ui.view" id="product_template_standardprice_tree">
+        <field name="name">product_template_standardprice_tree</field>
+        <field name="model">product.template</field>
+        <field name="inherit_id" ref="product.product_template_tree_view"/>
+        <field name="arch" type="xml">
+            <data>
+                <field name="list_price" position="after">
+                    <field name="standard_price"/>
+                </field>
+            </data>
+          </field>
+    </record>
+  </data>
+</openerp>