X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=controllers%2Fmain.py;h=f717f817105e01f282704a5aa433d077a2711435;hb=1b8764756f6ce4aca752fe7bc933e5a5ab6c2d0a;hp=7b2cdb2a37cb4fec158c921c523a931473c51d37;hpb=4aab88f5f023e35aaafc6fe5e80b9e7b3f2db5dd;p=burette%2Fpos_membership.git diff --git a/controllers/main.py b/controllers/main.py index 7b2cdb2..f717f81 100644 --- a/controllers/main.py +++ b/controllers/main.py @@ -1,4 +1,25 @@ # -*- coding: utf-8 -*- +############################################################################## +# +# POS Membership module for OpenERP, Manage membership payments from POS. +# Copyright (C) 2013 L'Heureux Cyclage () +# +# This file is a part of POS Membership +# +# POS Membership is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# POS Membership 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +############################################################################## import os import openerp @@ -26,7 +47,7 @@ class PointOfSaleController(PointOfSaleController): @openerp.addons.web.http.httprequest def manifest(self, req, **kwargs): - """ This generates a HTML5 cache manifest files that preloads the categories and products thumbnails + """ This generates a HTML5 cache manifest files that preloads the categories and products thumbnails and other ressources necessary for the point of sale to work offline """ ml = ["CACHE MANIFEST"] @@ -42,19 +63,19 @@ class PointOfSaleController(PointOfSaleController): imgdir = openerp.modules.get_module_resource('point_of_sale','static/src/img'); load_css_img(imgdir,'/point_of_sale/static/src/img') - + products = req.session.model('product.product') for p in products.search_read([('pos_categ_id','!=',False)], ['name']): product_id = p['id'] url = "/web/binary/image?session_id=%s&model=product.product&field=image&id=%s" % (req.session_id, product_id) ml.append(url) - + categories = req.session.model('pos.category') for c in categories.search_read([],['name']): category_id = c['id'] url = "/web/binary/image?session_id=%s&model=pos.category&field=image&id=%s" % (req.session_id, category_id) ml.append(url) - + partners = req.session.model('res.partner') for c in partners.search_read([],['name']): partner_id = c['id'] @@ -68,3 +89,4 @@ class PointOfSaleController(PointOfSaleController): return m PointOfSaleController() +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: