mirror of
https://github.com/OCA/web.git
synced 2025-02-22 13:21:25 +02:00
[IMP] requirements in Camelcase
This commit is contained in:
@@ -9,6 +9,5 @@ class IrUiView(models.Model):
|
|||||||
def unlink(self):
|
def unlink(self):
|
||||||
res = super(IrUiView, self).unlink()
|
res = super(IrUiView, self).unlink()
|
||||||
shortcuts = self.env['web.shortcut'].search([('menu_id', '=', False)])
|
shortcuts = self.env['web.shortcut'].search([('menu_id', '=', False)])
|
||||||
for shortcut in shortcuts:
|
shortcuts.unlink()
|
||||||
shortcut.unlink()
|
|
||||||
return res
|
return res
|
||||||
|
|||||||
@@ -19,18 +19,18 @@
|
|||||||
############################################################################*/
|
############################################################################*/
|
||||||
|
|
||||||
odoo.define('web.shortcut', function(require) {
|
odoo.define('web.shortcut', function(require) {
|
||||||
var widget = require('web.Widget'),
|
var Widget = require('web.Widget'),
|
||||||
menu = require('web.UserMenu'),
|
UserMenu = require('web.UserMenu'),
|
||||||
client = require('web.WebClient'),
|
WebClient = require('web.WebClient'),
|
||||||
view_manager = require('web.ViewManager'),
|
ViewManager = require('web.ViewManager'),
|
||||||
action_manager = require('web.ActionManager'),
|
ActionManager = require('web.ActionManager'),
|
||||||
core = require('web.core'),
|
core = require('web.core'),
|
||||||
qweb = core.qweb,
|
qweb = core.qweb,
|
||||||
model = require('web.DataModel'),
|
DataModel = require('web.DataModel'),
|
||||||
session = require('web.session');
|
session = require('web.session');
|
||||||
|
|
||||||
|
|
||||||
var ShortcutMenu = widget.extend({
|
var ShortcutMenu = Widget.extend({
|
||||||
template: 'Systray.ShortcutMenu',
|
template: 'Systray.ShortcutMenu',
|
||||||
init: function() {
|
init: function() {
|
||||||
this._super();
|
this._super();
|
||||||
@@ -38,7 +38,7 @@ odoo.define('web.shortcut', function(require) {
|
|||||||
this.on('add', this, this.add);
|
this.on('add', this, this.add);
|
||||||
this.on('display', this, this.display);
|
this.on('display', this, this.display);
|
||||||
this.on('remove', this, this.remove);
|
this.on('remove', this, this.remove);
|
||||||
this.model = new model('web.shortcut');
|
this.model = new DataModel('web.shortcut');
|
||||||
},
|
},
|
||||||
start: function() {
|
start: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
@@ -94,7 +94,7 @@ odoo.define('web.shortcut', function(require) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
menu.include({
|
UserMenu.include({
|
||||||
start: function() {
|
start: function() {
|
||||||
var res = this._super.apply(this, arguments);
|
var res = this._super.apply(this, arguments);
|
||||||
this.shortcuts = new ShortcutMenu(self);
|
this.shortcuts = new ShortcutMenu(self);
|
||||||
@@ -111,7 +111,7 @@ odoo.define('web.shortcut', function(require) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
client.include({
|
WebClient.include({
|
||||||
show_application: function() {
|
show_application: function() {
|
||||||
var self = this;
|
var self = this;
|
||||||
var res = this._super.apply(this, arguments);
|
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) {
|
switch_mode: function (view_type, no_store) {
|
||||||
var self = this;
|
var self = this;
|
||||||
return this._super.apply(this, arguments).done(function() {
|
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() {
|
do_action: function() {
|
||||||
this.$el.find('.oe_shortcut_toggle').addClass('hidden');
|
this.$el.find('.oe_shortcut_toggle').addClass('hidden');
|
||||||
return this._super.apply(this, arguments);
|
return this._super.apply(this, arguments);
|
||||||
|
|||||||
Reference in New Issue
Block a user