diff --git a/pos_second_header/__init__.py b/pos_second_header/__init__.py new file mode 100644 index 00000000..2af95374 --- /dev/null +++ b/pos_second_header/__init__.py @@ -0,0 +1,21 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Point Of Sale - Second Header module for OpenERP +# Copyright (C) 2013-2014 GRAP (http://www.grap.coop) +# @author Sylvain LE GAL (https://twitter.com/legalsylvain) +# +# 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 . +# +############################################################################## diff --git a/pos_second_header/__openerp__.py b/pos_second_header/__openerp__.py new file mode 100644 index 00000000..e866cefd --- /dev/null +++ b/pos_second_header/__openerp__.py @@ -0,0 +1,58 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Point Of Sale - Second Header module for OpenERP +# Copyright (C) 2014 GRAP (http://www.grap.coop) +# @author Sylvain LE GAL (https://twitter.com/legalsylvain) +# +# 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 . +# +############################################################################## + +{ + 'name': 'Point Of Sale - Second Header', + 'summary': 'Add a second header in the Point Of Sale (front-end)', + 'version': '0.1', + 'category': 'sale', + 'description': """ +Add a second header in the Point Of Sale (front-end) +==================================================== + +Functionality: +-------------- + * Add a second banner in the point of sale page under the the first one,""" + """dedicated to extra-information of the current pos order; + +Copyright, Authors and Licence: +------------------------------- + * Copyright: 2014, GRAP: Groupement Régional Alimentaire de Proximité; + * Author: + * Sylvain LE GAL (https://twitter.com/legalsylvain); + * Licence: AGPL-3 (http://www.gnu.org/licenses/);""", + 'author': 'GRAP', + 'website': 'http://www.grap.coop', + 'license': 'AGPL-3', + 'depends': [ + 'point_of_sale', + ], + 'qweb': [ + 'static/src/xml/psh.xml', + ], + 'js': [ + 'static/src/js/psh.js', + ], + 'css': [ + 'static/src/css/psh.css', + ], +} diff --git a/pos_second_header/static/src/css/psh.css b/pos_second_header/static/src/css/psh.css new file mode 100644 index 00000000..0b2b26ce --- /dev/null +++ b/pos_second_header/static/src/css/psh.css @@ -0,0 +1,59 @@ +/****************************************************************************** + Point Of Sale - Second Header module for OpenERP + Copyright (C) 2014 GRAP (http://www.grap.coop) + @author Sylvain LE GAL (https://twitter.com/legalsylvain) + + 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 . +******************************************************************************/ + +/* + Overload: default display of point of sale +*/ +.point-of-sale #topheader { + height: 65px; +} + +.point-of-sale #content { + top: 65px; +} + +/* + Define: PosOrderHeaderWidget CSS +*/ +.point-of-sale #topheader #rightheader #pos_order_header{ + height: 32px; + border-top: 1px solid #373737; +} + +/* + Define: New class for further content +*/ +.point-of-sale #rightheader .extra-label{ + float:left; + color:#DDD; +/* border-right: 1px solid #373737;*/ + height:100%; + overflow:hidden; + text-overflow: ellipsis; + text-align:center; +} + +.point-of-sale #rightheader .extra-label .extra-text{ + font-size:15px; + font-style:italic; + position: relative; + top: 50%; + transform: translateY(-50%); + -webkit-transform: translateY(-50%); +} diff --git a/pos_second_header/static/src/img/icon.png b/pos_second_header/static/src/img/icon.png new file mode 100644 index 00000000..d649795a Binary files /dev/null and b/pos_second_header/static/src/img/icon.png differ diff --git a/pos_second_header/static/src/js/psh.js b/pos_second_header/static/src/js/psh.js new file mode 100644 index 00000000..a7ba8f4e --- /dev/null +++ b/pos_second_header/static/src/js/psh.js @@ -0,0 +1,47 @@ +/****************************************************************************** + Point Of Sale - Second Header module for OpenERP + Copyright (C) 2014 GRAP (http://www.grap.coop) + @author Sylvain LE GAL (https://twitter.com/legalsylvain) + + 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 . +******************************************************************************/ + +openerp.pos_second_header = function (instance) { + module = instance.point_of_sale; + + /* + Define : PosOrderHeaderWidget to allow possibility to include inside + some extra informations. + */ + module.PosOrderHeaderWidget = module.PosBaseWidget.extend({ + template: 'PosOrderHeaderWidget', + + init: function(parent, options){ + this._super(parent,options); + }, + }); + + /* + Overload : PosWidget to include PosOrderHeaderWidget inside. + */ + module.PosWidget = module.PosWidget.extend({ + build_widgets: function(){ + this._super(); + this.pos_order_header = new module.PosOrderHeaderWidget(this,{}); + this.pos_order_header.appendTo(this.$('#rightheader')); + + }, + }); + +}; diff --git a/pos_second_header/static/src/xml/psh.xml b/pos_second_header/static/src/xml/psh.xml new file mode 100644 index 00000000..ae4cafed --- /dev/null +++ b/pos_second_header/static/src/xml/psh.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + +
+ + +