diff --git a/web_shortcuts/LICENSE b/web_shortcuts/LICENSE new file mode 100644 index 00000000..ff64be44 --- /dev/null +++ b/web_shortcuts/LICENSE @@ -0,0 +1,15 @@ +OpenERP, Open Source Management Solution +Copyright © 2010-2011 OpenERP SA (). + +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 Lice +along with this program. If not, see . diff --git a/web_shortcuts/__init__.py b/web_shortcuts/__init__.py new file mode 100644 index 00000000..1d89b4fa --- /dev/null +++ b/web_shortcuts/__init__.py @@ -0,0 +1,23 @@ +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2010 OpenERP s.a. (). +# +# 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 . +# +############################################################################## + +from . import model + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/web_shortcuts/__openerp__.py b/web_shortcuts/__openerp__.py new file mode 100644 index 00000000..6d307f73 --- /dev/null +++ b/web_shortcuts/__openerp__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2010-2011 OpenERP s.a. (). +# +# 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 . +# +############################################################################## +{ + 'name': 'Web Shortcuts', + 'version': '1.0', + 'category': 'Tools', + 'description': """ +Enable shortcuts feature in the web client. +=========================================== + +Add a Shortcut icon in the systray in order to access the user's shortcuts (if any). + +Add a Shortcut icon besides the views title in order to add/remove a shortcut. + """, + 'author': 'OpenERP SA', + 'website': 'http://openerp.com', + 'depends': ['base'], + 'data': ['view/web_shortcuts.xml'], + 'qweb': ['static/src/xml/web_shortcuts.xml'], + 'installable': True, + 'auto_install': False, +} + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/web_shortcuts/i18n/ar.po b/web_shortcuts/i18n/ar.po new file mode 100644 index 00000000..2829cfca --- /dev/null +++ b/web_shortcuts/i18n/ar.po @@ -0,0 +1,25 @@ +# Arabic translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-11-26 18:38+0000\n" +"Last-Translator: kifcaliph \n" +"Language-Team: Arabic \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-27 05:39+0000\n" +"X-Generator: Launchpad (build 16845)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "إضافة / إزالة مختَصَر" diff --git a/web_shortcuts/i18n/bs.po b/web_shortcuts/i18n/bs.po new file mode 100644 index 00000000..1192b929 --- /dev/null +++ b/web_shortcuts/i18n/bs.po @@ -0,0 +1,25 @@ +# Bosnian translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-10-26 01:19+0000\n" +"Last-Translator: Bosko Stojakovic \n" +"Language-Team: Bosnian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Dodaj / Ukloni pračicu..." diff --git a/web_shortcuts/i18n/cs.po b/web_shortcuts/i18n/cs.po new file mode 100644 index 00000000..c470b1bb --- /dev/null +++ b/web_shortcuts/i18n/cs.po @@ -0,0 +1,25 @@ +# Czech translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-02-20 13:43+0000\n" +"Last-Translator: Radomil Urbánek \n" +"Language-Team: Czech \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Přidat / Odebrat zkratku..." diff --git a/web_shortcuts/i18n/da.po b/web_shortcuts/i18n/da.po new file mode 100644 index 00000000..8ca1fccb --- /dev/null +++ b/web_shortcuts/i18n/da.po @@ -0,0 +1,25 @@ +# Danish translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-09-15 20:22+0000\n" +"Last-Translator: Morten Schou \n" +"Language-Team: Danish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Tilføj/fjern genvej ..." diff --git a/web_shortcuts/i18n/de.po b/web_shortcuts/i18n/de.po new file mode 100644 index 00000000..926b73f6 --- /dev/null +++ b/web_shortcuts/i18n/de.po @@ -0,0 +1,25 @@ +# German translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2012-12-21 23:00+0000\n" +"Last-Translator: Ferdinand @ Camptocamp \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Hinzufügen/Entfernen Lesezeichen ..." diff --git a/web_shortcuts/i18n/el.po b/web_shortcuts/i18n/el.po new file mode 100644 index 00000000..ddd90295 --- /dev/null +++ b/web_shortcuts/i18n/el.po @@ -0,0 +1,25 @@ +# Greek translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-09-30 20:14+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Greek \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "" diff --git a/web_shortcuts/i18n/en_GB.po b/web_shortcuts/i18n/en_GB.po new file mode 100644 index 00000000..abb0ddc3 --- /dev/null +++ b/web_shortcuts/i18n/en_GB.po @@ -0,0 +1,25 @@ +# English (United Kingdom) translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-08-23 16:45+0000\n" +"Last-Translator: Andi Chandler \n" +"Language-Team: English (United Kingdom) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Add / Remove Shortcut..." diff --git a/web_shortcuts/i18n/es.po b/web_shortcuts/i18n/es.po new file mode 100644 index 00000000..3167b349 --- /dev/null +++ b/web_shortcuts/i18n/es.po @@ -0,0 +1,25 @@ +# Spanish translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2012-12-21 23:00+0000\n" +"Last-Translator: Pedro Manuel Baeza \n" +"Language-Team: Spanish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Añadir / Eliminar acceso directo..." diff --git a/web_shortcuts/i18n/fi.po b/web_shortcuts/i18n/fi.po new file mode 100644 index 00000000..61b303fa --- /dev/null +++ b/web_shortcuts/i18n/fi.po @@ -0,0 +1,25 @@ +# Finnish translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-11-08 21:06+0000\n" +"Last-Translator: Harri Luuppala \n" +"Language-Team: Finnish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Lisää / Poista pikavalinta..." diff --git a/web_shortcuts/i18n/fr.po b/web_shortcuts/i18n/fr.po new file mode 100644 index 00000000..4c22712f --- /dev/null +++ b/web_shortcuts/i18n/fr.po @@ -0,0 +1,25 @@ +# French translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2012-12-21 23:00+0000\n" +"Last-Translator: WANTELLET Sylvain \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Ajouter / supprimer un raccourci..." diff --git a/web_shortcuts/i18n/gl.po b/web_shortcuts/i18n/gl.po new file mode 100644 index 00000000..b6a61f50 --- /dev/null +++ b/web_shortcuts/i18n/gl.po @@ -0,0 +1,25 @@ +# Galician translation for openobject-addons +# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2014. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2014-02-05 16:52+0000\n" +"Last-Translator: Alejandro Santana \n" +"Language-Team: Galician \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2014-02-06 06:25+0000\n" +"X-Generator: Launchpad (build 16916)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Engadir / Eliminar atallo..." diff --git a/web_shortcuts/i18n/hr.po b/web_shortcuts/i18n/hr.po new file mode 100644 index 00000000..3bf7a375 --- /dev/null +++ b/web_shortcuts/i18n/hr.po @@ -0,0 +1,25 @@ +# Croatian translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2012-12-21 23:00+0000\n" +"Last-Translator: Goran Kliska \n" +"Language-Team: Croatian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Dodaj / ukloni prečac..." diff --git a/web_shortcuts/i18n/hu.po b/web_shortcuts/i18n/hu.po new file mode 100644 index 00000000..9fad2e36 --- /dev/null +++ b/web_shortcuts/i18n/hu.po @@ -0,0 +1,25 @@ +# Hungarian translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-01-04 12:01+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Hungarian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Billentyűkombináció hozzáadása/eltávolítása" diff --git a/web_shortcuts/i18n/it.po b/web_shortcuts/i18n/it.po new file mode 100644 index 00000000..8a7d2d0e --- /dev/null +++ b/web_shortcuts/i18n/it.po @@ -0,0 +1,25 @@ +# Italian translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2012-12-21 23:00+0000\n" +"Last-Translator: Davide Corio - agilebg.com \n" +"Language-Team: Italian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Aggiungi / Rimuovi Scorciatoia..." diff --git a/web_shortcuts/i18n/lt.po b/web_shortcuts/i18n/lt.po new file mode 100644 index 00000000..ae6c868d --- /dev/null +++ b/web_shortcuts/i18n/lt.po @@ -0,0 +1,25 @@ +# Lithuanian translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-04-24 18:29+0000\n" +"Last-Translator: Giedrius Slavinskas - inovera.lt \n" +"Language-Team: Lithuanian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Pridėti / pašalinti trumpinį..." diff --git a/web_shortcuts/i18n/mk.po b/web_shortcuts/i18n/mk.po new file mode 100644 index 00000000..ec0c16b9 --- /dev/null +++ b/web_shortcuts/i18n/mk.po @@ -0,0 +1,25 @@ +# Macedonian translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-03-01 14:20+0000\n" +"Last-Translator: Sofce Dimitrijeva \n" +"Language-Team: Macedonian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Додади / Отстрани кратенка" diff --git a/web_shortcuts/i18n/mn.po b/web_shortcuts/i18n/mn.po new file mode 100644 index 00000000..559d3edf --- /dev/null +++ b/web_shortcuts/i18n/mn.po @@ -0,0 +1,25 @@ +# Mongolian translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-02-07 11:26+0000\n" +"Last-Translator: Tenuun Khangaitan \n" +"Language-Team: Mongolian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Шуут холбоосыг Нэмэх / Устгах ..." diff --git a/web_shortcuts/i18n/nl.po b/web_shortcuts/i18n/nl.po new file mode 100644 index 00000000..655f634a --- /dev/null +++ b/web_shortcuts/i18n/nl.po @@ -0,0 +1,25 @@ +# Dutch translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2012-12-21 23:00+0000\n" +"Last-Translator: Erwin van der Ploeg (Endian Solutions) \n" +"Language-Team: Dutch \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Toevoegen/verwijderen snelkoppeling" diff --git a/web_shortcuts/i18n/pl.po b/web_shortcuts/i18n/pl.po new file mode 100644 index 00000000..4c08366b --- /dev/null +++ b/web_shortcuts/i18n/pl.po @@ -0,0 +1,25 @@ +# Polish translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2012-12-21 23:00+0000\n" +"Last-Translator: Grzegorz Grzelak (OpenGLOBE.pl) \n" +"Language-Team: Polish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Dodaj / Usuń skrót" diff --git a/web_shortcuts/i18n/pt.po b/web_shortcuts/i18n/pt.po new file mode 100644 index 00000000..92d27cb7 --- /dev/null +++ b/web_shortcuts/i18n/pt.po @@ -0,0 +1,25 @@ +# Portuguese translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2012-12-21 23:00+0000\n" +"Last-Translator: Andrei Talpa (multibase.pt) \n" +"Language-Team: Portuguese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Adicionar / Remover atalho..." diff --git a/web_shortcuts/i18n/pt_BR.po b/web_shortcuts/i18n/pt_BR.po new file mode 100644 index 00000000..4b71460a --- /dev/null +++ b/web_shortcuts/i18n/pt_BR.po @@ -0,0 +1,25 @@ +# Brazilian Portuguese translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-07-20 15:14+0000\n" +"Last-Translator: Claudio de Araujo Santos \n" +"Language-Team: Brazilian Portuguese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Adicionar / Remover atalho ..." diff --git a/web_shortcuts/i18n/ro.po b/web_shortcuts/i18n/ro.po new file mode 100644 index 00000000..83732827 --- /dev/null +++ b/web_shortcuts/i18n/ro.po @@ -0,0 +1,25 @@ +# Romanian translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-01-11 12:29+0000\n" +"Last-Translator: ERPSystems.ro \n" +"Language-Team: Romanian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Adauga / Sterge Shortcut..." diff --git a/web_shortcuts/i18n/ru.po b/web_shortcuts/i18n/ru.po new file mode 100644 index 00000000..88cdc97a --- /dev/null +++ b/web_shortcuts/i18n/ru.po @@ -0,0 +1,25 @@ +# Russian translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2012-12-25 12:18+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Russian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Добавить / Удалить ярлык..." diff --git a/web_shortcuts/i18n/sl.po b/web_shortcuts/i18n/sl.po new file mode 100644 index 00000000..47f764b0 --- /dev/null +++ b/web_shortcuts/i18n/sl.po @@ -0,0 +1,25 @@ +# Slovenian translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2012-12-21 23:00+0000\n" +"Last-Translator: Dusan Laznik \n" +"Language-Team: Slovenian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Dodaj / Odstrani bližnjico..." diff --git a/web_shortcuts/i18n/sv.po b/web_shortcuts/i18n/sv.po new file mode 100644 index 00000000..559b58f8 --- /dev/null +++ b/web_shortcuts/i18n/sv.po @@ -0,0 +1,25 @@ +# Swedish translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-01-26 15:07+0000\n" +"Last-Translator: Mikael Dúi Bolinder \n" +"Language-Team: Swedish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Lägg till/ta bort genväg..." diff --git a/web_shortcuts/i18n/th.po b/web_shortcuts/i18n/th.po new file mode 100644 index 00000000..546a300c --- /dev/null +++ b/web_shortcuts/i18n/th.po @@ -0,0 +1,25 @@ +# Thai translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-06-17 05:48+0000\n" +"Last-Translator: Sumonchai ( เหลา ) \n" +"Language-Team: Thai \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "เพิ่ม / ลบ ทางลัด ..." diff --git a/web_shortcuts/i18n/tr.po b/web_shortcuts/i18n/tr.po new file mode 100644 index 00000000..5db7dc1f --- /dev/null +++ b/web_shortcuts/i18n/tr.po @@ -0,0 +1,25 @@ +# Turkish translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-02-06 20:19+0000\n" +"Last-Translator: Ahmet Altınışık \n" +"Language-Team: Turkish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Kısayol Ekle/Kaldır..." diff --git a/web_shortcuts/i18n/vi.po b/web_shortcuts/i18n/vi.po new file mode 100644 index 00000000..a593830c --- /dev/null +++ b/web_shortcuts/i18n/vi.po @@ -0,0 +1,25 @@ +# Vietnamese translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-06-27 16:15+0000\n" +"Last-Translator: Hung Tran \n" +"Language-Team: Vietnamese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "Thêm / Xóa đường dẫn ...." diff --git a/web_shortcuts/i18n/web_shortcuts.pot b/web_shortcuts/i18n/web_shortcuts.pot new file mode 100644 index 00000000..0b1a05dc --- /dev/null +++ b/web_shortcuts/i18n/web_shortcuts.pot @@ -0,0 +1,24 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * web_shortcuts +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-06-07 19:37+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "" + diff --git a/web_shortcuts/i18n/zh_CN.po b/web_shortcuts/i18n/zh_CN.po new file mode 100644 index 00000000..d100b714 --- /dev/null +++ b/web_shortcuts/i18n/zh_CN.po @@ -0,0 +1,25 @@ +# Chinese (Simplified) translation for openobject-addons +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-07-24 13:35+0000\n" +"Last-Translator: 盈通 ccdos \n" +"Language-Team: Chinese (Simplified) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-11-21 06:38+0000\n" +"X-Generator: Launchpad (build 16831)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "添加/删除快捷方式..." diff --git a/web_shortcuts/i18n/zh_TW.po b/web_shortcuts/i18n/zh_TW.po new file mode 100644 index 00000000..c9bbf4f5 --- /dev/null +++ b/web_shortcuts/i18n/zh_TW.po @@ -0,0 +1,25 @@ +# Chinese (Traditional) translation for openobject-addons +# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2013. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2013-06-07 19:37+0000\n" +"PO-Revision-Date: 2013-12-29 17:05+0000\n" +"Last-Translator: Andy Cheng \n" +"Language-Team: Chinese (Traditional) \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2013-12-30 05:07+0000\n" +"X-Generator: Launchpad (build 16877)\n" + +#. module: web_shortcuts +#. openerp-web +#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21 +#, python-format +msgid "Add / Remove Shortcut..." +msgstr "新增/移除捷徑..." diff --git a/web_shortcuts/model/__init__.py b/web_shortcuts/model/__init__.py new file mode 100644 index 00000000..75d5fe1a --- /dev/null +++ b/web_shortcuts/model/__init__.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# +# +# Authors: Adrien Peiffer +# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) +# All Rights Reserved +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs. +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly advised to contact a Free Software +# Service Company. +# +# 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 . +# +# + +from . import view_sc diff --git a/web_shortcuts/model/view_sc.py b/web_shortcuts/model/view_sc.py new file mode 100644 index 00000000..0e79788b --- /dev/null +++ b/web_shortcuts/model/view_sc.py @@ -0,0 +1,67 @@ +# -*- coding: utf-8 -*- +# +# +# Authors: Adrien Peiffer +# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu) +# All Rights Reserved +# +# WARNING: This program as such is intended to be used by professional +# programmers who take the whole responsibility of assessing all potential +# consequences resulting from its eventual inadequacies and bugs. +# End users who are looking for a ready-to-use solution with commercial +# guarantees and support are strongly advised to contact a Free Software +# Service Company. +# +# 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 . +# +# +from openerp.osv import orm, fields + + +class view_sc(orm.Model): + _name = 'ir.ui.view_sc' + _columns = { + 'name': fields.char('Shortcut Name', size=64), # Kept for backwards compatibility only - resource name used instead (translatable) + 'res_id': fields.integer('Resource Ref.', help="Reference of the target resource, whose model/table depends on the 'Resource Name' field."), + 'sequence': fields.integer('Sequence'), + 'user_id': fields.many2one('res.users', 'User Ref.', required=True, ondelete='cascade', select=True), + 'resource': fields.char('Resource Name', size=64, required=True, select=True) + } + + def _auto_init(self, cr, context=None): + super(view_sc, self)._auto_init(cr, context) + cr.execute('SELECT indexname FROM pg_indexes WHERE indexname = \'ir_ui_view_sc_user_id_resource\'') + if not cr.fetchone(): + cr.execute('CREATE INDEX ir_ui_view_sc_user_id_resource ON ir_ui_view_sc (user_id, resource)') + + def get_sc(self, cr, uid, user_id, model='ir.ui.menu', context=None): + ids = self.search(cr, uid, [('user_id','=',user_id),('resource','=',model)], context=context) + results = self.read(cr, uid, ids, ['res_id'], context=context) + name_map = dict(self.pool.get(model).name_get(cr, uid, [x['res_id'] for x in results], context=context)) + # Make sure to return only shortcuts pointing to exisintg menu items. + filtered_results = filter(lambda result: result['res_id'] in name_map, results) + for result in filtered_results: + result.update(name=name_map[result['res_id']]) + return filtered_results + + _order = 'sequence,name' + _defaults = { + 'resource': 'ir.ui.menu', + 'user_id': lambda obj, cr, uid, context: uid, + } + _sql_constraints = [ + ('shortcut_unique', 'unique(res_id, resource, user_id)', 'Shortcut for this menu already exists!'), + ] + +# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/web_shortcuts/static/src/css/web_shortcuts.css b/web_shortcuts/static/src/css/web_shortcuts.css new file mode 100644 index 00000000..ae5a3cef --- /dev/null +++ b/web_shortcuts/static/src/css/web_shortcuts.css @@ -0,0 +1,82 @@ +/* Shortcuts*/ +.oe_systray_shortcuts .oe_star_off { + color: #eee; +} +.oe_shortcuts_toggle { + height: 20px; + margin-top: 3px; + padding: 0; + width: 24px; + cursor: pointer; + display: block; + background: url(/web/static/src/img/add-shortcut.png) no-repeat center center; + float: left; +} +.oe_shortcuts_remove{ + background: url(/web/static/src/img/remove-shortcut.png) no-repeat center center; +} +.oe_shortcuts { + position: absolute; + margin: 0; + padding: 6px 15px; + top: 37px; + left: 197px; + right: 0; + height: 17px; + line-height: 1.2; +} +.oe_shortcuts ul { + display: block; + overflow: hidden; + list-style: none; + white-space: nowrap; + padding: 0; + margin: 0; +} +.oe_shortcuts li { + cursor: pointer; + display: -moz-inline-stack; + display: inline-block; + display: inline; /*IE7 */ + color: #fff; + text-align: center; + border-left: 1px solid #909090; + padding: 0 4px; + font-size: 80%; + font-weight: normal; + vertical-align: top; +} + +.oe_shortcuts li:hover { + background-color: #666; +} +.oe_shortcuts li:first-child { + border-left: none; + padding-left: 0; +} + + +.openerp .oe_topbar .oe_topbar_item { + display: block; + padding: 5px 10px 7px; + line-height: 20px; + height: 20px; + text-decoration: none; + color: #eeeeee; + vertical-align: top; + text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2); + -webkit-transition: all 0.2s ease-out; + -moz-transition: all 0.2s ease-out; + -ms-transition: all 0.2s ease-out; + -o-transition: all 0.2s ease-out; + transition: all 0.2s ease-out; +} +.openerp .oe_topbar .oe_topbar_item:hover { + background: rgba(0, 0, 0, 0.2); + text-shadow: black 0px 0px 3px; + color: white; + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) inset; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) inset; + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4) inset; +} + diff --git a/web_shortcuts/static/src/img/icon.png b/web_shortcuts/static/src/img/icon.png new file mode 100644 index 00000000..44347e95 Binary files /dev/null and b/web_shortcuts/static/src/img/icon.png differ diff --git a/web_shortcuts/static/src/js/web_shortcuts.js b/web_shortcuts/static/src/js/web_shortcuts.js new file mode 100644 index 00000000..af763462 --- /dev/null +++ b/web_shortcuts/static/src/js/web_shortcuts.js @@ -0,0 +1,152 @@ +/*############################################################################ +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2011-2012 OpenERP SA (). +# +# 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 . +# +############################################################################*/ + +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('ir.ui.view_sc'); + }, + 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_sc', [ + instance.session.uid, + 'ir.ui.menu', + 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, + 'res_id': self.session.active_id, + 'resource': 'ir.ui.menu', + 'name': self.action.name + }); + } + $shortcut_toggle.toggleClass("oe_shortcuts_remove"); + }); + } + } +}); + +}; diff --git a/web_shortcuts/static/src/xml/web_shortcuts.xml b/web_shortcuts/static/src/xml/web_shortcuts.xml new file mode 100644 index 00000000..8500eb63 --- /dev/null +++ b/web_shortcuts/static/src/xml/web_shortcuts.xml @@ -0,0 +1,27 @@ + + + + + + + +
  • + + + +
  • +
    + + + + + +
    diff --git a/web_shortcuts/view/web_shortcuts.xml b/web_shortcuts/view/web_shortcuts.xml new file mode 100644 index 00000000..39404544 --- /dev/null +++ b/web_shortcuts/view/web_shortcuts.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file