Forráskód Böngészése

[FIX] add type form en view

adrielso 7 éve
szülő
commit
d6f28ce995

BIN
__init__.pyc


+ 1 - 1
static/src/js/widgets/expired_account_counters_now.js

@@ -1,7 +1,7 @@
 function expired_account_counters_now (widget) {
     "use strict";
 
-    var model= openerp;
+    var model = openerp;
 
     widget.ExpiredAccountCountersNowWidget = widget.Base.extend({
         template: 'ExpiredAccountCountersNow',

+ 2 - 1
static/src/js/widgets/invoice_today_counters.js

@@ -71,10 +71,11 @@ function invoice_today_counters (widget) {
                 name:"Facturas realizadas hoy",
                 type: 'ir.actions.act_window',
                 res_model: "account.invoice",
-                views: [[false, 'list']],
+                views: [[false, 'list'],[false,'form']],
                 target: 'new',
                 domain: [['type', '=', 'out_invoice'], ['state', 'in', ['open','paid']], ['date_invoice', '=', hoy]],
                 context: {},
+                flags: {'form': {'action_buttons': false, 'options': {'mode': 'view'}}},
             });
         }
     });

+ 2 - 1
static/src/js/widgets/missing_product.js

@@ -74,10 +74,11 @@ function missing_product (widget) {
                 name:"Listado de productos faltan-tes",
                 type: 'ir.actions.act_window',
                 res_model: "product.product",
-                views: [[false, 'list']],
+                views: [[false, 'list'],[false,'form']],
                 target: 'new',
                 domain: [['type', '=', 'product'],['qty_available','<=',0]],
                 context: {},
+                flags: {'form': {'action_buttons': false, 'options': {'mode': 'view'}}},
             });
         }
     });

+ 2 - 1
static/src/js/widgets/monthly_expenses.js

@@ -194,10 +194,11 @@ function monthly_expenses(widget) {
                 name:"Listado de gastos del mes",
                 type: 'ir.actions.act_window',
                 res_model: "account.voucher",
-                views: [[false, 'list']],
+                views: [[false, 'list'],[false,'form']],
                 target: 'new',
                 domain: [['type', '=', 'payment'],['state', '=', 'posted'],['date', '>=',desde],['date','<',hasta],['reference','in',number]],
                 context: {},
+                flags: {'form': {'action_buttons': false, 'options': {'mode': 'view'}}},
             });
         }
     });

+ 2 - 1
static/src/js/widgets/monthly_purchases.js

@@ -191,10 +191,11 @@ function monthly_purchases(widget) {
                 name:"Listado de compras del mes",
                 type: 'ir.actions.act_window',
                 res_model: "account.voucher",
-                views: [[false, 'list']],
+                views: [[false, 'list'],[false,'form']],
                 target: 'new',
                 domain: [['type', '=', 'payment'],['state', '=', 'posted'],['date', '>=',desde],['date','<',hasta],['reference','in',number]],
                 context: {},
+                flags: {'form': {'action_buttons': false, 'options': {'mode': 'view'}}},
             });
         }
     });

+ 2 - 1
static/src/js/widgets/payments_today_counters.js

@@ -166,10 +166,11 @@ function payments_today_counters (widget) {
                 name:"Listado de pagos realizados hoy",
                 type: 'ir.actions.act_window',
                 res_model: "account.voucher",
-                views: [[false, 'list']],
+                views: [[false, 'list'],[false, 'form']],
                 target: 'new',
                 domain: [['state', '=', 'posted'], ['type', '=', 'payment'], ['date', '=', hoy]],
                 context: {},
+                flags: {'form': {'action_buttons': false, 'options': {'mode': 'view'}}},
             });
         }
     });

+ 3 - 2
static/src/js/widgets/ranking_sales_partner.js

@@ -178,7 +178,7 @@ function ranking_sales_partner (widget) {
             //     }
             // });
         },
-
+        // llamar a la lista 
         showCustomers: function (e) {
             var self = this;
             var hoy =moment().format('YYYY-MM-DD');
@@ -189,10 +189,11 @@ function ranking_sales_partner (widget) {
                 name:"Listado de clinete con más compras",
                 type: 'ir.actions.act_window',
                 res_model: "res.partner",
-                views: [[false, 'list']],
+                views: [[false,'list'],[false,'form']],
                 target: 'new',
                 domain: [['id', 'in', partner_id]],
                 context: {},
+                flags: {'form': {'action_buttons': false, 'options': {'mode': 'view'}}},
             });
         }
     });

+ 2 - 1
static/src/js/widgets/ranking_sales_product.js

@@ -194,10 +194,11 @@ function ranking_sales_product (widget) {
                 name:"Listado de productos más vendidos",
                 type: 'ir.actions.act_window',
                 res_model: "product.product",
-                views: [[false, 'list']],
+                views: [[false, 'list'],[false,'form']],
                 target: 'new',
                 domain: [['id', 'in', product_id],['type','=', 'product']],
                 context: {},
+                flags: {'form': {'action_buttons': false, 'options': {'mode': 'view'}}},
             });
         }
     });

+ 2 - 1
static/src/js/widgets/voucher_today_counters.js

@@ -166,10 +166,11 @@ function voucher_today_counters (widget) {
                 name:"Listado de cobros realizado en el día",
                 type: 'ir.actions.act_window',
                 res_model: "account.voucher",
-                views: [[false, 'list']],
+                views: [[false, 'list'],[false,'form']],
                 target: 'new',
                 domain: [['state', '=', 'posted'], ['type', '=', 'receipt'], ['date', '=', hoy]],
                 context: {},
+                flags: {'form': {'action_buttons': false, 'options': {'mode': 'view'}}},
             });
         }
     });

+ 4 - 4
views/menus.xml

@@ -3,10 +3,10 @@
     <data>
         <menuitem id="eiru_dashboard_menu" name="Inicio" sequence="0"/>
         <!-- Principal -->
-        <menuitem id="eiru_dashboard_main" name="Principal" parent="eiru_dashboard_menu" />
-        <menuitem id="eiru_dashboard_dashboard" name="Mi tablero" parent="eiru_dashboard_main" action="eiru_dashboard_action" sequence="1"/>
-        <menuitem id="eiru_dashboard_sale" name="Nueva Venta" parent="eiru_dashboard_main" action="eiru_dashboard_sale_action" sequence="2"/>
-        <menuitem id="eiru_dashboard_reports" name="Reportes" parent="eiru_dashboard_main" action="eiru_dashboard_report_action" sequence="3"/>
+        <menuitem id="eiru_dashboard_main" name="Principal" parent="eiru_dashboard_menu" sequence="1"/>
+        <menuitem id="eiru_dashboard_dashboard" name="Mi tablero" parent="eiru_dashboard_main" action="eiru_dashboard_action" sequence="2"/>
+        <menuitem id="eiru_dashboard_sale" name="Nueva Venta" parent="eiru_dashboard_main" action="eiru_dashboard_sale_action" sequence="3"/>
+        <menuitem id="eiru_dashboard_reports" name="Reportes" parent="eiru_dashboard_main" action="eiru_dashboard_report_action" sequence="4"/>
         <!-- Pgaos de Cliente -->
         <menuitem id="eiru_dashboard_pagos_cliente" name="Pagos" parent="eiru_dashboard_menu" sequence="10"/>
         <menuitem id="eiru_dashboard_voucher_posted" name="Pagos de Clientes" parent="eiru_dashboard_pagos_cliente" action="eiru_dashboard_voucher_posted_action" sequence="11"/>

+ 2 - 2
views/products.xml

@@ -7,11 +7,11 @@
             <field name="arch" type="xml">
                 <tree string="Productos">
                     <field name="name"/>
-                    <field name="attribute_value_ids" widget="many2many_tags"/>
+                    <!-- <field name="attribute_value_ids" widget="many2many_tags"/>
 					<field name="lst_price"/>
 					<field name="qty_available"/>
 					<field name="categ_id"/>
-					<field name="ean13"/>
+					<field name="ean13"/> -->
                     <!-- <field name="list_price"/> -->
 				  	<!-- <field name="type"/> -->
 				  	<!-- <field name="state"/> -->