Kaynağa Gözat

[FIX] modificaciones teniendo en cuenta el rubro gastronomico

Rodney Elpidio Enciso Arias 7 yıl önce
ebeveyn
işleme
26d3b21845

+ 3 - 1
__openerp__.py

@@ -5,10 +5,12 @@
     'website': "http://www.yourcompany.com",
     'category': 'Uncategorized',
     'version': '0.1',
-    'depends': ['base','eiru_assets','currency_utility'],
+    'depends': ['base','eiru_assets','currency_utility','purchase','point_of_sale'],
     'data': [
         'views/chart_config.xml',
         'views/res_users.xml',
+        'views/actions.xml',
+        'views/menus.xml',
         'templates.xml',
         'security/ir.model.access.csv',
         'data/charts_data.xml',

+ 31 - 19
static/src/js/widgets/chart_pos_order_product.js

@@ -143,6 +143,7 @@ function chart_pos_order_product (widget) {
         fetchChart: function (ranking){
             var self = this;
             var label = [];
+            var body = [];
             var bodyProducto = [];
             var labelService = [];
             var bodyService = [];
@@ -163,38 +164,49 @@ function chart_pos_order_product (widget) {
                 }else{
                     label.push(name[0]+"("+name[name.length-1]+")");
                 }
-                if (item.type === 'product'){
-                    bodyService.push(0);
-                    bodyProducto.push(item.qty);
-                }
-                if (item.type === 'service'){
-                    bodyService.push(item.qty);
-                    bodyProducto.push(0);
-                }
+                body.push(item.qty);
+                // if (item.type === 'product'){
+                //     bodyService.push(0);
+                //     bodyProducto.push(item.qty);
+                // }
+                // if (item.type === 'service'){
+                //     bodyService.push(item.qty);
+                //     bodyProducto.push(0);
+                // }
             }
 
             var chart = new Chart(this.$el.find(".widget-content").find('canvas'), {
                 type: 'line',
                 data: {
                     labels: label,
+                    // datasets: [
+                    //     {
+                    //         label: 'Productos ',
+                    //         borderWidth: 2,
+                    //         backgroundColor: '#e3f2fd',
+                    //         borderColor: '#64b5f6',
+                    //         data: bodyProducto,
+                    //         fill: false,
+                    //     },
+                    //     {
+                    //         label: 'Servicios ',
+                    //         borderWidth: 2,
+                    //         backgroundColor: '#c8e6c9',
+                    //         borderColor: '#66bb6a',
+                    //         borderDash: [5, 5],
+                    //         data: bodyService,
+                    //         fill: false,
+                    //     }
+                    // ]
                     datasets: [
                         {
                             label: 'Productos ',
                             borderWidth: 2,
                             backgroundColor: '#e3f2fd',
                             borderColor: '#64b5f6',
-                            data: bodyProducto,
-                            fill: false,
+                            data: body,
+                            fill: true,
                         },
-                        {
-                            label: 'Servicios ',
-                            borderWidth: 2,
-                            backgroundColor: '#c8e6c9',
-                            borderColor: '#66bb6a',
-                            borderDash: [5, 5],
-                            data: bodyService,
-                            fill: false,
-                        }
                     ]
                 },
                 options: {

+ 115 - 0
views/actions.xml

@@ -0,0 +1,115 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+	<data>
+        <!-- Reporting Dashboard -->
+        <record id="eiru_reporting_dashboard_action" model="ir.actions.client">
+            <field name="name">Reporting Dashboard</field>
+            <field name="tag">eiru_reporting_dashboard.action_dashboard</field>
+        </record>
+
+        <!-- Clientes -->
+        
+         <record id="eiru_reporting_dashboard_customer_action" model="ir.actions.act_window">
+            <field name="name">Clientes</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">res.partner</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="base.view_partner_tree"/>
+            <field name="domain">[('active', '=', True),('customer', '=', True)]</field>
+            <field name="search_view_id" ref="base.view_res_partner_filter"/>
+        </record>
+
+        <!-- Session -->
+        
+         <record id="eiru_reporting_dashboard_pos_session_action" model="ir.actions.act_window">
+            <field name="name">Todas las Sesiones</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">pos.session</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="point_of_sale.view_pos_session_tree"/>
+            <field name="domain">[]</field>
+            <field name="search_view_id" ref="point_of_sale.view_pos_session_search"/>
+        </record>
+
+        <!-- Pos Order -->
+        
+         <record id="eiru_reporting_dashboard_pos_order_action" model="ir.actions.act_window">
+            <field name="name">Todas los pedidos</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">pos.order</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="point_of_sale.view_pos_order_tree"/>
+            <field name="domain">[]</field>
+            <field name="search_view_id" ref="point_of_sale.view_pos_order_filter"/>
+        </record>
+
+        <!-- Proveedores -->
+        
+         <record id="eiru_reporting_dashboard_supplier_action" model="ir.actions.act_window">
+            <field name="name">Proveedores</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">res.partner</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="base.view_partner_tree"/>
+            <field name="domain">[('active', '=', True),('supplier', '=', True)]</field>
+            <field name="search_view_id" ref="base.view_res_partner_filter"/>
+        </record>
+
+        <!-- Compras -->
+        
+        <record id="eiru_reporting_dashboard_purchase_action" model="ir.actions.act_window">
+            <field name="name">Registro de Compras</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">purchase.order</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="purchase.purchase_order_tree"/>
+            <field name="domain">[]</field>
+            <field name="search_view_id" ref="purchase.view_purchase_order_filter"/>
+        </record>
+
+        <!-- Productos -->
+        
+         <record id="eiru_reporting_dashboard_product_action" model="ir.actions.act_window">
+            <field name="name">Productos</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">product.template</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="product.product_template_tree_view"/>
+            <field name="domain">[('active', '=', True)]</field>
+            <field name="search_view_id" ref="product.product_template_search_view"/>
+        </record>
+        
+        <!-- Registro de caja -->
+        
+         <record id="eiru_reporting_dashboard_cash_action" model="ir.actions.act_window">
+            <field name="name">Registro de Caja</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">account.bank.statement</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="account.view_cash_statement_tree"/>
+            <field name="domain">[('journal_id.type', '=', 'cash')]</field>
+            <field name="search_view_id" ref="account.view_account_bank_statement_filter"/>
+        </record>
+
+        <!-- Extractos bancarios -->
+
+        <record id="eiru_reporting_dashboard_bank_action" model="ir.actions.act_window">
+            <field name="name">Extractos bancarios</field>
+            <field name="type">ir.actions.act_window</field>
+            <field name="res_model">account.bank.statement</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">tree,form</field>
+            <field name="view_id" ref="account.view_cash_statement_tree"/>
+            <field name="domain">[('journal_id.type', '=', 'bank')]</field>
+            <field name="search_view_id" ref="account.view_account_bank_statement_filter"/>
+        </record>
+
+    </data>
+</openerp>

+ 66 - 0
views/menus.xml

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<openerp>
+    <data>
+        <!-- menu principal -->
+        <menuitem id="eiru_report_main_menu" name="Inicio" sequence="1"/>
+        <!-- Primer menu -->
+        <menuitem id="report_dashboard_parent_menu" name="Panel de control" parent="eiru_report_main_menu" sequence="1"/>
+
+	    <!-- Submenu Dashboard-->
+	    <menuitem id="report_dashboard_menu_submenu" parent="report_dashboard_parent_menu" name="Dashboard" action="eiru_reporting_dashboard_action" />
+
+		<!-- Ventas -->
+	    <menuitem id="report_reporting_dashboard_sale_menu" name="Ventas" parent="eiru_report_main_menu" sequence="1"/>
+
+	   		<menuitem id="report_dashboard_customer_submenu" 
+	    	parent="report_reporting_dashboard_sale_menu" 
+	    	name="Clientes" 
+	    	action="eiru_reporting_dashboard_customer_action" />
+
+	    	<menuitem id="report_dashboard_session_submenu" 
+	    	parent="report_reporting_dashboard_sale_menu" 
+	    	name="Todas las sesiones" 
+	    	action="eiru_reporting_dashboard_pos_session_action" />
+
+	    	<menuitem id="report_dashboard_pos_order_submenu" 
+	    	parent="report_reporting_dashboard_sale_menu" 
+	    	name="Pedidos" 
+	    	action="eiru_reporting_dashboard_pos_order_action" />
+
+	   	<!-- Compras -->
+	    <menuitem id="report_reporting_dashboard_purchase_menu" name="Compras" parent="eiru_report_main_menu" sequence="2"/>	
+
+	    	<menuitem id="report_dashboard_supplier_submenu" 
+	    	parent="report_reporting_dashboard_purchase_menu" 
+	    	name="Proveedores" 
+	    	action="eiru_reporting_dashboard_supplier_action" />
+
+	    	<menuitem id="report_dashboard_purchase_submenu" 
+	    	parent="report_reporting_dashboard_purchase_menu" 
+	    	name="Registro de Compras" 
+	    	action="eiru_reporting_dashboard_purchase_action" />
+
+		<!-- Productos -->
+	    <menuitem id="report_reporting_dashboard_product_menu" name="Productos" parent="eiru_report_main_menu" sequence="3"/>	
+
+	    	<menuitem id="report_dashboard_product_submenu" 
+		    	parent="report_reporting_dashboard_product_menu" 
+		    	name="Productos" 
+		    	action="eiru_reporting_dashboard_product_action" />
+
+		<!-- Tesoreria -->
+	    <menuitem id="report_reporting_dashboard_bank_cash_menu" name="Tesoreria" parent="eiru_report_main_menu" sequence="4"/>
+
+		    <!-- Registro de caja-->
+		    <menuitem id="report_dashboard_bank_submenu" 
+		    	parent="report_reporting_dashboard_bank_cash_menu" 
+		    	name="Registro de caja" 
+		    	action="eiru_reporting_dashboard_cash_action" />
+			
+			<!-- Extracto Bancario -->
+		    <menuitem id="report_dashboard_cash_submenu" 
+		    	parent="report_reporting_dashboard_bank_cash_menu" 
+		    	name="Extracto Bancario" 
+		    	action="eiru_reporting_dashboard_bank_action" />
+	</data>
+</openerp>