From d183e079139c28fa69fb7e2d58bd455159a62480 Mon Sep 17 00:00:00 2001 From: Sylvain LE GAL Date: Wed, 2 Nov 2016 17:22:39 +0100 Subject: [PATCH 1/5] [ADD] new module pos_quick_logout (#116) --- pos_quick_logout/README.rst | 68 ++++++++++++++++++ pos_quick_logout/__init__.py | 1 + pos_quick_logout/__openerp__.py | 24 +++++++ pos_quick_logout/i18n/fr.po | 15 ++++ .../description/cashier_user_different.png | Bin 0 -> 6270 bytes .../description/cashier_user_identical.png | Bin 0 -> 5700 bytes pos_quick_logout/static/description/icon.png | Bin 0 -> 4140 bytes .../static/src/css/pos_quick_logout.css | 15 ++++ .../static/src/js/pos_quick_logout.js | 40 +++++++++++ .../static/src/xml/pos_quick_logout.xml | 18 +++++ pos_quick_logout/static/src/xml/templates.xml | 17 +++++ 11 files changed, 198 insertions(+) create mode 100644 pos_quick_logout/README.rst create mode 100644 pos_quick_logout/__init__.py create mode 100644 pos_quick_logout/__openerp__.py create mode 100644 pos_quick_logout/i18n/fr.po create mode 100644 pos_quick_logout/static/description/cashier_user_different.png create mode 100644 pos_quick_logout/static/description/cashier_user_identical.png create mode 100644 pos_quick_logout/static/description/icon.png create mode 100644 pos_quick_logout/static/src/css/pos_quick_logout.css create mode 100644 pos_quick_logout/static/src/js/pos_quick_logout.js create mode 100644 pos_quick_logout/static/src/xml/pos_quick_logout.xml create mode 100644 pos_quick_logout/static/src/xml/templates.xml diff --git a/pos_quick_logout/README.rst b/pos_quick_logout/README.rst new file mode 100644 index 00000000..9432e1bf --- /dev/null +++ b/pos_quick_logout/README.rst @@ -0,0 +1,68 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 + +================== +PoS - Quick Logout +================== + +This module was written to extend the functionality of Odoo Point Of Sale about +changing of cashier. + +This module add a simple button 'Log Out' available in Point Of Sale Front End +UI. This button is available when the cashier is not the initial user logged in +Odoo. It allows to log out quickly, wihout selecting again the user in the +list. This module is useful for users that use regularly the change of cashier, +especialy with 'pos_access_right', when users doesn't have the right to do some +actions like set discount, change unit price, ... + +Implemented Features +-------------------- + +* By default, the header is unchanged + +.. image:: /pos_quick_logout/static/description/cashier_user_identical.png + + +* If the cashier changed, and is not the user logged in Odoo, the extra button +appears + +.. image:: /pos_quick_logout/static/description/cashier_user_different.png + +Usage +===== + +.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas + :alt: Try me on Runbot + :target: https://runbot.odoo-community.org/runbot/184/9.0 + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues +`_. In case of trouble, please +check there if your issue has already been reported. If you spotted it first, +help us smashing it by providing a detailed and welcomed feedback. + +Credits +======= + +Contributors +------------ + +* Sylvain LE GAL + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/pos_quick_logout/__init__.py b/pos_quick_logout/__init__.py new file mode 100644 index 00000000..40a96afc --- /dev/null +++ b/pos_quick_logout/__init__.py @@ -0,0 +1 @@ +# -*- coding: utf-8 -*- diff --git a/pos_quick_logout/__openerp__.py b/pos_quick_logout/__openerp__.py new file mode 100644 index 00000000..9cf0d4d1 --- /dev/null +++ b/pos_quick_logout/__openerp__.py @@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2016-Today: La Louve () +# @author: Sylvain LE GAL (https://twitter.com/legalsylvain) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + + +{ + 'name': 'Point of Sale - Quick Logout', + 'version': '9.0.1.0.0', + 'category': 'Point Of Sale', + 'summary': 'Allow PoS user to logout quickly after user changed', + 'author': 'La Louve, Odoo Community Association (OCA)', + 'website': 'http://www.lalouve.net', + 'depends': [ + 'point_of_sale', + ], + 'data': [ + 'static/src/xml/templates.xml', + ], + 'qweb': [ + 'static/src/xml/pos_quick_logout.xml', + ], + 'installable': True, +} diff --git a/pos_quick_logout/i18n/fr.po b/pos_quick_logout/i18n/fr.po new file mode 100644 index 00000000..5a4dacd6 --- /dev/null +++ b/pos_quick_logout/i18n/fr.po @@ -0,0 +1,15 @@ +# Translation of Odoo Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: Odoo Server 9.0c\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2016-04-03 23:52+0000\n" +"PO-Revision-Date: 2016-04-03 23:52+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" diff --git a/pos_quick_logout/static/description/cashier_user_different.png b/pos_quick_logout/static/description/cashier_user_different.png new file mode 100644 index 0000000000000000000000000000000000000000..5c95d2745a7ea9bad10fac66b5cd4b7492f72273 GIT binary patch literal 6270 zcmXY0XH*m4(_V@Y5s@aK(t8O?Cn^F4_|v;I>0pp1gx-6Tj-g3a#02REP>A#zAwZ-P zA|PF<0@B-?-#PDm*u8sp@7$TWGjnI2O*GI`ze#hK1^|GYni{G`06-Q`8ViBQN!Qqk zKwZ*}!UwAP3kqDa(Rz6CmXL>O zjIau7LBI$%5lf*`^XZDG8qLx#@q_D^zQdTcIW-Orj$b5#dvsiV<#;<>2gBXHchApy z9^Qnp-I#HSBgyTSl~Shg{rPjT{}_c{xLFAB0S(pd_YZ|P(Og-)l3-} z(9$Z0S;Rp*xBSmS6(KdIbaZs>w+by0sv^iN-dIQ)Uo1TohztvW!;iy${Y3D;6%kx) z@)_17u?Sk!!4X091~i$$Ps!-7o!)DAE#EfK+S);;^TkfrZk9_o>_2^L>GmH>va(!$ z%GcybWiqnD3?3Q)6s}_ND5%3RMI84?h37MJeR)a0(&6esEj=_%?jfX5*C~@-`i+O3Pqq|S8{TM0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D)pSKCc#;$fm zQGoSdph6XGRaCl33lRE5fR1mi@~>uOw1}=tT&2tPM z>yEa8F5mMakBgj=_|bMRF`s{n?x^)U}g*E;f)d}m;f@u`16tZFlf|T&P*R&na zemV5)g4#2}!d|D;-^5s02hD!-BlR^HtF!}QhZF%#hZUZ$Op(|nL+0N53iWf}hlhtr zIL+uPpG8h>%bpg=gL4Atq0@bW{V$|4`z4G?Dr_9oU8GN&3MszZ`B9=m{Q62v*2Ko9 zE&L*QlCs0J22Gin=Meq<>!SFMRo|%kuuwOn?r&1_Hl|G$Os{;3Zmqox zT+%*643qcFd!f`db+SzpwI3XU^;vzGg~?SJxM_Go-W7 zt-02asT%7v&WDged1?2Bc;KdaX^?j9?Fwe_y&hE%5T#blD|^$GQEU1Ugf7GE@3Q8? z%Fn~2Y90uBW0@c2a(Hx9&+!_F)TF}2PshK4w=gbyV}y}AE&IbH*7}?$ARgT@2ei2a z+Y8IFnHvEFlm~K48^N!M@csL%lVrT1CRe2*z4Y{SbzX*dc&wJ*SH+nv?XPCQ4+7y~ zsTm20^%))v@vOHiV?QBg@3a1*xt<)$m~0+9fuK)d!1COGc{`0Q#&cu#Va3p1A^;eW z`n&P*j}@XfRLs$Lcw!}2AvNY;&d2^$m6c+7I>oNbL`iL9V`E3hQtVQmQ_>RTuwQ#O zF!bv3!d-J~a4OUalOt~V6}|vfGkmKx!**8_&b?>w zC@P-23%Dm543X54yl+Ls9&7ZGMA1aVEiuZSiFvV`S^r1X6%}Bdj=|o^`Si3oNjR{z zwovGknj0U4P0h^AOiaov1`d$|vCK4as=SgU7*s~)S@7RY)K8B9U0q!m3^}#&<&1(f z`}jC8BI2s2r^lt$n}oQkIGx2Zk|H^we$YiO)e8=XLkb{>WfI6vx1fO_VL}gM`7}w^ mTcc0oe@H^tRsR3wZp7Z#BDYtVq7~8~1VB?wPqhYW7yW;wt4*x{ literal 0 HcmV?d00001 diff --git a/pos_quick_logout/static/description/cashier_user_identical.png b/pos_quick_logout/static/description/cashier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_logout/static/description/icon.png b/pos_quick_logout/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..e8f6548bc4e442cad20bb4adbdead68e0e98d6f1 GIT binary patch literal 4140 zcmZ`cXH*kPvoV4c=^{jW?MV zp&IU`N|jEeT?C|kxj)~Jw`X_f%$%K>ot<_TWo>E9%*ewC005XxO^ohSq5gl1{u*_! z_Cw530Zq7}sU1Ca#L;`DQE`S)6UT4>fTjDtb>*cj3on%@9szNP@N$pv*7gkZrUHO6 z7_22vok}WpN~+q*n%Zj0vS4LxFxW+-vHbrq1ci9{J&O7N8RY%xK>z@2psA68U33uz z;~40&GS!=~Ry1|A7kz7HIlljqhfgVLhQs$IE5w7~+aN?Aj6}b`4}%#3g+Ejw*H51i zImYMg$~dI!x-YT~^VFH)8d*IE4@n{-uvb8_N$0%}uI0{ra?)YNyR69@snzG^_%W@u z__-s!%b5HF1#}wyYyJ7r%{P0qlE=B|dO9=P-CSKv%r{B>-lJi1KEx7u)6uAbZF@s)3@xnj*R zVfiR1IdoFB2!sAwmd1@_+ic1&tF7`7V8QDJt8;98t7vpD)kunWs= zbQwGi4w4Z08Ye=W>`5=uBU=e$SGG6E9|*cm|J37;>=fq-D_p~@nY%U*G}?A%QS)oG zj)Sz-K-w-3nOywrvXj!z&DhRllsVtF)=*+@{J$AcxG&FQXc}^!4sBRzEo3`t>J$Dv zBU433rR(y}(Vfe4l3R|+AYy3};m?EBj9YK04VvjJRPphfA2;xGyruKz6a?b=n$r{7 zWCT}YbCBX(Tk)L|2#s3+`WW~2Z)&^ZUcsf(W+>MZBh)j!8Khndm6QE`pI;n3XUW{f z3+fn3aV&a`FmN0kfRMdAYhEFWDem{}9s2`Ch)@b|%w?wmOZ;q4hgv{>jQ#qTVEl>gZTNtrTOBJsuD? zb_EG?jbf*Z%uqj3_$(11z6jp1c!BD_#Sw1$Xl?bRu_k?-vVOU_|7>s}Wt%!eKUf#a_;J zJ&n$k!!3ps^ADiR8-h4EIlm6x7LJg6p~ojtOe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ysir+0cA0b0sA;b%jVL$f++7w`*|HC3qp!)zvj2r*8xNLus48wlL*`t7vJt!M>Pn zEU-wufe25Ah{)M-uiomIv7qQLa!drEbnVDv&_g7%}JAbARf0(jTfc90}^26voo zh-EqUxOddk=5qJ%^N#lJ`4O&HNddnBq~_@Te#uw$As;E~zdoM^&m~;O3nZK&qITwn zN_1kaIg?|5wbOl>&n%Prbhb~TNiuMarL@ZaIhC1lkW1-WTp(NNtz;&giBfZI;O6_q zP!N*pc(#mtQ>_8qrPk}yPe)r~-HTN7Xhp*~|vFy=!gl4`?7nL0+WY!{2vy zmespF8KKRJ-61?M`WX=97QIL-EiIi*^@I3~V%XR1?b?W_DD;nDZn)!(^0Fb?&y0#+ z&YC|_bD^0UJMGIaZqsDVpRH=tDE&L(0i%gtFHIE#F`-E-IjsQ`u1(LQ@O!xS&J2lA f{9cG+=j9a}m57s!5UynEM;%}au{5eTgg^TqVO8Xz literal 0 HcmV?d00001 diff --git a/pos_quick_logout/static/src/css/pos_quick_logout.css b/pos_quick_logout/static/src/css/pos_quick_logout.css new file mode 100644 index 00000000..fcbb4d84 --- /dev/null +++ b/pos_quick_logout/static/src/css/pos_quick_logout.css @@ -0,0 +1,15 @@ +/* + Copyright (C) 2016-Today: La Louve () + @author: Sylvain LE GAL (https://twitter.com/legalsylvain) + License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +*/ + +.pos .pos-branding .pos-logout{ + float:right; + color:#DDD; + font-size:16px; + margin-right:32px; + line-height: 48px; + font-style:italic; + cursor: pointer; +} diff --git a/pos_quick_logout/static/src/js/pos_quick_logout.js b/pos_quick_logout/static/src/js/pos_quick_logout.js new file mode 100644 index 00000000..43423686 --- /dev/null +++ b/pos_quick_logout/static/src/js/pos_quick_logout.js @@ -0,0 +1,40 @@ +/* + Copyright (C) 2016-Today: La Louve () + @author: Sylvain LE GAL (https://twitter.com/legalsylvain) + License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). +*/ + +odoo.define('pos_quick_logout.pos_quick_logout', function (require) { + "use strict"; + + var chrome = require('point_of_sale.chrome'); + +/* ******************************************************** +chrome.Chrome +******************************************************** */ + chrome.Chrome.include({ + renderElement: function(){ + this._super(); + var self = this; + this.$('#pos-quick-logout').click(function(){ + self.pos.set_cashier(self.pos.user); + self.widget.username.renderElement(); + }); + }, + }); + +/* ******************************************************** +chrome.Chrome +******************************************************** */ + chrome.UsernameWidget.include({ + renderElement: function(){ + this._super(); + if (this.pos.user.id != this.pos.get_cashier().id){ + $('#pos-quick-logout').show(); + }else{ + $('#pos-quick-logout').hide(); + } + }, + }); + +}); diff --git a/pos_quick_logout/static/src/xml/pos_quick_logout.xml b/pos_quick_logout/static/src/xml/pos_quick_logout.xml new file mode 100644 index 00000000..1155ad2f --- /dev/null +++ b/pos_quick_logout/static/src/xml/pos_quick_logout.xml @@ -0,0 +1,18 @@ + + + + + + + + + Log Out + + + + + diff --git a/pos_quick_logout/static/src/xml/templates.xml b/pos_quick_logout/static/src/xml/templates.xml new file mode 100644 index 00000000..8f854d22 --- /dev/null +++ b/pos_quick_logout/static/src/xml/templates.xml @@ -0,0 +1,17 @@ + + + + +