[IMP] point_of_sale: Navigation as employee from frontend to backend.

We added a button for the front end closure to go back to the back end.
Before this, the only way to go back was to change the URL, now we can close the session with the frontend properly.

Also moved the css related to pos_hr in the good directory.
Task-id: 2032178

closes odoo/odoo#34948

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
This commit is contained in:
Robin Heinz
2019-08-02 09:33:05 +00:00
committed by Pierre Masereel
parent 2ef96ee8cc
commit 987951a8d4
5 changed files with 93 additions and 79 deletions
@@ -2445,82 +2445,3 @@ td {
.pos .not-supported-browser img{
border-collapse: separate;
}
/* ********* Login Screen ********* */
.pos .login-overlay{
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
width: 100%;
height:100%;
z-index:1000;
background: linear-gradient(to right bottom, #77717e, #c9a8a9);
}
.pos .login-overlay:before {
content: '';
background-image: url(../../img/login-bg-overlay.svg);
background-color: rgba(0, 0, 0, 0.3);
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
width: 100%;
height:100%;
}
.pos .screen-login{
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
margin: auto;
width:550px;
height:300px;
text-align:center;
font-size:20px;
font-weight:bold;
background-color: #F0EEEE;
border-radius: 3px;
z-index:1200;
font-family: 'Lato';
}
.pos .login-title{
height: 55%;
vertical-align: middle;
line-height: 5;
font-size: larger;
}
.pos .login-body{
height:33%;
}
.pos .login-element{
float: left;
width: 45%;
height: 60%;
}
.pos .login-barcode-img{
width: 80px;
height: 55px;
background: white;
border: 0px;
}
.pos .login-barcode-text{
color: #999999;
font-size: 13px;
padding-top: 0.2em;
}
.pos .login-or{
font-size: 15px;
font-style: italic;
float: left;
width: 10%;
height: 100%;
line-height: 5;
}
.pos .login-button{
font-size: initial;
height: 100%;
color: #555555;
border-radius: 5px;
}
+81
View File
@@ -0,0 +1,81 @@
.pos .login-overlay{
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
width: 100%;
height:100%;
z-index:1000;
background: linear-gradient(to right bottom, #77717e, #c9a8a9);
}
.pos .login-overlay:before {
content: '';
background-image: url(../../img/login-bg-overlay.svg);
background-color: rgba(0, 0, 0, 0.3);
position: fixed;
left: 0;
top: 0;
bottom: 0;
right: 0;
width: 100%;
height:100%;
}
.pos .screen-login{
position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
margin: auto;
width:550px;
height:300px;
text-align:center;
font-size:20px;
font-weight:bold;
background-color: #F0EEEE;
border-radius: 3px;
z-index:1200;
font-family: 'Lato';
}
.pos .login-title{
height: 40%;
vertical-align: middle;
line-height: 5;
font-size: larger;
}
.pos .login-body{
height:37%;
}
.pos .login-footer{
height:18%;
}
.pos .login-element{
float: left;
width: 40%;
height: 60%;
}
.pos .login-barcode-img{
width: 80px;
height: 55px;
background: white;
border: 0px;
}
.pos .login-barcode-text{
color: #999999;
font-size: 13px;
padding-top: 0.2em;
}
.pos .login-or{
font-size: 15px;
font-style: italic;
float: left;
width: 10%;
height: 100%;
line-height: 5;
}
.pos .login-button{
font-size: initial;
height: 100%;
color: #555555;
border-radius: 5px;
}
+5
View File
@@ -73,6 +73,11 @@ var LoginScreenWidget = ScreenWidget.extend({
self.unlock_screen();
});
});
this.$('.close-session').click(function() {
self.gui.close();
});
this._super();
},
+5
View File
@@ -14,6 +14,11 @@
<button class="login-button select-employee">Select Cashier</button>
</span>
</div>
<div class="login-footer">
<small>
<button class="login-button close-session">Close session</button>
</small>
</div>
</div>
</div>
</t>
+2
View File
@@ -2,6 +2,8 @@
<odoo>
<template id="assets" inherit_id="point_of_sale.assets">
<xpath expr="." position="inside">
<link rel="stylesheet" href="/pos_hr/static/src/css/pos.css"/>
<script type="text/javascript" src="/pos_hr/static/src/js/models.js"></script>
<script type="text/javascript" src="/pos_hr/static/src/js/screens.js"></script>
<script type="text/javascript" src="/pos_hr/static/src/js/gui.js"></script>