Adrielso 7 년 전
부모
커밋
16f51d8e92
8개의 변경된 파일12개의 추가작업 그리고 240개의 파일을 삭제
  1. 0 145
      static/src/css/sale.css
  2. 0 6
      static/src/js/main.js
  3. 0 36
      static/src/js/sale.js
  4. 0 2
      static/src/js/widgets/expired_account_counters.js
  5. 0 40
      static/src/xml/sale.xml
  6. 0 2
      templates.xml
  7. 8 5
      views/actions.xml
  8. 4 4
      views/menus.xml

+ 0 - 145
static/src/css/sale.css

@@ -1,145 +0,0 @@
-.dashboard-sale-wrapper {
-    width: 100%;
-    height: 100%;
-    padding: 45px;
-    background: url(/web/static/src/img/form_sheetbg.png);
-}
-
-.dashboard-sale {
-    width: 100%;
-    height: 100%;
-    background: #f5f5f5;
-    box-shadow: 2px 2px 4px #d3d3d3, -2px -2px 4px #d3d3d3;
-    display: flex;
-}
-
-.dashboard-sale-actions {
-    width: 350px;
-    height: 100%;
-    display: flex;
-    flex-direction: column;
-}
-
-.dashboard-sale-buttons {
-    flex-grow: 1;
-    display: flex;
-    flex-direction: column;
-    align-items: center;
-    justify-content: center;
-}
-
-.dashboard-sale-buttons div {
-    width: 80px;
-    height: 80px;
-    margin: 10px 92px;
-    padding: 15px;
-    border-radius: 10% 50%;
-    background: #7c7bad;
-    display: flex;
-}
-
-.dashboard-sale-buttons div  i {
-    margin: auto;
-    font-size: 18pt;
-    color: #fff;
-}
-
-.dashboard-sale-buttons div::before {
-    content: "";
-    width: 0;
-    height: 40px;
-    border-radius: 0 5px 5px 0;
-    position: absolute;
-    margin-top: 5px;
-    margin-left: 55px;
-    text-align: center;
-    line-height: 38px;
-    font-size: 13px;
-    font-weight: bold;
-    color: #fff;
-    background: #7c7bad;
-    transition-duration: 0.2s;
-}
-
-.dashboard-sale-buttons div:hover {
-    cursor: pointer;
-    -webkit-cursor: pointer;
-    -moz-cursor: pointer;
-}
-
-.dashboard-sale-buttons .new-sale:hover::before {
-    content: "Nueva Venta";
-    width: 120px;
-}
-
-.dashboard-sale-buttons .new-budget:hover::before {
-    content: "Nuevo Presupuesto";
-    width: 150px;
-}
-
-.dashboard-sale-actions img {
-    width: 180px;
-    height: 180px;
-    margin: auto;
-    filter: hue-rotate(45deg);
-    animation: 3s handshaking 1;
-}
-
-.dashboard-sale-welcome {
-    width: 100%;
-    height: 100%;
-    padding-left: 65px;
-}
-
-.dashboard-sale-welcome h2 {
-    margin-top: 75px;
-    margin-bottom: 35px;
-    font-family: sans-serif;
-    font-size: 32pt;
-    color: #616161;
-}
-
-.dashboard-sale-welcome div {
-    width: calc(100% - 45px);
-    height: calc(100% - 200px);
-    background: #eeeeee;
-    box-shadow: inset 1px 1px 2px #d3d3d3, inset -1px -1px 2px #d3d3d3;
-    border-radius: 4px;
-    display: flex;
-    align-items: center;
-    justify-content: center;
-}
-
-.dashboard-sale-welcome div ul {
-    margin: 0;
-    padding: 0;
-    list-style-type: none;
-    font-family: sans-serif;
-    font-size: 14pt;
-    color: #757575;
-}
-
-.dashboard-sale-welcome div ul li {
-    margin: 10px 0;
-}
-
-.dashboard-sale-welcome div ul li i {
-    margin-right: 15px;
-    font-size: 16pt;
-    color: #7c7bad;
-}
-
-@keyframes handshaking {
-    0% {
-        transform: scale(1);
-    }
-    25% {
-        transform: scale(1.15);
-    }
-    50% {
-        transform: scale(1);
-    }
-    75% {
-        transform: scale(1.15);
-    }
-}

+ 0 - 6
static/src/js/main.js

@@ -8,9 +8,7 @@ openerp.eiru_dashboard = function (instance) {
 
     widget_base(instance, dashboard);
     dashboard_widget(instance, dashboard);
-    sale_widget(instance, dashboard)
     configuration_widget(instance, dashboard);
-
     // Widgets
     expired_account_counters(dashboard);
     expired_account_counters_now(dashboard);
@@ -22,10 +20,6 @@ openerp.eiru_dashboard = function (instance) {
     monthly_purchases(dashboard);
     missing_product(dashboard);
     payments_today_counters(dashboard);
-    // customer_counter(dashboard);
-    // sales_in_the_week(dashboard);
-    // top_sales_product(dashboard);
-    // sales_in_warehouse_by_brand(dashboard);
 
     // Action
     instance.web.client_actions.add('eiru_dashboard.action_dashboard', 'instance.eiru_dashboard.DashboardWidget');

+ 0 - 36
static/src/js/sale.js

@@ -1,36 +0,0 @@
-function sale_widget(instance, widget) {
-    "use strict";
-
-    var QWeb = instance.web.qweb;
-
-    widget.SaleWidget = instance.Widget.extend({
-        template: 'WidgetSaleTmpl',
-        events: {
-            'click .new-sale': 'newSale',
-            'click .new-budget': 'newBudget'
-        },
-        init: function (parent) {
-            this._super(parent)
-        },
-        start: function () {
-        },
-        newSale: function (e) {
-            this.do_action({
-                type: 'ir.actions.act_window',
-                res_model: 'sale.order',
-                views: [[false, 'form']],
-                target: 'current',
-                context: {}
-            });
-        },
-        newBudget: function (e) {
-            this.do_action({
-                type: 'ir.actions.act_window',
-                res_model: 'sale.order',
-                views: [[false, 'form']],
-                target: 'current',
-                context: {}
-            });
-        }
-    })
-}

+ 0 - 2
static/src/js/widgets/expired_account_counters.js

@@ -121,8 +121,6 @@ function expired_account_counters (widget) {
                 type: 'ir.actions.act_window',
                 res_model: "res.partner",
                 views: [[false, 'list']],
-                // views: [[false,'form']],
-                // view_mode: ['form,tree'],
                 target: 'new',
                 domain: [['unreconciled_aml_ids', '=', move_id]],
                 context: {},

+ 0 - 40
static/src/xml/sale.xml

@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<template xml:space="preserve">
-    <t t-name="WidgetSaleTmpl">
-        <div class="dashboard-sale-wrapper">
-            <div class="dashboard-sale">
-                <div class="dashboard-sale-actions">
-                    <img src="/eiru_dashboard/static/img/handshake.png" />
-                    <div class="dashboard-sale-buttons">
-                        <div class="new-sale">
-                            <i class="fa fa-shopping-cart"></i>
-                        </div>
-                        <div class="new-budget">
-                            <i class="fa fa-calculator"></i>
-                        </div>
-                    </div>
-                </div>
-                <div class="dashboard-sale-welcome">
-                    <h2>Ventas y Presupuestos</h2>
-                    <div>
-                        <ul>
-                            <li>
-                                <i class="fa fa-check-square-o"></i>
-                                Realice ventas controlando sus productos sin preocupaciones.
-                            </li>
-                            <li>
-                                <i class="fa fa-check-square-o"></i>
-                                Cree presupuestos a sus clientes de manera fácil y rápida.
-                            </li>
-                            <li>
-                                <i class="fa fa-check-square-o"></i>
-                                Emita facturas directamente desde la comodidad de su sistema.
-                            </li>
-                        </ul>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </t>
-</template>

+ 0 - 2
templates.xml

@@ -6,7 +6,6 @@
             <xpath expr="." position="inside">
                 <!-- Dashboard Style -->
                 <link rel="stylesheet" href="/eiru_dashboard/static/src/css/dashboard.css" />
-                <link rel="stylesheet" href="/eiru_dashboard/static/src/css/sale.css" />
                 <link rel="stylesheet" href="/eiru_dashboard/static/src/css/configuration.css" />
 
                 <!-- Dashboard Widget Base -->
@@ -26,7 +25,6 @@
 
                 <!-- Dashboard Main  -->
                 <script type="text/javascript" src="/eiru_dashboard/static/src/js/dashboard.js" />
-                <script type="text/javascript" src="/eiru_dashboard/static/src/js/sale.js" />
                 <script type="text/javascript" src="/eiru_dashboard/static/src/js/configuration.js" />
                 <script type="text/javascript" src="/eiru_dashboard/static/src/js/main.js" />
 

+ 8 - 5
views/actions.xml

@@ -6,9 +6,12 @@
             <field name="tag">eiru_dashboard.action_dashboard</field>
         </record>
 
-        <record id="eiru_dashboard_sale_action" model="ir.actions.client">
+        <record id="eiru_dashboard_sale_action" model="ir.actions.act_window">
             <field name="name">Ventas y Presupuestos</field>
-            <field name="tag">eiru_dashboard.action_dashboard_sale</field>
+			<field name="res_model">sale.order</field>
+            <field name="view_type">form</field>
+            <field name="view_mode">form</field>
+            <field name="target">current</field>
         </record>
 
         <record id="eiru_dashboard_report_action" model="ir.actions.client">
@@ -52,13 +55,13 @@
             <field name="domain">[('type','=','receipt'),('state', '=', 'posted')]</field>
         </record>
 		<!-- Pagos de cliente Borrador -->
-        <record id="eiru_dashboard_voucher_draft_action" model="ir.actions.act_window">
-            <field name="name">Pagos de cliente</field>
+        <record id="eiru_dashboard_voucher_payment_action" model="ir.actions.act_window">
+            <field name="name">Pagos a Proveedores</field>
             <field name="res_model">account.voucher</field>
             <field name="view_type">form</field>
             <field name="view_mode">tree,form</field>
             <field name="target">current</field>
-            <field name="domain">[('type','=','receipt'),('state', '=', 'draft')]</field>
+            <field name="domain">[('type','=','payment'),('state', '=', 'posted')]</field>
         </record>
 
         <record id="action_dashboard_configuration" model="ir.actions.client">

+ 4 - 4
views/menus.xml

@@ -5,12 +5,12 @@
         <!-- 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="Ventas y Presupuestos" parent="eiru_dashboard_main" action="eiru_dashboard_sale_action" sequence="2"/>
+        <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"/>
         <!-- Pgaos de Cliente -->
-        <menuitem id="eiru_dashboard_pagos_cliente" name="Pagos de Cliente" parent="eiru_dashboard_menu" sequence="10"/>
-        <menuitem id="eiru_dashboard_voucher_posted" name="Pagos Fijado" parent="eiru_dashboard_pagos_cliente" action="eiru_dashboard_voucher_posted_action" sequence="11"/>
-        <menuitem id="eiru_dashboard_voucher_draf" name="Pagos en Borrador" parent="eiru_dashboard_pagos_cliente" action="eiru_dashboard_voucher_draft_action" sequence="12"/>
+        <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"/>
+        <menuitem id="eiru_dashboard_voucher_draf" name="Pagos a Proveedores" parent="eiru_dashboard_pagos_cliente" action="eiru_dashboard_voucher_payment_action" sequence="12"/>
         <!-- otros  -->
         <menuitem id="eiru_dashboard_others" name="Otros" parent="eiru_dashboard_menu" sequence="30" />
         <menuitem id="eiru_dashboard_customers" name="Mis Clientes" parent="eiru_dashboard_others" action="eiru_dashboard_customers_action" sequence="31"/>