Merge lp:~sylvain-legal/openerp-pos/7.0_pos_second_header into lp:openerp-pos

Proposed by Sylvain LE GAL (GRAP)
Status: Needs review
Proposed branch: lp:~sylvain-legal/openerp-pos/7.0_pos_second_header
Merge into: lp:openerp-pos
Diff against target: 244 lines (+211/-0)
5 files modified
pos_second_header/__init__.py (+21/-0)
pos_second_header/__openerp__.py (+58/-0)
pos_second_header/static/src/css/psh.css (+59/-0)
pos_second_header/static/src/js/psh.js (+47/-0)
pos_second_header/static/src/xml/psh.xml (+26/-0)
To merge this branch: bzr merge lp:~sylvain-legal/openerp-pos/7.0_pos_second_header
Reviewer Review Type Date Requested Status
Pedro Manuel Baeza code review Approve
Cristian Salamea (community) Approve
Review via email: mp+228820@code.launchpad.net

Commit message

[ADD] Add new module to display a second header in Point Of Sale

Description of the change

new module "pos_second_header" that add a second toolbar in the point of sale module (front-end).
This module is useless alone, but some modules depend on it. (pos_restaurant, pos_select_customer, etc.)

Flake8: OK.

Thanks for your reviews.

To post a comment you must log in.
Revision history for this message
Cristian Salamea (ovnicraft) wrote :

I dont know if its necessary license header at XML template.

LGTM

review: Approve
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Hi, Sylvain, thanks for the module. You have to put files inside a directory called 'pos_second_header' or something similar, but the rest LGTM.

review: Needs Fixing (code review)
Revision history for this message
Sylvain LE GAL (GRAP) (sylvain-legal) wrote :

> Hi, Sylvain, thanks for the module. You have to put files inside a directory
> called 'pos_second_header' or something similar, but the rest LGTM.

Hi thanks for the review. Sorry i'll change that when i'll go back from hollidays.
Regards.

Revision history for this message
Sylvain LE GAL (GRAP) (sylvain-legal) wrote :

> I dont know if its necessary license header at XML template.
>
> LGTM
Hi. Thanks for the review. My PoV is that code is python file + xml + css + js files. So i put licences in all filds basically.
Regards.

3. By Sylvain LE GAL (GRAP)

[FIX] 'pos_second_header'. Add folder of the module and move files into.

Revision history for this message
Sylvain LE GAL (GRAP) (sylvain-legal) wrote :

Hi Pedro,

I did the change. Are you ok with the new Merge Proposal ?

Regards.

Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Yeah, sure!

review: Approve (code review)
Revision history for this message
Sylvain LE GAL (GRAP) (sylvain-legal) wrote :

Project has moved into github.
https://github.com/odoo-pos/odoo-pos/tree/7.0

review: Disapprove (obsolete)

Unmerged revisions

3. By Sylvain LE GAL (GRAP)

[FIX] 'pos_second_header'. Add folder of the module and move files into.

2. By Sylvain LE GAL (GRAP)

[REF] Change some descriptions.

1. By Sylvain LE GAL (GRAP)

[ADD] Add new module to display a second header in Point Of Sale

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'pos_second_header'
2=== added file 'pos_second_header/__init__.py'
3--- pos_second_header/__init__.py 1970-01-01 00:00:00 +0000
4+++ pos_second_header/__init__.py 2014-09-11 15:07:38 +0000
5@@ -0,0 +1,21 @@
6+# -*- encoding: utf-8 -*-
7+##############################################################################
8+#
9+# Point Of Sale - Second Header module for OpenERP
10+# Copyright (C) 2013-2014 GRAP (http://www.grap.coop)
11+# @author Sylvain LE GAL (https://twitter.com/legalsylvain)
12+#
13+# This program is free software: you can redistribute it and/or modify
14+# it under the terms of the GNU Affero General Public License as
15+# published by the Free Software Foundation, either version 3 of the
16+# License, or (at your option) any later version.
17+#
18+# This program is distributed in the hope that it will be useful,
19+# but WITHOUT ANY WARRANTY; without even the implied warranty of
20+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21+# GNU Affero General Public License for more details.
22+#
23+# You should have received a copy of the GNU Affero General Public License
24+# along with this program. If not, see <http://www.gnu.org/licenses/>.
25+#
26+##############################################################################
27
28=== added file 'pos_second_header/__openerp__.py'
29--- pos_second_header/__openerp__.py 1970-01-01 00:00:00 +0000
30+++ pos_second_header/__openerp__.py 2014-09-11 15:07:38 +0000
31@@ -0,0 +1,58 @@
32+# -*- encoding: utf-8 -*-
33+##############################################################################
34+#
35+# Point Of Sale - Second Header module for OpenERP
36+# Copyright (C) 2014 GRAP (http://www.grap.coop)
37+# @author Sylvain LE GAL (https://twitter.com/legalsylvain)
38+#
39+# This program is free software: you can redistribute it and/or modify
40+# it under the terms of the GNU Affero General Public License as
41+# published by the Free Software Foundation, either version 3 of the
42+# License, or (at your option) any later version.
43+#
44+# This program is distributed in the hope that it will be useful,
45+# but WITHOUT ANY WARRANTY; without even the implied warranty of
46+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
47+# GNU Affero General Public License for more details.
48+#
49+# You should have received a copy of the GNU Affero General Public License
50+# along with this program. If not, see <http://www.gnu.org/licenses/>.
51+#
52+##############################################################################
53+
54+{
55+ 'name': 'Point Of Sale - Second Header',
56+ 'summary': 'Add a second header in the Point Of Sale (front-end)',
57+ 'version': '0.1',
58+ 'category': 'sale',
59+ 'description': """
60+Add a second header in the Point Of Sale (front-end)
61+====================================================
62+
63+Functionality:
64+--------------
65+ * Add a second banner in the point of sale page under the the first one,"""
66+ """dedicated to extra-information of the current pos order;
67+
68+Copyright, Authors and Licence:
69+-------------------------------
70+ * Copyright: 2014, GRAP: Groupement Régional Alimentaire de Proximité;
71+ * Author:
72+ * Sylvain LE GAL (https://twitter.com/legalsylvain);
73+ * Licence: AGPL-3 (http://www.gnu.org/licenses/);""",
74+ 'author': 'GRAP',
75+ 'website': 'http://www.grap.coop',
76+ 'license': 'AGPL-3',
77+ 'depends': [
78+ 'point_of_sale',
79+ ],
80+ 'qweb': [
81+ 'static/src/xml/psh.xml',
82+ ],
83+ 'js': [
84+ 'static/src/js/psh.js',
85+ ],
86+ 'css': [
87+ 'static/src/css/psh.css',
88+ ],
89+}
90
91=== added directory 'pos_second_header/static'
92=== added directory 'pos_second_header/static/src'
93=== added directory 'pos_second_header/static/src/css'
94=== added file 'pos_second_header/static/src/css/psh.css'
95--- pos_second_header/static/src/css/psh.css 1970-01-01 00:00:00 +0000
96+++ pos_second_header/static/src/css/psh.css 2014-09-11 15:07:38 +0000
97@@ -0,0 +1,59 @@
98+/******************************************************************************
99+ Point Of Sale - Second Header module for OpenERP
100+ Copyright (C) 2014 GRAP (http://www.grap.coop)
101+ @author Sylvain LE GAL (https://twitter.com/legalsylvain)
102+
103+ This program is free software: you can redistribute it and/or modify
104+ it under the terms of the GNU Affero General Public License as
105+ published by the Free Software Foundation, either version 3 of the
106+ License, or (at your option) any later version.
107+
108+ This program is distributed in the hope that it will be useful,
109+ but WITHOUT ANY WARRANTY; without even the implied warranty of
110+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
111+ GNU Affero General Public License for more details.
112+
113+ You should have received a copy of the GNU Affero General Public License
114+ along with this program. If not, see <http://www.gnu.org/licenses/>.
115+******************************************************************************/
116+
117+/*
118+ Overload: default display of point of sale
119+*/
120+.point-of-sale #topheader {
121+ height: 65px;
122+}
123+
124+.point-of-sale #content {
125+ top: 65px;
126+}
127+
128+/*
129+ Define: PosOrderHeaderWidget CSS
130+*/
131+.point-of-sale #topheader #rightheader #pos_order_header{
132+ height: 32px;
133+ border-top: 1px solid #373737;
134+}
135+
136+/*
137+ Define: New class for further content
138+*/
139+.point-of-sale #rightheader .extra-label{
140+ float:left;
141+ color:#DDD;
142+/* border-right: 1px solid #373737;*/
143+ height:100%;
144+ overflow:hidden;
145+ text-overflow: ellipsis;
146+ text-align:center;
147+}
148+
149+.point-of-sale #rightheader .extra-label .extra-text{
150+ font-size:15px;
151+ font-style:italic;
152+ position: relative;
153+ top: 50%;
154+ transform: translateY(-50%);
155+ -webkit-transform: translateY(-50%);
156+}
157
158=== added directory 'pos_second_header/static/src/img'
159=== added file 'pos_second_header/static/src/img/icon.png'
160Binary files pos_second_header/static/src/img/icon.png 1970-01-01 00:00:00 +0000 and pos_second_header/static/src/img/icon.png 2014-09-11 15:07:38 +0000 differ
161=== added directory 'pos_second_header/static/src/js'
162=== added file 'pos_second_header/static/src/js/psh.js'
163--- pos_second_header/static/src/js/psh.js 1970-01-01 00:00:00 +0000
164+++ pos_second_header/static/src/js/psh.js 2014-09-11 15:07:38 +0000
165@@ -0,0 +1,47 @@
166+/******************************************************************************
167+ Point Of Sale - Second Header module for OpenERP
168+ Copyright (C) 2014 GRAP (http://www.grap.coop)
169+ @author Sylvain LE GAL (https://twitter.com/legalsylvain)
170+
171+ This program is free software: you can redistribute it and/or modify
172+ it under the terms of the GNU Affero General Public License as
173+ published by the Free Software Foundation, either version 3 of the
174+ License, or (at your option) any later version.
175+
176+ This program is distributed in the hope that it will be useful,
177+ but WITHOUT ANY WARRANTY; without even the implied warranty of
178+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
179+ GNU Affero General Public License for more details.
180+
181+ You should have received a copy of the GNU Affero General Public License
182+ along with this program. If not, see <http://www.gnu.org/licenses/>.
183+******************************************************************************/
184+
185+openerp.pos_second_header = function (instance) {
186+ module = instance.point_of_sale;
187+
188+ /*
189+ Define : PosOrderHeaderWidget to allow possibility to include inside
190+ some extra informations.
191+ */
192+ module.PosOrderHeaderWidget = module.PosBaseWidget.extend({
193+ template: 'PosOrderHeaderWidget',
194+
195+ init: function(parent, options){
196+ this._super(parent,options);
197+ },
198+ });
199+
200+ /*
201+ Overload : PosWidget to include PosOrderHeaderWidget inside.
202+ */
203+ module.PosWidget = module.PosWidget.extend({
204+ build_widgets: function(){
205+ this._super();
206+ this.pos_order_header = new module.PosOrderHeaderWidget(this,{});
207+ this.pos_order_header.appendTo(this.$('#rightheader'));
208+
209+ },
210+ });
211+
212+};
213
214=== added directory 'pos_second_header/static/src/xml'
215=== added file 'pos_second_header/static/src/xml/psh.xml'
216--- pos_second_header/static/src/xml/psh.xml 1970-01-01 00:00:00 +0000
217+++ pos_second_header/static/src/xml/psh.xml 2014-09-11 15:07:38 +0000
218@@ -0,0 +1,26 @@
219+<?xml version="1.0" encoding="UTF-8"?>
220+<!-- ********************************************************************** -->
221+<!--Point Of Sale - Second Header module for OpenERP -->
222+<!--Copyright (C) 2014 GRAP (http://www.grap.coop) -->
223+<!--@author Sylvain LE GAL (https://twitter.com/legalsylvain) -->
224+
225+<!--This program is free software: you can redistribute it and/or modify -->
226+<!--it under the terms of the GNU Affero General Public License as -->
227+<!--published by the Free Software Foundation, either version 3 of the -->
228+<!--License, or (at your option) any later version. -->
229+
230+<!--This program is distributed in the hope that it will be useful, -->
231+<!--but WITHOUT ANY WARRANTY; without even the implied warranty of -->
232+<!--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -->
233+<!--GNU Affero General Public License for more details. -->
234+
235+<!--You should have received a copy of the GNU Affero General Public License-->
236+<!--along with this program. If not, see <http://www.gnu.org/licenses/>. -->
237+<!-- ********************************************************************** -->
238+<templates id="template" xml:space="preserve">
239+
240+ <t t-name="PosOrderHeaderWidget">
241+ <div id="pos_order_header" />
242+ </t>
243+
244+</templates>

Subscribers

People subscribed via source and target branches