Browse Source

[IMP] requirements in Camelcase

pull/564/head
tarteo 8 years ago
parent
commit
442cdd9c8f
  1. 3
      web_shortcut/models/ir_ui_menu.py
  2. 24
      web_shortcut/static/src/js/web_shortcut.js

3
web_shortcut/models/ir_ui_menu.py

@ -9,6 +9,5 @@ class IrUiView(models.Model):
def unlink(self):
res = super(IrUiView, self).unlink()
shortcuts = self.env['web.shortcut'].search([('menu_id', '=', False)])
for shortcut in shortcuts:
shortcut.unlink()
shortcuts.unlink()
return res

24
web_shortcut/static/src/js/web_shortcut.js

@ -19,18 +19,18 @@
############################################################################*/
odoo.define('web.shortcut', function(require) {
var widget = require('web.Widget'),
menu = require('web.UserMenu'),
client = require('web.WebClient'),
view_manager = require('web.ViewManager'),
action_manager = require('web.ActionManager'),
var Widget = require('web.Widget'),
UserMenu = require('web.UserMenu'),
WebClient = require('web.WebClient'),
ViewManager = require('web.ViewManager'),
ActionManager = require('web.ActionManager'),
core = require('web.core'),
qweb = core.qweb,
model = require('web.DataModel'),
DataModel = require('web.DataModel'),
session = require('web.session');
var ShortcutMenu = widget.extend({
var ShortcutMenu = Widget.extend({
template: 'Systray.ShortcutMenu',
init: function() {
this._super();
@ -38,7 +38,7 @@ odoo.define('web.shortcut', function(require) {
this.on('add', this, this.add);
this.on('display', this, this.display);
this.on('remove', this, this.remove);
this.model = new model('web.shortcut');
this.model = new DataModel('web.shortcut');
},
start: function() {
var self = this;
@ -94,7 +94,7 @@ odoo.define('web.shortcut', function(require) {
});
menu.include({
UserMenu.include({
start: function() {
var res = this._super.apply(this, arguments);
this.shortcuts = new ShortcutMenu(self);
@ -111,7 +111,7 @@ odoo.define('web.shortcut', function(require) {
});
client.include({
WebClient.include({
show_application: function() {
var self = this;
var res = this._super.apply(this, arguments);
@ -126,7 +126,7 @@ odoo.define('web.shortcut', function(require) {
});
view_manager.include({
ViewManager.include({
switch_mode: function (view_type, no_store) {
var self = this;
return this._super.apply(this, arguments).done(function() {
@ -173,7 +173,7 @@ odoo.define('web.shortcut', function(require) {
});
action_manager.include({
ActionManager.include({
do_action: function() {
this.$el.find('.oe_shortcut_toggle').addClass('hidden');
return this._super.apply(this, arguments);

Loading…
Cancel
Save