[MERGE] Sync with trunk until revision 8934

bzr revid: tde@openerp.com-20131007081153-qx4ybltaxbuy3thp
This commit is contained in:
Thibault Delavallée 2013-10-07 10:11:53 +02:00
commit dd2dd19b23
45 changed files with 13 additions and 1086 deletions

View File

@ -114,19 +114,6 @@ def real_id2base_calendar_id(real_id, recurrent_date):
return '%d-%s' % (real_id, recurrent_date)
return real_id
def _links_get(self, cr, uid, context=None):
"""
Get request link.
@param cr: the current row, from the database cursor
@param uid: the current user's ID for security checks
@param context: a standard dictionary for contextual values
@return: list of dictionary which contain object and name and id
"""
obj = self.pool.get('res.request.link')
ids = obj.search(cr, uid, [])
res = obj.read(cr, uid, ids, ['object', 'name'], context=context)
return [(r['object'], r['name']) for r in res]
html_invitation = """
<html>
<head>
@ -307,19 +294,6 @@ class calendar_attendee(osv.osv):
return result
def _links_get(self, cr, uid, context=None):
"""
Get request link for ref field in calendar attendee.
@param cr: the current row, from the database cursor
@param uid: the current user's id for security checks
@param context: A standard dictionary for contextual values
@return: list of dictionary which contain object and name and id
"""
obj = self.pool.get('res.request.link')
ids = obj.search(cr, uid, [])
res = obj.read(cr, uid, ids, ['object', 'name'], context=context)
return [(r['object'], r['name']) for r in res]
def _lang_get(self, cr, uid, context=None):
"""
Get language for language selection field.
@ -385,7 +359,7 @@ property or property parameter."),
'event_end_date': fields.function(_compute_data, \
string='Event End Date', type="datetime", \
multi='event_end_date'),
'ref': fields.reference('Event Ref', selection=_links_get, size=128),
'ref': fields.reference('Event Ref', selection=openerp.addons.base.res.res_request.referencable_models, size=128),
'availability': fields.selection([('free', 'Free'), ('busy', 'Busy')], 'Free/Busy', readonly="True"),
}
_defaults = {

View File

@ -258,13 +258,6 @@ class crm_case_resource_type(osv.osv):
'section_id': fields.many2one('crm.case.section', 'Sales Team'),
}
def _links_get(self, cr, uid, context=None):
"""Gets links value for reference field"""
obj = self.pool.get('res.request.link')
ids = obj.search(cr, uid, [])
res = obj.read(cr, uid, ids, ['object', 'name'], context)
return [(r['object'], r['name']) for r in res]
class crm_payment_mode(osv.osv):
""" Payment Mode for Fund """
_name = "crm.payment.mode"

View File

@ -23,6 +23,7 @@ import crm
from datetime import datetime
from operator import itemgetter
import openerp
from openerp import SUPERUSER_ID
from openerp import tools
from openerp.addons.base.res.res_partner import format_address
@ -258,8 +259,8 @@ class crm_lead(format_address, osv.osv):
# Only used for type opportunity
'probability': fields.float('Success Rate (%)', group_operator="avg"),
'planned_revenue': fields.float('Expected Revenue', track_visibility='always'),
'ref': fields.reference('Reference', selection=crm._links_get, size=128),
'ref2': fields.reference('Reference 2', selection=crm._links_get, size=128),
'ref': fields.reference('Reference', selection=openerp.addons.base.res.res_request.referencable_models),
'ref2': fields.reference('Reference 2', selection=openerp.addons.base.res.res_request.referencable_models),
'phone': fields.char("Phone", size=64),
'date_deadline': fields.date('Expected Closing', help="Estimate of the date on which the opportunity will be won."),
'date_action': fields.date('Next Action Date', select=True),

View File

@ -19,6 +19,7 @@
#
##############################################################################
import openerp
from openerp.addons.crm import crm
from openerp.osv import fields, osv
from openerp import tools
@ -83,7 +84,7 @@ class crm_claim(osv.osv):
'date_deadline': fields.date('Deadline'),
'date_closed': fields.datetime('Closed', readonly=True),
'date': fields.datetime('Claim Date', select=True),
'ref' : fields.reference('Reference', selection=crm._links_get, size=128),
'ref': fields.reference('Reference', selection=openerp.addons.base.res.res_request.referencable_models),
'categ_id': fields.many2one('crm.case.categ', 'Category', \
domain="[('section_id','=',section_id),\
('object_id.model', '=', 'crm.claim')]"),

View File

@ -19,6 +19,7 @@
#
##############################################################################
import openerp
from openerp.addons.crm import crm
from openerp.osv import fields, osv
from openerp import tools
@ -53,8 +54,8 @@ class crm_helpdesk(osv.osv):
'email_cc': fields.text('Watchers Emails', size=252 , help="These email addresses will be added to the CC field of all inbound and outbound emails for this record before being sent. Separate multiple email addresses with a comma"),
'email_from': fields.char('Email', size=128, help="Destination email for email gateway"),
'date': fields.datetime('Date'),
'ref' : fields.reference('Reference', selection=crm._links_get, size=128),
'ref2' : fields.reference('Reference 2', selection=crm._links_get, size=128),
'ref': fields.reference('Reference', selection=openerp.addons.base.res.res_request.referencable_models),
'ref2': fields.reference('Reference 2', selection=openerp.addons.base.res.res_request.referencable_models),
'channel_id': fields.many2one('crm.case.channel', 'Channel', help="Communication channel."),
'planned_revenue': fields.float('Planned Revenue'),
'planned_cost': fields.float('Planned Costs'),

View File

@ -347,26 +347,9 @@ class res_users(osv.osv):
_name = 'res.users'
_inherit = 'res.users'
def create(self, cr, uid, data, context=None):
user_id = super(res_users, self).create(cr, uid, data, context=context)
# add shortcut unless 'noshortcut' is True in context
if not(context and context.get('noshortcut', False)):
data_obj = self.pool.get('ir.model.data')
try:
data_id = data_obj._get_id(cr, uid, 'hr', 'ir_ui_view_sc_employee')
view_id = data_obj.browse(cr, uid, data_id, context=context).res_id
self.pool.get('ir.ui.view_sc').copy(cr, uid, view_id, default = {
'user_id': user_id}, context=context)
except:
# Tolerate a missing shortcut. See product/product.py for similar code.
_logger.debug('Skipped meetings shortcut for user "%s".', data.get('name','<new'))
return user_id
_columns = {
'employee_ids': fields.one2many('hr.employee', 'user_id', 'Related employees'),
}
}

View File

@ -224,13 +224,6 @@
<menuitem action="open_view_employee_list_my" id="menu_open_view_employee_list_my" sequence="3" parent="menu_hr_main"/>
<record id="ir_ui_view_sc_employee" model="ir.ui.view_sc">
<field name="name">Employees</field>
<field name="resource">ir.ui.menu</field>
<field name="user_id" ref="base.user_root"/>
<field name="res_id" ref="hr.menu_open_view_employee_list_my"/>
</record>
<!-- Employee architecture -->
<record id="view_partner_tree2" model="ir.ui.view">
<field name="name">hr.employee.tree</field>

View File

@ -54,7 +54,6 @@ Print product labels with barcode.
'product_data.xml',
'product_report.xml',
'product_view.xml',
'product_shortcut_data.xml',
'pricelist_view.xml',
'partner_view.xml',
'process/product_process.xml'

View File

@ -1,13 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data noupdate="1">
<record id="ir_ui_view_sc_product0" model="ir.ui.view_sc">
<field name="name">Products</field>
<field name="resource">ir.ui.menu</field>
<field name="user_id" ref="base.user_root"/>
<field name="res_id" ref="product.menu_products"/>
</record>
</data>
</openerp>

View File

@ -251,7 +251,7 @@
<field name="view_mode">tree,form,calendar</field>
<field name="search_view_id" ref="view_resource_calendar_leaves_search"/>
</record>
<menuitem id="menu_resource_config" name="Resource" parent="base.next_id_4" sequence="5"/>
<menuitem id="menu_resource_config" name="Resource" parent="base.menu_custom" sequence="30"/>
<menuitem action="resource.action_resource_calendar_leave_tree" id="menu_view_resource_calendar_leaves_search" parent="menu_resource_config" sequence="1"/>
</data>
</openerp>

View File

@ -289,32 +289,14 @@ class share_wizard(osv.TransientModel):
return created_ids, existing_ids
def _create_shortcut(self, cr, uid, values, context=None):
def _create_action(self, cr, uid, values, context=None):
if context is None:
context = {}
new_context = context.copy()
for key in context:
if key.startswith('default_'):
del new_context[key]
dataobj = self.pool.get('ir.model.data')
menu_id = dataobj._get_id(cr, uid, 'base', 'menu_administration_shortcut')
shortcut_menu_id = int(dataobj.read(cr, uid, menu_id, ['res_id'], new_context)['res_id'])
action_id = self.pool.get('ir.actions.act_window').create(cr, UID_ROOT, values, new_context)
menu_data = {'name': values['name'],
'sequence': 10,
'action': 'ir.actions.act_window,'+str(action_id),
'parent_id': shortcut_menu_id,
'icon': 'STOCK_JUSTIFY_FILL'}
menu_obj = self.pool.get('ir.ui.menu')
menu_id = menu_obj.create(cr, UID_ROOT, menu_data)
sc_data = {'name': values['name'], 'sequence': UID_ROOT,'res_id': menu_id }
self.pool.get('ir.ui.view_sc').create(cr, uid, sc_data, new_context)
# update menu cache
user_groups = set(self.pool.get('res.users').read(cr, UID_ROOT, uid, ['groups_id'])['groups_id'])
key = (cr.dbname, shortcut_menu_id, tuple(user_groups))
menu_obj._cache[key] = True
return action_id
def _cleanup_action_context(self, context_str, user_id):
@ -383,7 +365,7 @@ class share_wizard(osv.TransientModel):
values = self._shared_action_def(cr, uid, wizard_data, context=None)
user_obj = self.pool.get('res.users')
for user_id in user_ids:
action_id = self._create_shortcut(cr, user_id, values)
action_id = self._create_action(cr, user_id, values)
if make_home:
# We do this only for new share users, as existing ones already have their initial home
# action. Resetting to the default menu does not work well as the menu is rather empty

View File

@ -1,15 +0,0 @@
OpenERP, Open Source Management Solution
Copyright © 2010-2011 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 Lice
along with this program. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,21 +0,0 @@
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010 OpenERP s.a. (<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/>.
#
##############################################################################
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,44 +0,0 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010-2011 OpenERP s.a. (<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/>.
#
##############################################################################
{
'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': [],
'js' : ['static/src/js/web_shortcuts.js'],
'css' : ['static/src/css/web_shortcuts.css'],
'qweb' : ['static/src/xml/*.xml'],
'installable': True,
'auto_install': False,
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2013-02-20 13:43+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Czech <cs@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2013-09-15 20:22+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Danish <da@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-16 05:42+0000\n"
"X-Generator: Launchpad (build 16761)\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 ..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2012-12-04 07:22+0000\n"
"Last-Translator: Ferdinand @ Camptocamp <Unknown>\n"
"Language-Team: German <de@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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 ..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2013-09-30 20:14+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Greek <el@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-10-01 05:18+0000\n"
"X-Generator: Launchpad (build 16774)\n"
#. module: web_shortcuts
#. openerp-web
#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21
#, python-format
msgid "Add / Remove Shortcut..."
msgstr ""

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2013-08-23 16:45+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2012-12-12 12:54+0000\n"
"Last-Translator: Pedro Manuel Baeza <pedro.baeza@gmail.com>\n"
"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2012-12-01 08:11+0000\n"
"Last-Translator: WANTELLET Sylvain <Swantellet@tetra-info.com>\n"
"Language-Team: French <fr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2012-12-10 06:51+0000\n"
"Last-Translator: Goran Kliska <gkliska@gmail.com>\n"
"Language-Team: Croatian <hr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2013-01-04 12:01+0000\n"
"Last-Translator: krnkris <Unknown>\n"
"Language-Team: Hungarian <hu@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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"

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2012-11-29 07:33+0000\n"
"Last-Translator: Davide Corio <enlightx@gmail.com>\n"
"Language-Team: Italian <it@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2013-04-24 18:29+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Lithuanian <lt@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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į..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2013-03-01 14:20+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Macedonian <mk@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: web_shortcuts
#. openerp-web
#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21
#, python-format
msgid "Add / Remove Shortcut..."
msgstr "Додади / Отстрани кратенка"

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2013-02-07 11:26+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Mongolian <mn@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: web_shortcuts
#. openerp-web
#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21
#, python-format
msgid "Add / Remove Shortcut..."
msgstr "Шуут холбоосыг Нэмэх / Устгах ..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2012-11-27 19:29+0000\n"
"Last-Translator: Erwin van der Ploeg (BAS Solutions) <Unknown>\n"
"Language-Team: Dutch <nl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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"

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2012-12-17 10:08+0000\n"
"Last-Translator: Grzegorz Grzelak (OpenGLOBE.pl) <grzegorz@openglobe.pl>\n"
"Language-Team: Polish <pl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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"

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2012-12-05 10:09+0000\n"
"Last-Translator: Andrei Talpa (multibase.pt) <andrei.talpa@multibase.pt>\n"
"Language-Team: Portuguese <pt@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2012-11-29 23:53+0000\n"
"Last-Translator: Luiz Fernando M.França (Sig Informática) <Unknown>\n"
"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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 ..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2012-12-10 07:32+0000\n"
"Last-Translator: ERPSystems.ro <mihai@erpsystems.ro>\n"
"Language-Team: Romanian <ro@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2012-12-25 12:18+0000\n"
"Last-Translator: Chertykov Denis <chertykov@gmail.com>\n"
"Language-Team: Russian <ru@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: web_shortcuts
#. openerp-web
#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21
#, python-format
msgid "Add / Remove Shortcut..."
msgstr "Добавить / Удалить ярлык..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2012-12-18 22:32+0000\n"
"Last-Translator: Dušan Laznik (Mentis) <laznik@mentis.si>\n"
"Language-Team: Slovenian <sl@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2013-01-26 15:07+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Swedish <sv@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2013-06-17 05:48+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Thai <th@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: web_shortcuts
#. openerp-web
#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21
#, python-format
msgid "Add / Remove Shortcut..."
msgstr "เพิ่ม / ลบ ทางลัด ..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2013-02-04 14:33+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Turkish <tr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2013-06-27 16:15+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Vietnamese <vi@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\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 ...."

View File

@ -1,24 +0,0 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * web_shortcuts
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 7.0alpha\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2012-12-21 17:06+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 ""

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2012-11-27 14:18+0000\n"
"Last-Translator: 盈通 ccdos <ccdos@intoerp.com>\n"
"Language-Team: Chinese (Simplified) <zh_CN@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: web_shortcuts
#. openerp-web
#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21
#, python-format
msgid "Add / Remove Shortcut..."
msgstr "添加/删除快捷方式..."

View File

@ -1,25 +0,0 @@
# 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 <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:06+0000\n"
"PO-Revision-Date: 2013-01-31 03:39+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Chinese (Traditional) <zh_TW@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-12 06:37+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: web_shortcuts
#. openerp-web
#: code:addons/web_shortcuts/static/src/xml/web_shortcuts.xml:21
#, python-format
msgid "Add / Remove Shortcut..."
msgstr "新增/移除 捷徑..."

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

View File

@ -1,60 +0,0 @@
/* 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;
}
.oe_systray_shortcuts_items > li > a:hover {
overflow:visible;
white-space: normal;
}

View File

@ -1,149 +0,0 @@
/*############################################################################
#
# 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/>.
#
############################################################################*/
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'})
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});
}
});
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");
});
}
}
});
};

View File

@ -1,24 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- vim:fdl=1:
-->
<templates id="template" xml:space="preserve">
<t t-name="Systray.Shortcuts">
<div class="oe_systray_shortcuts oe_topbar_item oe_dropdown_toggle">
<span class="oe_e oe_star_off">7</span>
<ul class="oe_systray_shortcuts_items oe_dropdown_menu"/>
</div>
</t>
<t t-name="Systray.Shortcuts.Item">
<li>
<a href="#" t-att-data-id="shortcut.res_id" t-att-data-shortcut-id="shortcut.id">
<t t-esc="shortcut.name"/>
</a>
</li>
</t>
<t t-extend="ViewManagerAction">
<t t-jquery="h2.oe_view_title" t-operation="prepend">
<a t-if="widget.flags.display_title !== false" class="oe_shortcuts_toggle" title="Add / Remove Shortcut..."
href="javascript: void(0)"> </a>
</t>
</t>
</templates>