Browse Source
[ADD] 7.0 'pos_second_header' new module to have an extra header in Point Of Sale Front End View
pull/2/head
[ADD] 7.0 'pos_second_header' new module to have an extra header in Point Of Sale Front End View
pull/2/head
Sylvain LE GAL
10 years ago
6 changed files with 211 additions and 0 deletions
-
21pos_second_header/__init__.py
-
58pos_second_header/__openerp__.py
-
59pos_second_header/static/src/css/psh.css
-
BINpos_second_header/static/src/img/icon.png
-
47pos_second_header/static/src/js/psh.js
-
26pos_second_header/static/src/xml/psh.xml
@ -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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
@ -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 <http://www.gnu.org/licenses/>. |
||||
|
# |
||||
|
############################################################################## |
||||
|
|
||||
|
{ |
||||
|
'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', |
||||
|
], |
||||
|
} |
@ -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 <http://www.gnu.org/licenses/>. |
||||
|
******************************************************************************/ |
||||
|
|
||||
|
/* |
||||
|
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%); |
||||
|
} |
After Width: 64 | Height: 64 | Size: 4.9 KiB |
@ -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 <http://www.gnu.org/licenses/>.
|
||||
|
******************************************************************************/ |
||||
|
|
||||
|
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')); |
||||
|
|
||||
|
}, |
||||
|
}); |
||||
|
|
||||
|
}; |
@ -0,0 +1,26 @@ |
|||||
|
<?xml version="1.0" 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 <http://www.gnu.org/licenses/>. --> |
||||
|
<!-- ********************************************************************** --> |
||||
|
<templates id="template" xml:space="preserve"> |
||||
|
|
||||
|
<t t-name="PosOrderHeaderWidget"> |
||||
|
<div id="pos_order_header" /> |
||||
|
</t> |
||||
|
|
||||
|
</templates> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue