Selaa lähdekoodia

[FIX] limpieza

Rodney Elpidio Enciso Arias 7 vuotta sitten
vanhempi
commit
619ef8c259
3 muutettua tiedostoa jossa 0 lisäystä ja 169 poistoa
  1. 0 51
      __openerp__.py~
  2. 0 90
      pos.py~
  3. 0 28
      pos_view.xml~

+ 0 - 51
__openerp__.py~

@@ -1,51 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-#    OpenERP, Open Source Management Solution
-#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
-#
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU Affero General Public License as
-#    published by the Free Software Foundation, either version 3 of the
-#    License, or (at your option) any later version.
-#
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU Affero General Public License for more details.
-#
-#    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-
-{
-    'name': 'Point of Sale Logo and Time',
-    'category': 'Point Of Sale', 
-    'version': '1.0',
-    'description': """
-Addons to Point of Sale
-========================================
-
-To add features like,
-
-To Update Point of Sale Logo from pos config
-To display Time in Point of Sale which shall be configured at Pos Config for 12/24 Hous Format
-
-    """,
-    'author': 'Murali Krishna Reddy',
-    'website': 'http://www.credativ.in',
-    'sequence':0,
-    'depends': ['base', 'web', 'point_of_sale'],
-    'images':['images/main_screenshot.png'],
-    'data': [
-        'pos_view.xml',
-    ],
-    'qweb': ['static/src/xml/*.xml'],
-    'installable': True,
-    'auto_install': False,
-    'application': False,
-}
-
-# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

+ 0 - 90
pos.py~

@@ -1,90 +0,0 @@
-# -*- coding: utf-8 -*-
-##############################################################################
-#
-#    OpenERP, Open Source Management Solution
-#    Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
-#
-#    This program is free software: you can redistribute it and/or modify
-#    it under the terms of the GNU Affero General Public License as
-#    published by the Free Software Foundation, either version 3 of the
-#    License, or (at your option) any later version.
-#
-#    This program is distributed in the hope that it will be useful,
-#    but WITHOUT ANY WARRANTY; without even the implied warranty of
-#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-#    GNU Affero General Public License for more details.
-#
-#    You should have received a copy of the GNU Affero General Public License
-#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
-#
-##############################################################################
-
-import logging
-import time
-
-from openerp import tools
-from openerp.osv import fields, osv
-from openerp.tools.translate import _
-
-import openerp.addons.decimal_precision as dp
-import openerp.addons.product.product
-import base64
-
-_logger = logging.getLogger(__name__)
-
-class pos_config(osv.osv):
-    _inherit = 'pos.config'    
-    
-    def _get_image(self, cr, uid, ids, name, args, context=None):
-        result = dict.fromkeys(ids, False)
-        for obj in self.browse(cr, uid, ids, context=context):
-            result[obj.id] = tools.image_get_resized_images(obj.image)
-        return result
-
-    def _set_image(self, cr, uid, id, name, value, args, context=None):
-        return self.write(cr, uid, [id], {'image': tools.image_resize_image_big(value)}, context=context)
-        
-
-        
-    
-    def _get_default_image(self, cr, uid, context=None):
-        image_path = openerp.modules.get_module_resource('pos_logo', 'static/src/img', 'default.png')
-        return tools.image_resize_image_big(open(image_path, 'rb').read().encode('base64'))       
-        
-        
-    _columns = {
-        'image': fields.binary("Logo",
-            		help="This field holds the image, limited to 1024x1024px."),
-	'image_medium': fields.function(_get_image, fnct_inv=_set_image,
-            	string="Medium-sized photo", type="binary", multi="_get_image",
-            	     store = {
-                	'pos.config': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10),
-            	},
-            	     help="Medium-sized photo of the student. It is automatically "\
-                 "resized as a 128x128px image, with aspect ratio preserved. "\
-                 "Use this field in form views or some kanban views."),
-	'image_small': fields.function(_get_image, fnct_inv=_set_image,
-		    string="Small-sized photo", type="binary", multi="_get_image",
-		    store = {
-		        'pos.config': (lambda self, cr, uid, ids, c={}: ids, ['image'], 10),
-		    },
-		    help="Small-sized photo of the employee. It is automatically "\
-		         "resized as a 64x64px image, with aspect ratio preserved. "\
-		         "Use this field anywhere a small image is required."),
-        'time_format':fields.selection([('12','12 Hours Format'),('24','24 Hours Format')],'Time Format'),
-    }
-    _defaults={
-        'image_medium':_get_default_image,
-        'time_format':'24',
-    }
-    
-    
-    
-    
-    
-    
-    
-    
-    
-    
-

+ 0 - 28
pos_view.xml~

@@ -1,28 +0,0 @@
-<?xml version="1.0"?>
-<openerp>
-    <data>
-        
-        <record model="ir.ui.view" id="view_pos_config_form_inh_poslogo">
-            <field name="name">pos.config.form.view.inh.poslogo</field>
-            <field name="model">pos.config</field>
-	    <field name="inherit_id" ref="point_of_sale.view_pos_config_form"/>
-            <field name="arch" type="xml">
-                <label for="name" position="before">
-                    <group>
-			<field name="image_medium" widget='image' class="oe_left oe_avatar" nolabel="1"/>
-		    </group>
-                </label>
-                <field name="iface_invoicing" position="after">
-		    <field name="time_format" required="1"/>
-                </field>
-	    </field>
-	</record>
-	
-	<template id="pos_logo_extend" name="pos_logo" inherit_id="web.assets_backend">
-            <xpath expr="." position="inside">
-                <script type="text/javascript" src="/pos_logo/static/src/js/pos_logo.js"></script>               
-            </xpath>
-        </template>
-
-    </data>
-</openerp>