跳至内容
Odoo 菜单
  • 登录
  • 免费试用
  • 应用程序
    财务
    • 会计
    • 发票
    • 费用
    • 电子表格 (BI)
    • 文档
    • 电子签名
    销售
    • 客户关系管理
    • 销售
    • POS 销售点管理-零售
    • POS 销售点管理 - 餐厅
    • 订阅
    • 租赁
    网站
    • 网站设计
    • 电子商务
    • 博客
    • 论坛
    • 在线客服
    • 在线学习
    供应链
    • 库存
    • 制造
    • 产品生命周期
    • 采购
    • 维护保养
    • 品控
    人力资源
    • 员工
    • 招聘
    • 休假
    • 评价
    • 内部推荐
    • 车队
    营销
    • 社媒营销
    • 电邮营销
    • 短信营销
    • 近期活动
    • 营销自动化
    • 网上调查
    服务
    • 项目管理
    • 工时单
    • 现场服务
    • 服务台
    • 排期
    • 预约
    生产力
    • 讨论
    • 批核
    • IoT物联网
    • VoIP
    • 知识库
    • WhatsApp
    第三方应用软件 Odoo 定制 Odoo云端平台
  • 行业
    零售
    • 书店
    • 服装店
    • 家具店
    • 食品杂货店
    • 五金店
    • 玩具店
    餐饮与酒店服务
    • 酒吧及酒馆
    • 餐厅
    • 快餐
    • 民宿
    • 饮品分销商
    • 酒店
    房地产
    • 房地产代理
    • 建筑师事务所
    • 建造业
    • 地产管理
    • 园艺
    • 业主协会
    咨询
    • 会计师事务所
    • Odoo合作伙伴
    • 市场推广公司
    • 律师事务所
    • 人才招聘
    • 审核 & 认证
    制造
    • 纺织
    • 金属
    • 家具
    • 食品
    • 啤酒厂
    • 企业礼品
    保健与健身
    • 体育俱乐部
    • 眼镜店
    • 健身中心
    • 健康从业者
    • 药房
    • 发型屋
    商贸服务
    • 维修人员
    • IT 硬件及支持
    • 太阳能系统
    • 鞋匠
    • 清洁服务
    • 暖通空调服务
    其他
    • 非营利组织
    • 环境机构
    • 广告牌租赁
    • 摄影服务
    • 自行车租赁
    • 软件经销商
    浏览所有行业
  • 社区
    学习
    • 教学视频
    • 文档
    • 认证
    • 培训
    • 博客
    • 播客
    赋能教育
    • 教育计划
    • Scale Up! 商业游戏
    • 参观Odoo
    获取软件
    • 下载
    • 版本对比
    • 发布
    合作
    • Github
    • 论坛
    • 近期活动
    • 翻译
    • 成为合作伙伴
    • 合作伙伴服务
    • 注册您的会计事务所
    获取服务
    • 寻找合作伙伴
    • 查找会计服务
    • 预约顾问咨询
    • 安装及推行服务
    • 客户参考
    • 支持
    • 升级
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    获取演示
  • 定价
  • 技术支持

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • 客户关系管理
  • e-Commerce
  • 会计
  • 库存
  • PoS
  • 项目
  • MRP
All apps
只限注册用戶才可与社群互动。
所有帖文 人 徽章
标签 (查看所有)
odoo accounting v14 pos v15
关于此论坛区
只限注册用戶才可与社群互动。
所有帖文 人 徽章
标签 (查看所有)
odoo accounting v14 pos v15
关于此论坛区
帮助

[8.0] Keyboard Shortcut for 'Add an Item'

订阅

此帖文有活动时,接收通知

此问题已终结
usability
3 回复
8467 查看
形象
John

Is there a keyboard shortcut for the user to be able to add a line to a purchase order, sales order, etc. without having to use the mouse?

0
形象
丢弃
形象
shaneebkhan
最佳答案


download web_shortcuts-8.0.1.0 module and install it

after that repalce web_shortcuts.js with 


/*############################################################################

#

# OpenERP, Open Source Management Solution

# Copyright (C) 2011-2012 OpenERP SA (<http://openerp.com>).

#

# This program is free software: you can redistribute it and/or modify

# it under the terms of the GNU Affero General Public License as

# published by the Free Software Foundation, either version 3 of the

# License, or (at your option) any later version.

#

# This program is distributed in the hope that it will be useful,

# but WITHOUT ANY WARRANTY; without even the implied warranty of

# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

# GNU Affero General Public License for more details.

#

# You should have received a copy of the GNU Affero General Public License

# along with this program. If not, see <http://www.gnu.org/licenses/>.

#

############################################################################*/

/*

* from web_keyborad_shortcuts by shaneeb 1

*/

var fullscreen_toggle = {

fullscreen_toggle: 0,

search: 0,

};

/*

* end of web_keyborad_shortcuts by shaneeb 1

*/

openerp.web_shortcuts = function (instance) {

var QWeb = instance.web.qweb,

_t = instance.web._t;

instance.web_shortcuts.Shortcuts = instance.web.Widget.extend({

template: 'Systray.Shortcuts',

init: function() {

this._super();

this.on('load', this, this.load);

this.on('add', this, this.add);

this.on('display', this, this.display);

this.on('remove', this, this.remove);

this.on('click', this, this.click);

this.model = new instance.web.Model('web.shortcut');

/*

* from web_keyborad_shortcuts by shaneeb 2

*/

this._super.apply(this, arguments);

var old=this;

var match=0;

var str ="";

var select=0;

var menu_id=0;

$(document).keyup(function(event){

if(fullscreen_toggle.menu_dict)

{

var d = event.keyCode;

var pa=$(".oe_searchview_input").html();

for (key in Object.keys(fullscreen_toggle.menu_dict))

{if (pa)

{

if(pa=='<br>')

{

$("div.oe_searchview_clear").click();

break;

}

if (pa.length>0 )

{ pa=pa.replace(/\\/g, "\\\\");

pa=pa.replace(/\(/g, "\\(");

pa=pa.replace(/\)/g, "\\)");

var patt1=new RegExp("^"+pa);

if(patt1.test(Object.keys(fullscreen_toggle.menu_dict)[key]))

{

str = Object.keys(fullscreen_toggle.menu_dict)[key]

var sub = str.substring(pa.length);

$("#search_hint").remove();

$(".oe_searchview_input").append('<div id="search_hint" style="color:#898585">'+sub+"</div>");

match=1;

}

}

}

}

}

if(d==39 && match==1)

{

$(".oe_searchview_input").trigger("paste");

match=0;

select=1;

menu_id=fullscreen_toggle.menu_dict[str];

}

if(d==37 || d==8)

{

event.preventDefault();

match=0;

select=0;

}

if (fullscreen_toggle.menu_dict){

if(d==13 && select==1 && menu_id)

{

var self = old,

id = menu_id;

menu_id=0;

self.session.active_id = id;

// TODO: Use do_action({menu_id: id, type: 'ir.actions.menu'})

select=0;

match=0;

self.rpc('/web/menu/action', {'menu_id': id}).done(function(ir_menu_data) {

if (ir_menu_data.action.length){

instance.webclient.on_menu_action({action_id: ir_menu_data.action[0][2].id});

}

});

}

}

});

/*

* end of web_keyborad_shortcuts by shaneeb 2

*/

},

start: function() {

var self = this;

this._super();

this.trigger('load');

this.$el.on('click', '.oe_systray_shortcuts_items a', function() {

self.trigger('click', $(this));

});

},

load: function() {

var self = this;

this.$el.find('.oe_systray_shortcuts_items').empty();

return this.model.call('get_user_shortcuts', [

instance.session.uid,

instance.web.pyeval.eval('context', {})

]).done(function(shortcuts) {

_.each(shortcuts, function(sc) {

self.trigger('display', sc);

});

});

},

add: function (sc) {

var self = this;

this.model.call('create', [sc]).then(function(out){

self.trigger('load');

});

},

display: function(sc) {

var self = this;

this.$el.find('.oe_systray_shortcuts_items').append();

var $sc = $(QWeb.render('Systray.Shortcuts.Item', {'shortcut': sc}));

$sc.appendTo(self.$el.find('.oe_systray_shortcuts_items'));

},

remove: function (menu_id) {

var menu_id = this.session.active_id;

var $shortcut = this.$el.find('.oe_systray_shortcuts_items li a[data-id=' + menu_id + ']');

var shortcut_id = $shortcut.data('shortcut-id');

$shortcut.remove();

this.model.call('unlink', [shortcut_id]);

},

click: function($link) {

var self = this,

id = $link.data('id');

self.session.active_id = id;

// TODO: Use do_action({menu_id: id, type: 'ir.actions.menu'})

new instance.web.Model('ir.ui.menu').query(['action']).filter([['id', '=', id]]).context(null).all().then(function(menu) {

var action_str = menu[0].action;

var action_str_parts = action_str.split(',');

var action_id = parseInt(action_str_parts[1])

self.rpc('/web/action/load', {'action_id': action_id}).done(function(action) {

instance.webclient.on_menu_action({action_id: action.id});

});

});

this.$el.find('.oe_systray_shortcuts').trigger('mouseout');

},

has: function(menu_id) {

return !!this.$el.find('a[data-id=' + menu_id + ']').length;

}

});

instance.web.UserMenu.include({

do_update: function() {

var self = this;

this._super.apply(this, arguments);

this.update_promise.done(function() {

if (self.shortcuts) {

self.shortcuts.trigger('load');

} else {

self.shortcuts = new instance.web_shortcuts.Shortcuts(self);

self.shortcuts.appendTo(instance.webclient.$el.find('.oe_systray'));

}

});

},

});

instance.web.ViewManagerAction.include({

switch_mode: function (view_type, no_store) {

var self = this;

this._super.apply(this, arguments).done(function() {

self.shortcut_check(self.views[view_type]);

});

},

shortcut_check : function(view) {

var self = this;

var shortcuts_menu = instance.webclient.user_menu.shortcuts;

var grandparent = this.getParent() && this.getParent().getParent();

// display shortcuts if on the first view for the action

var $shortcut_toggle = this.$el.find('.oe_shortcuts_toggle');

if (!this.action.name ||

!(view.view_type === this.views_src[0].view_type

&& view.view_id === this.views_src[0].view_id)) {

$shortcut_toggle.hide();

return;

}

// Anonymous users don't have user_menu

if (shortcuts_menu) {

$shortcut_toggle.toggleClass('oe_shortcuts_remove', shortcuts_menu.has(self.session.active_id));

$shortcut_toggle.unbind("click").click(function() {

if ($shortcut_toggle.hasClass("oe_shortcuts_remove")) {

shortcuts_menu.trigger('remove', self.session.active_id);

} else {

shortcuts_menu.trigger('add', {

'user_id': self.session.uid,

'menu_id': self.session.active_id,

'name': self.action.name

});

}

$shortcut_toggle.toggleClass("oe_shortcuts_remove");

});

}

}

});

/*

* from web_keyborad_shortcuts by shaneeb 3

*/

$(document).ready(function(event) {

$(document).keyup(function(event) {

$("button u span").unwrap();

});

$(document).keydown(function(event) {

jQuery(".oe_menu").sortable({axis: "x",

cursor: "move",

});

debugger ;

$("#search_hint").remove();

var n = String.fromCharCode(event.charCode);

var d = event.keyCode;

var alt_dict={}

if (event.altKey) {

$("header button:visible").attr("accesskey",function(index,currentvalue){

if(currentvalue){

var button_text = $(this).text();

$(this).html(button_text.replace(currentvalue,'<u class="alt_base"><span class="under_line">'+currentvalue+'</sapn></u>'));

alt_dict[currentvalue]=$(this);

$('.alt_base').addClass("alt_after");

}

});

// $("button").attr("accesskey",function(index,currentvalue){

// if(currentvalue){

//

// var button_text = $(this).text();

// $(this).html(button_text.replace(currentvalue,'<u><span class="under_line">'+currentvalue+'</sapn></u>'));

// alt_dict[currentvalue]=$(this);

// $(this).removeAttr("accesskey");

// $(this).attr("acckey",currentvalue);

// }

// });

}

if (event.keyCode && event.keyCode != 18 && event.altKey) {

debugger ;

event.preventDefault();

var pressed = String.fromCharCode(event.keyCode);

if (alt_dict.hasOwnProperty(pressed)!=false)

{

// if(alt_dict[pressed].is(":visible"))

// {

//

// alt_dict[pressed].click();

// }

}

}

if (event.keyCode && event.keyCode != 17 && event.ctrlKey) {

if (d == 83) {

event.preventDefault();

var x = document.getElementsByTagName('button');

for (i = 0; i < x.length; i++) {

y = x[i];

if (y.className == "oe_button oe_form_button_save oe_highlight" && $(y).is(':visible')) {

y.click();

}

}

}

if (d == 75) {

event.preventDefault();

var x = document.getElementsByTagName('a');

for (i = 0; i < x.length; i++) {

y = x[i];

if (y.className == "oe_vm_switch_kanban") {

y.click();

}

}

}

if (d == 222) {

event.preventDefault();

var x = document.getElementsByTagName('a');

for (i = 0; i < x.length; i++) {

y = x[i];

if (y.className == "oe_vm_switch_graph") {

y.click();

}

}

}

if (d == 70) {

event.preventDefault();

var x = document.getElementsByTagName('div');

for (i = 0; i < x.length; i++) {

y = x[i];

if (y.className == "oe_searchview_facets") {

y.click();

if(fullscreen_toggle.fullscreen_toggle)

{

$('div.oe_searchview').animate({

"top": "0px"

},"fast");

fullscreen_toggle.search=1;

}

else{

$('div.oe_searchview').animate({

"top": "32px"

},"fast");

fullscreen_toggle.search=1;

}

$("div.oe_searchview").animate({

opacity: '1',

}, "fast");

}

}

}

if (d == 68) {

event.preventDefault();

if(fullscreen_toggle.fullscreen_toggle)

{

$('div.oe_searchview').animate({

"top": "-32px"

},"fast");

fullscreen_toggle.search=0;

}

else{

$('div.oe_searchview').animate({

"top": "0px"

},"fast");

fullscreen_toggle.search=0;

}

}

if (d == 76) {

event.preventDefault();

var x = document.getElementsByTagName('a');

for (i = 0; i < x.length; i++) {

y = x[i];

if (y.className == "oe_vm_switch_list") {

y.click();

}

}

}

if (d == 27) {

event.preventDefault();

var x = document.getElementsByTagName('a');

for (i = 0; i < x.length; i++) {

y = x[i];

if (y.className == "oe_bold oe_form_button_cancel" && $(y).is(':visible')) {

y.click();

}

}

}

if (d == 186 | d == 59) {

event.preventDefault();

var x = document.getElementsByTagName('a');

for (i = 0; i < x.length; i++) {

y = x[i];

if (y.className == "oe_vm_switch_form") {

y.click();

}

}

}

if (d == 32) {

event.preventDefault();

var x = document.getElementsByTagName('button');

for (i = 0; i < x.length; i++) {

y = x[i];

if ((y.className == "oe_button oe_list_add oe_highlight" | y.className == "oe_kanban_button_new oe_highlight" | y.className == "oe_button oe_form_button_create") && $(y).is(':visible')) {

y.click();

}

}

}

if (d == 187) {

event.preventDefault();

var x = document.getElementsByTagName('button');

for (i = 0; i < x.length; i++) {

y = x[i];

alert(d);

if (y.className == "oe_button oe_form_button_edit") {

//y.click();

}

}

}

if (d == 69) {

event.preventDefault();

var x = document.getElementsByTagName('button');

for (i = 0; i < x.length; i++) {

y = x[i];

if (y.className == "oe_button oe_form_button_edit") {

y.click();

}

}

}

if (d == 40) {

event.preventDefault();

var x = document.getElementsByTagName('span');

for (i = 0; i < x.length; i++) {

y = x[i];

if (y.className == "ui-icon ui-icon-triangle-1-e") {

y.click();

}

}

}

if (d == 38) {

event.preventDefault();

var x = document.getElementsByTagName('span');

for (i = 0; i < x.length; i++) {

y = x[i];

if (y.className == "ui-icon ui-icon-triangle-1-s") {

y.click();

}

}

}

// if (d == 80) {

// $('.oe_leftbar').remove();

// $('colgroup').remove();

// $('.oe_topbar').remove();

// $('.oe_loading').remove();

// $('tfoot').remove();

// $('ul').remove();

// $('.oe_notification.ui-notify').remove();

// $('.oe_view_manager_view_kanban').remove();

// $('tr.oe_header_row:eq(1)').remove();

// $('.oe_view_manager_view_search').remove();

// var _elementClone = $(".oe_view_manager.oe_view_manager_current").clone();

// $(".oe_view_manager.oe_view_manager_current").remove();

// $("body").prepend(_elementClone);

// $("table.oe_webclient").removeClass();

// $("td.oe_application").removeClass();

// }

if (d == 80) {

event.preventDefault();

var x = document.getElementsByTagName('div');

var list = 0;

var form = 0;

var check = 0;

$('.oe_form_sheet').each(function() {

if ($(this).parents('div:hidden').length == 0) {

form=1;

}

else {

form=0;

check = 0

}

});

$('.oe_view_manager_view_graph').each(function() {

if ($(this).parents('div:hidden').length == 0) {

form=1;

}

else {

form=0;

check = 0

}

});

$('.oe_list_content').each(function() {

if ($(this).parents('div:hidden').length == 0) {

list=1;

}

});

for (i = 0; i < x.length; i++) {

y = x[i];

if ((y.className == "oe_form_sheet oe_form_sheet_width" | y.className == "oe_semantic_html_override editor-render oe_view") & form==1) {

if ($(y).parents('div:hidden').length == 0) {

check=1;

}

else continue;

var logo_url = $('a.oe_logo').children("img").attr("src");

var add_img = '<img src="'+logo_url+'" class="sheet_logo"/>'

var graph_img = '<img src="'+logo_url+'" style="padding:10px;padding-bottom:0px" class="sheet_logo"/>'

var hr='<hr class="sheet_logo" style="border: 2;width: 100%;margin-bottom:25px"/>'

$('.oe_form_sheet').prepend(hr);

$('.oe_form_sheet').prepend(add_img);

$('.oe_semantic_html_override.editor-render.oe_view').prepend(hr);

$('.oe_semantic_html_override.editor-render.oe_view').prepend(graph_img);

html2canvas(y, {

onrendered: function(canvas) {

myWindow = window.open('', '', 'width='+window.innerWidth+',height='+window.innerHeight);

var strDataURI = canvas.toDataURL();

var link = document.createElement("img");

link.setAttribute("src", strDataURI);

link.setAttribute("id", "embedImage");

var linkText = document.createTextNode("Click me");

link.appendChild(linkText);

var openerp_img = document.createElement("img");

openerp_img.setAttribute("class", "open");

openerp_img.setAttribute("src", logo_url);

var openerp_imgText = document.createTextNode("Click me");

openerp_img.appendChild(openerp_imgText);

var css = document.createElement("style");

var cssText = document.createTextNode(".css3button {margin-left:37%;margin-top:2%;font-family: Arial, Helvetica, sans-serif;font-weight:700;font-size: 14px;color: #c2c0c2;padding: 10px 20px;background: -moz-linear-gradient(top,#302e30 0%,#000000);background: -webkit-gradient(linear, left top, left bottom, from(#302e30),to(#000000));-moz-border-radius: 1px;-webkit-border-radius: 1px;border-radius: 1px;border: 1px solid #000000;-moz-box-shadow:0px 1px 3px rgba(000,000,000,0.5),inset 0px 0px 1px rgba(255,255,255,0.6);-webkit-box-shadow:0px 1px 3px rgba(000,000,000,0.5),inset 0px 0px 1px rgba(255,255,255,0.6);box-shadow:0px 1px 3px rgba(000,000,000,0.5),inset 0px 0px 1px rgba(255,255,255,0.6);text-shadow:0px -1px 0px rgba(000,000,000,1),0px 1px 0px rgba(184,180,184,0.2);}body{background-color:#252525;}img{margin-left:10%;margin-top:2%;}.open{margin-left:35%;margin-top:1%;}");

css.appendChild(cssText);

var input = document.createElement("input");

var inputText = document.createTextNode("a");

input.appendChild(inputText);

input.setAttribute("id", "saveImage");

input.setAttribute("onclick", "download()");

input.setAttribute("type", "button");

input.setAttribute("class", "css3button");

input.setAttribute("value", "Download Png");

var jscript = document.createElement("script");

jscript.setAttribute("type", "text/javascript");

var jscriptText = document.createTextNode("function download(){var img = document.getElementById('embedImage');var button = document.getElementById('saveImage');window.location.href = img.src.replace('image/png', 'image/octet-stream');}");

jscript.appendChild(jscriptText);

myWindow.document.head.appendChild(css);

myWindow.document.head.appendChild(jscript);

//myWindow.document.body.appendChild(canvas);

myWindow.document.body.appendChild(openerp_img);

myWindow.document.body.appendChild(link);

myWindow.document.body.appendChild(input);

myWindow.focus();

$(".sheet_logo").remove();

}

});

}

}

if (list == 1 & check==0) {

var x = document.getElementsByTagName('table');

for (i = 0; i < x.length; i++) {

y = x[i];

if (y.className == "oe_list_content") {

if ($(y).parents('div:hidden').length == 0) {

}

else continue;

var logo_url = $('a.oe_logo').children("img").attr("src");

html2canvas(y, {

onrendered: function(canvas) {

myWindow = window.open('', '', 'width=950,height=680');

var strDataURI = canvas.toDataURL();

var link = document.createElement("img");

link.setAttribute("src", strDataURI);

link.setAttribute("id", "embedImage");

var linkText = document.createTextNode("Click me");

link.appendChild(linkText);

var openerp_img = document.createElement("img");

openerp_img.setAttribute("class", "open");

openerp_img.setAttribute("src", logo_url);

var openerp_imgText = document.createTextNode("Click me");

openerp_img.appendChild(openerp_imgText);

var css = document.createElement("style");

var cssText = document.createTextNode(".css3button {margin-left:37%;margin-top:2%;font-family: Arial, Helvetica, sans-serif;font-weight:700;font-size: 14px;color: #c2c0c2;padding: 10px 20px;background: -moz-linear-gradient(top,#302e30 0%,#000000);background: -webkit-gradient(linear, left top, left bottom, from(#302e30),to(#000000));-moz-border-radius: 1px;-webkit-border-radius: 1px;border-radius: 1px;border: 1px solid #000000;-moz-box-shadow:0px 1px 3px rgba(000,000,000,0.5),inset 0px 0px 1px rgba(255,255,255,0.6);-webkit-box-shadow:0px 1px 3px rgba(000,000,000,0.5),inset 0px 0px 1px rgba(255,255,255,0.6);box-shadow:0px 1px 3px rgba(000,000,000,0.5),inset 0px 0px 1px rgba(255,255,255,0.6);text-shadow:0px -1px 0px rgba(000,000,000,1),0px 1px 0px rgba(184,180,184,0.2);}body{background-color:#252525;}img{margin-left:10%;margin-top:2%;}.open{margin-left:35%;margin-top:1%;}");

css.appendChild(cssText);

var input = document.createElement("input");

var inputText = document.createTextNode("a");

input.appendChild(inputText);

input.setAttribute("id", "saveImage");

input.setAttribute("onclick", "download()");

input.setAttribute("type", "button");

input.setAttribute("class", "css3button");

input.setAttribute("value", "Download Png");

var jscript = document.createElement("script");

jscript.setAttribute("type", "text/javascript");

var jscriptText = document.createTextNode("function download(){var img = document.getElementById('embedImage');var button = document.getElementById('saveImage');window.location.href = img.src.replace('image/png', 'image/octet-stream');}");

jscript.appendChild(jscriptText);

myWindow.document.head.appendChild(css);

myWindow.document.head.appendChild(jscript);

//myWindow.document.body.appendChild(canvas);

myWindow.document.body.appendChild(openerp_img);

myWindow.document.body.appendChild(link);

myWindow.document.body.appendChild(input);

myWindow.focus();

}

});

}

}

}

}

if (d == 8) {

event.preventDefault();

var x = document.getElementsByTagName('a');

f_list = []

for (i = 0; i < x.length; i++) {

y = x[i];

if (y.className == "oe_breadcrumb_item") {

f_list.push(y);

}

}

x = f_list.pop();

if (x) {

x.click();

}

}

if (d == 122) {

event.preventDefault();

var x = document.getElementsByTagName('div');

f_list = []

for (i = 0; i < x.length; i++) {

y = x[i];

if (y.className == "fullscreen") {

y.click();

if(fullscreen_toggle.search==0)

{

$('div.oe_searchview').delay(500).animate({

"top": "-32px"

},"fast");

}

}

}

}

if (!fullscreen_toggle.fullscreen_toggle) {

if (d == 49 | d == 50 | d == 51 | d == 52 | d == 53 | d == 54 | d == 55 | d == 56 | d == 57) {

event.preventDefault();

n = d - 48;

var x = document.getElementsByTagName('a');

for (i = 0; i < x.length; i++) {

y = x[i];

if (y.className == "oe_menu_toggler") {

if (n == i + 1) {

y.click();

}

}

}

}

}

if (d == 188) {

event.preventDefault();

$('.oe_i[data-pager-action="previous"]').each(function() {

if ($(this).parents('div:hidden').length == 0) {

$(this).trigger('click');

}

});

}

if (d == 190) {

event.preventDefault();

$('.oe_i[data-pager-action="next"]').each(function() {

if ($(this).parents('div:hidden').length == 0) {

$(this).trigger('click');

}

});

}

}

if (d == 192) {

if (event.ctrlKey == 1) {

event.preventDefault();

$("div ul li a.oe_menu_leaf:visible:first").focus();

}

}

if (d == 40) {

for (i = 0; i < $("div ul li a.oe_menu_leaf:visible").length; i++) {

if ($("div ul li a.oe_menu_leaf:visible:eq(" + i + ")").is(":focus")) {

event.preventDefault();

var flg = i + 1;

$("div ul li a.oe_menu_leaf:visible:eq(" + flg + ")").focus();

break;

}

}

}

if (d == 38) {

var flg = 0;

for (i = 0; i < $("div ul li a.oe_menu_leaf:visible").length; i++) {

if ($("div ul li a.oe_menu_leaf:visible:eq(" + i + ")").is(":focus")) {

event.preventDefault();

var flg = i - 1;

$("div ul li a.oe_menu_leaf:visible:eq(" + flg + ")").focus();

break;

}

}

}

if (event.ctrlKey != 1) {

if (d == 27) {

event.preventDefault();

var x = document.getElementsByTagName('div');

f_list = []

for (i = 0; i < x.length; i++) {

y = x[i];

if (y.className == "fullscreentrue") {

y.click();

if(fullscreen_toggle.search==0)

{

$('div.oe_searchview').delay(500).animate({

"top": "0px"

},"fast");

}

}

}

}

}

});

});

/*

* end web_keyborad_shortcuts by shaneeb 3

*/

};



/*  end of  js file */

******************************************************************************************************************************

Shortcuts keys

Ctrl + S - For Save Current Object(Require:form in edit mode)

Ctrl + E - For Edit Current Object(Require:form in saved mode)

Ctrl + space - For Create New Record(Open Form).

Alt - In Form View Press Alt key and then press Access Key Passed from Button.

Ctrl + K - Switch to Kanban View.

Ctrl + L - Switch to List View.

Ctrl + ; - Switch to Form View.

Ctrl + F - Focus on Search view(Press This shortcut and start searching).

Ctrl + D - Disable search view (Hide search view).

Ctrl + > - Display Next Page(In Form View).

Ctrl + < - Display Previous Page(In Form View).

Ctrl + Backspace - Go in to on step back on breadcrumb (Example Sales Orders / SO007 / Invoice if you press this shortcut then you will come back at S0007).

Ctrl + Esc - For Discard Current Change (Effect Like press Discard Link)

Ctrl + ↓ (Down Arrow) - Expand lines(Need Group By in Tree View ).

Ctrl + ↑ (Up Arrow) - Collapse All lines(Need Group By in Tree View ).

Ctrl + 1 to Ctrl + 9 - Change Main Menu according to Number Pressed.

For Secondary Menu - Press Ctrl + ` (Key above Tab) and then press ↑ or ↓ for movement and then Press Enter

Ctrl + P - Give Screenshots of Tree Or Form Or Graph ( Without Menus ).

Ctrl + F11 - Enable Full Screen Mode.

Esc - Disable Full Screen Mode.

Search Hint

After installing Search View supports hints. You can redirect to any menu from search view.

How to use

Add any tree in to shortcut(with help of star)

Now open search view and type first character of name of view. Ex.You added "Sales/Sales/Customers" shortcut then type "C"(case sensitive).this will shows a hint.

Now press right arrow key and then press enter, you will redirect to that view.

You can also custom hints from Menu: Setting > Technical > User Interface > Search Hint Setup

*******************************************************************************************************************************************************


0
形象
丢弃
形象
Fabrice Henrion (fhe)
最佳答案

Go to Sales Orders, click on create, the focus is then on the customer, so enter a customer by using the arrows to choose the correct entry in the suggestion list.

Then press 8 times TAB and press ENTER. It will add a line.

Note: In Chrome at least, you will see the succession of links being highlighted when you press TAB.
Note 2: This has been tested on runbot with all certified modules installed and a default configuration. You might have to press a different amount of times on TAB if you have more or less fields available on the sales orders view.

0
形象
丢弃
John
编写者

I was hoping for something along the lines of a 'ALT+KEY' combination. Does odoo support adding this functionality if it doesn't conflict with any browser key combinations?

喜欢讨论吗?不要只阅读,加入进来!

立即创建账户,享受专属功能,与我们的精彩社区互动!

注册
相关帖文 回复 查看 活动
Usability Issues
usability
形象
0
4月 15
4333
General error handling in Odoo is bad
usability errors
形象
0
10月 23
2033
How to add confirm dialog box on button or action ? 已解决
v7 usability
形象
形象
3
4月 23
71250
How to quickly activate DEBUG mode? 已解决
usability quickstart
形象
形象
2
3月 22
7981
Howto create a context dependent block (sidebar or footer) in Webbuilder?
web usability
形象
0
4月 15
4194
社区
  • 教学视频
  • 文档
  • 论坛
开源
  • 下载
  • Github
  • Runbot
  • 翻译
服务
  • Odoo.sh 托管
  • 支持
  • 升级
  • 自定义开发服务
  • 教育
  • 查找会计服务
  • 寻找合作伙伴
  • 成为合作伙伴
关于我们
  • 我们的公司
  • 品牌资产
  • 联系我们
  • 招聘
  • 近期活动
  • 播客
  • 博客
  • 客户
  • 法律 • 隐私
  • 安全
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo致力于为企业管理提供高效智能的开源解决方案,是全球业内高速成长的软件服务商之一,逾七百五十万用户选择Odoo进行数字化升级。通过一系列全业务链覆盖、高度集成、简单易用的商业应用,助力企业实现信息化改革、降本增效并释放公司增长潜力。

Odoo独特的价值在于是一款非常容易使用又完全集成的应用。

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now