跳至內容
Odoo 選單
  • 登入
  • 免費試用
  • 應用程式
    財政
    • 會計
    • 發票
    • 開支報銷
    • 試算表 (BI)
    • 文件管理
    • 電子簽名
    銷售
    • 客戶關係
    • 銷售
    • POS 銷售點管理 - 零售
    • POS 銷售點管理 - 餐廳
    • 訂閱
    • 租賃
    網站
    • 網站製作
    • 電子商務
    • 網誌
    • 討論區
    • 線上客服
    • 網上學習
    供應鏈
    • 庫存
    • 製造管理
    • 產品生命周期
    • 採購
    • 保養維護
    • 品質管理
    人力資源
    • 員工管理
    • 招聘
    • 休假
    • 工作表現評核
    • 內部推薦
    • 車隊管理
    市場推廣
    • 社交媒體推廣
    • 電郵推廣
    • 短訊營銷
    • 活動
    • 自動化推廣
    • 網上調查
    服務
    • 專案管理
    • 工時管理
    • 外勤服務管理
    • 技術支援
    • 工作規劃
    • 預約管理
    生產力
    • 聊天
    • 批核
    • 物聯網
    • VoIP
    • 知識庫
    • WhatsApp
    第三方應用程式 Odoo Studio Odoo 雲端平台
  • 行業
    零售
    • 書店
    • 服裝店
    • 家具店
    • 食品雜貨店
    • 五金店
    • 玩具店
    餐飲及款待
    • 酒吧及酒館
    • 餐廳
    • 快餐
    • 賓館
    • 飲品分銷商
    • 酒店
    房地產
    • 地產代理公司
    • 建築師事務所
    • 建造業
    • 物業管理
    • 園藝
    • 業主聯會
    顧問服務
    • 會計公司
    • Odoo 合作夥伴
    • 市場推廣公司
    • 律師事務所
    • 人才招募
    • 審計及認證
    製造管理
    • 紡織
    • 金屬
    • 家具
    • 食品
    • 啤酒廠
    • 企業禮品
    保健與健身
    • 運動俱樂部
    • 眼鏡店
    • 健身中心
    • 健康從業人員
    • 藥房
    • 髮型屋
    技術行業
    • 雜工
    • IT 硬體與支援
    • 太陽能系統
    • 鞋匠
    • 清潔服務
    • 暖通空調服務
    其他
    • 非牟利組織
    • 環境保護機構
    • 廣告板租賃
    • 攝影服務
    • 自行車租賃
    • 軟體經銷商
    瀏覽所有行業
  • 社群
    學習
    • 教學影片
    • 使用說明
    • 認證
    • 培訓
    • 網誌
    • Podcast
    增強教學效能
    • 教育計劃
    • 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 回覆
8494 瀏覽次數
頭像
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
4354
General error handling in Odoo is bad
usability errors
頭像
0
10月 23
2064
How to add confirm dialog box on button or action ? 已解決
v7 usability
頭像
頭像
3
4月 23
71279
How to quickly activate DEBUG mode? 已解決
usability quickstart
頭像
頭像
2
3月 22
8010
Howto create a context dependent block (sidebar or footer) in Webbuilder?
web usability
頭像
0
4月 15
4247
社群
  • 教學影片
  • 使用說明
  • 討論區
開源
  • 下載
  • GitHub
  • Runbot 測試環境
  • 翻譯
服務
  • odoo.sh 網頁寄存
  • 支援
  • 升級
  • 自訂功能開發
  • 教育及培訓
  • 尋找會計服務
  • 尋找合作夥伴
  • 成為合作夥伴
關於我們
  • 關於 Odoo 公司
  • 品牌資產
  • 聯絡我們
  • 招聘
  • 活動
  • Podcast
  • 網誌
  • 客戶
  • 法律 • 私隱政策
  • 安全性
الْعَرَبيّة 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 是一套開放源碼的商業管理系統,涵蓋你公司全部的營運需要,包括客戶關係管理(CRM)、電子商務、會計、庫存管理、POS(銷售點管理)、專案管理等應用程式。

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