From f79e0489efc827e5a6b78c838d42ba5214fb6d71 Mon Sep 17 00:00:00 2001 From: Ludovic CHEVALIER Date: Thu, 3 Oct 2013 11:18:24 +0200 Subject: [PATCH] [module] ~copyright everywhere --- controllers/__init__.py | 23 +++++++++++++++++++++++ controllers/main.py | 30 ++++++++++++++++++++++++++---- 2 files changed, 49 insertions(+), 4 deletions(-) diff --git a/controllers/__init__.py b/controllers/__init__.py index 8ee9bae..8157c29 100644 --- a/controllers/__init__.py +++ b/controllers/__init__.py @@ -1 +1,24 @@ +# -*- 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. +# +# ReMembership 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 main +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/controllers/main.py b/controllers/main.py index 7b2cdb2..494c8a4 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. +# +# ReMembership 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: -- 2.20.1