+# -*- coding: utf-8 -*-
+##############################################################################
+#
+# POS Membership module for OpenERP, Manage membership payments from POS.
+# Copyright (C) 2013 L'Heureux Cyclage (<http://www.heureux-cyclage.org>)
+#
+# 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 <http://www.gnu.org/licenses/>.
+#
+##############################################################################
import main
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
# -*- coding: utf-8 -*-
+##############################################################################
+#
+# POS Membership module for OpenERP, Manage membership payments from POS.
+# Copyright (C) 2013 L'Heureux Cyclage (<http://www.heureux-cyclage.org>)
+#
+# 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 <http://www.gnu.org/licenses/>.
+#
+##############################################################################
import os
import openerp
@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"]
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']
return m
PointOfSaleController()
+# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: