diff options
| author | Robin Heinz <rhe@odoo.com> | 2019-07-17 12:57:27 +0000 |
|---|---|---|
| committer | Pierre Masereel <pim@odoo.com> | 2019-08-02 09:33:05 +0000 |
| commit | 987951a8d44276d768566752fdf4be2a55dd25f2 (patch) | |
| tree | 8aa9c96713a9e0605c736d0c34bdbcf25bab125a | |
| parent | 2ef96ee8cc326c76a8bc53216f1d9be98a924d8c (diff) | |
[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>
| -rw-r--r-- | addons/point_of_sale/static/src/css/pos.css | 79 | ||||
| -rw-r--r-- | addons/pos_hr/static/src/css/pos.css | 81 | ||||
| -rw-r--r-- | addons/pos_hr/static/src/js/screens.js | 5 | ||||
| -rw-r--r-- | addons/pos_hr/static/src/xml/pos.xml | 5 | ||||
| -rw-r--r-- | addons/pos_hr/views/point_of_sale.xml | 2 |
5 files changed, 93 insertions, 79 deletions
diff --git a/addons/point_of_sale/static/src/css/pos.css b/addons/point_of_sale/static/src/css/pos.css index f5215942e3c..c7469711f78 100644 --- a/addons/point_of_sale/static/src/css/pos.css +++ b/addons/point_of_sale/static/src/css/pos.css @@ -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; -} diff --git a/addons/pos_hr/static/src/css/pos.css b/addons/pos_hr/static/src/css/pos.css new file mode 100644 index 00000000000..e50be169538 --- /dev/null +++ b/addons/pos_hr/static/src/css/pos.css @@ -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; +} diff --git a/addons/pos_hr/static/src/js/screens.js b/addons/pos_hr/static/src/js/screens.js index 84551507148..425bec4d78b 100644 --- a/addons/pos_hr/static/src/js/screens.js +++ b/addons/pos_hr/static/src/js/screens.js @@ -73,6 +73,11 @@ var LoginScreenWidget = ScreenWidget.extend({ self.unlock_screen(); }); }); + + this.$('.close-session').click(function() { + self.gui.close(); + }); + this._super(); }, diff --git a/addons/pos_hr/static/src/xml/pos.xml b/addons/pos_hr/static/src/xml/pos.xml index 3c12a975f88..4e1f9128942 100644 --- a/addons/pos_hr/static/src/xml/pos.xml +++ b/addons/pos_hr/static/src/xml/pos.xml @@ -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> diff --git a/addons/pos_hr/views/point_of_sale.xml b/addons/pos_hr/views/point_of_sale.xml index 3c67fa999ed..4362faf76ee 100644 --- a/addons/pos_hr/views/point_of_sale.xml +++ b/addons/pos_hr/views/point_of_sale.xml @@ -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> |
