Browse Source

[MIG] pos_quick_logout: Migration to 10.0

[FIX] Fix Travis

[FIX] Fix Licence

[FIX] rename pos_quick_logout.py to pos_config.py

[FIX] Travis

[FIX] fix javascript syntax + __manifest__ typo

[FIX] fix python syntax

[FIX] rename pos_quick_logout_view.xml to pos_config_view.xml

[FIX] Travis : remove unused imports
pull/455/head
Invitu 7 years ago
committed by Iván Todorovich
parent
commit
29735ec840
  1. 3
      pos_quick_logout/README.rst
  2. 2
      pos_quick_logout/__init__.py
  3. 5
      pos_quick_logout/__manifest__.py
  4. 2
      pos_quick_logout/models/__init__.py
  5. 2
      pos_quick_logout/models/pos_config.py
  6. 14
      pos_quick_logout/static/src/js/pos_quick_logout.js
  7. 0
      pos_quick_logout/views/pos_config_view.xml

3
pos_quick_logout/README.rst

@ -24,8 +24,7 @@ Implemented Features
.. 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
* 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

2
pos_quick_logout/__init__.py

@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
import models
from . import models

5
pos_quick_logout/__openerp__.py → pos_quick_logout/__manifest__.py

@ -6,16 +6,17 @@
{
'name': 'Point of Sale - Quick Logout',
'version': '9.0.1.0.0',
'version': '10.0.1.0.0',
'category': 'Point Of Sale',
'summary': 'Allow PoS user to logout quickly after user changed',
'license': 'AGPL-3',
'author': 'La Louve, Odoo Community Association (OCA)',
'website': 'http://www.lalouve.net',
'depends': [
'point_of_sale',
],
'data': [
'views/pos_quick_logout_view.xml',
'views/pos_config_view.xml',
'static/src/xml/templates.xml',
],
'qweb': [

2
pos_quick_logout/models/__init__.py

@ -1,2 +1,2 @@
# -*- coding: utf-8 -*-
import pos_quick_logout
from . import pos_config

2
pos_quick_logout/models/pos_quick_logout.py → pos_quick_logout/models/pos_config.py

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
from odoo import models, api, fields, exceptions
from odoo import models, fields
class PosConfig(models.Model):

14
pos_quick_logout/static/src/js/pos_quick_logout.js

@ -31,14 +31,14 @@ chrome.Chrome
if (self.widget.username) {
self.pos.set_cashier(self.pos.user);
self.widget.username.renderElement();
};
}
},
resetTimer: function() {
var self = this;
clearTimeout(this.timer);
this.timer = setTimeout(function(){
self.logout();
}, self.pos.config.logout_timeout * 1000); // time is in milliseconds
}, self.pos.config.logout_timeout * 1000);
},
renderElement: function(){
this._super();
@ -47,7 +47,7 @@ chrome.Chrome
self.pos.set_cashier(self.pos.user);
self.widget.username.renderElement();
});
},
}
});
/* ********************************************************
@ -56,12 +56,12 @@ chrome.Chrome
chrome.UsernameWidget.include({
renderElement: function(){
this._super();
if (this.pos.user.id != this.pos.get_cashier().id){
$('#pos-quick-logout').show();
}else{
if (this.pos.user.id === this.pos.get_cashier().id){
$('#pos-quick-logout').hide();
}else{
$('#pos-quick-logout').show();
}
},
}
});
});

0
pos_quick_logout/views/pos_quick_logout_view.xml → pos_quick_logout/views/pos_config_view.xml

Loading…
Cancel
Save