From ec5d70238cc5f87b915db5cbaf6a361081f49628 Mon Sep 17 00:00:00 2001 From: Alexis de Lattre Date: Mon, 15 Apr 2013 17:01:48 +0200 Subject: [PATCH] Backport all new features/enhancements of the trunk branch to OpenERP 6.0. --- asterisk_click2dial/__init__.py | 2 +- asterisk_click2dial/__terp__.py | 40 +- asterisk_click2dial/asterisk_click2dial.py | 458 ++++++++----- .../asterisk_click2dial_demo.xml | 7 +- asterisk_click2dial/asterisk_server_view.xml | 15 +- .../i18n/asterisk_click2dial.pot | 628 +++++++++++------- asterisk_click2dial/i18n/bg.po | 435 ++++++++++++ asterisk_click2dial/i18n/es.po | 477 +++++++++++++ asterisk_click2dial/i18n/fr_FR.po | 608 +++++++++++------ asterisk_click2dial/i18n/hr.po | 434 ++++++++++++ asterisk_click2dial/i18n/pt_BR.po | 444 +++++++++++++ asterisk_click2dial/res_partner_view.xml | 36 +- asterisk_click2dial/res_users_view.xml | 15 +- asterisk_click2dial/scripts/get_cid_name.py | 101 ++- .../scripts/get_cid_name_timeout.sh | 13 +- .../security/asterisk_server_security.xml | 2 +- asterisk_click2dial/wizard/__init__.py | 23 + .../wizard/open_calling_partner.py | 209 ++++++ .../wizard/open_calling_partner_view.xml | 67 ++ .../wizard/reformat_all_phonenumbers.py | 67 ++ .../wizard/reformat_all_phonenumbers_view.xml | 39 ++ asterisk_click2dial_crm/__init__.py | 11 +- asterisk_click2dial_crm/__terp__.py | 64 ++ .../asterisk_click2dial_crm.py | 77 +++ .../i18n/asterisk_click2dial_crm.pot | 78 ++- asterisk_click2dial_crm/i18n/fr.po | 78 +++ .../res_partner_address.py | 110 --- asterisk_click2dial_crm/res_users_view.xml | 41 ++ .../{__openerp__.py => wizard/__init__.py} | 29 +- .../wizard/create_crm_phonecall.py | 78 +++ .../wizard/create_crm_phonecall_view.xml | 37 ++ .../wizard/open_calling_partner_view.xml | 30 + 32 files changed, 3889 insertions(+), 864 deletions(-) create mode 100644 asterisk_click2dial/i18n/bg.po create mode 100644 asterisk_click2dial/i18n/es.po create mode 100644 asterisk_click2dial/i18n/hr.po create mode 100644 asterisk_click2dial/i18n/pt_BR.po create mode 100644 asterisk_click2dial/wizard/__init__.py create mode 100644 asterisk_click2dial/wizard/open_calling_partner.py create mode 100644 asterisk_click2dial/wizard/open_calling_partner_view.xml create mode 100644 asterisk_click2dial/wizard/reformat_all_phonenumbers.py create mode 100644 asterisk_click2dial/wizard/reformat_all_phonenumbers_view.xml create mode 100644 asterisk_click2dial_crm/__terp__.py create mode 100644 asterisk_click2dial_crm/asterisk_click2dial_crm.py create mode 100644 asterisk_click2dial_crm/i18n/fr.po delete mode 100644 asterisk_click2dial_crm/res_partner_address.py create mode 100644 asterisk_click2dial_crm/res_users_view.xml rename asterisk_click2dial_crm/{__openerp__.py => wizard/__init__.py} (52%) create mode 100644 asterisk_click2dial_crm/wizard/create_crm_phonecall.py create mode 100644 asterisk_click2dial_crm/wizard/create_crm_phonecall_view.xml create mode 100644 asterisk_click2dial_crm/wizard/open_calling_partner_view.xml diff --git a/asterisk_click2dial/__init__.py b/asterisk_click2dial/__init__.py index 49993e0..36872e9 100644 --- a/asterisk_click2dial/__init__.py +++ b/asterisk_click2dial/__init__.py @@ -20,4 +20,4 @@ ############################################################################## import asterisk_click2dial - +import wizard diff --git a/asterisk_click2dial/__terp__.py b/asterisk_click2dial/__terp__.py index 0efce62..630368a 100644 --- a/asterisk_click2dial/__terp__.py +++ b/asterisk_click2dial/__terp__.py @@ -22,29 +22,29 @@ { 'name': 'Asterisk Click2dial', - 'version': '0.3', - 'category': 'Generic Modules/Others', + 'version': '0.4', + 'category': 'Extra Tools', 'license': 'AGPL-3', - 'description': """This module adds a 'dial' button in the partner address -view so that users can directly dial a phone number through Asterisk. This feature is usually known as 'click2dial'. + 'description': """This module adds 3 functionnalities : -Here is how it works : -1) In OpenERP, the user clicks on the 'dial' button next to a phone number field in the Partner address view. -2) Asterisk makes the user's phone ring. -3) The user answers his own phone (if he doesn't, the process stops here). -4) Asterisk dials the phone number found in OpenERP in place of the user. -5) If the remote party answers, the user can talk to his correspondent. +1) It adds a 'dial' button in the partner address form view so that users can directly dial a phone number through Asterisk. This feature is usually known as 'click2dial'. Here is how it works : +. In OpenERP, the user clicks on the 'dial' button next to a phone number field in the partner address view. +. OpenERP connects to the Asterisk Manager Interface and Asterisk makes the user's phone ring. +. The user answers his own phone (if he doesn't, the process stops here). +. Asterisk dials the phone number found in OpenERP in place of the user. +. If the remote party answers, the user can talk to his correspondent. -This module also adds the ability to show the name of the calling party on incoming phone calls if the presented -phone number is present in the Partner addresses of OpenERP. +2) It adds the ability to show the name of the calling party on the screen of your IP phone on incoming phone calls if the presented +phone number is present in the partner addresses of OpenERP. Here is how it works : +. On incoming phone calls, the Asterisk dialplan executes an AGI script "get_cid_name_timeout.sh". +. The "get_cid_name_timeout.sh" script calls the "get_cid_name.py" script with a short timeout. +. The "get_cid_name.py" script will make an XML-RPC request on the OpenERP server to try to find the name of the person corresponding to the phone number presented by the calling party. +. If it finds the name, it is set as the CallerID name of the call, so as to be presented on the IP phone of the user. -Here is how it works : -1) On incoming phone calls, the Asterisk dialplan executes an AGI "get_cid_name_timeout.sh". -2) The "get_cid_name_timeout.sh" script calls the "get_cid_name.py" script with a short timeout. -3) The "get_cid_name.py" script will make an XML-RPC request on the OpenERP server to try to find the name - of the person corresponding to the phone number presented by the calling party. -4) If it finds the name, it is add as CallerID name of the call, so as to be presented on the IP phone - of the user. +3) It adds a button "Open calling partner" in the menu "Sales > Address book" to get the partner corresponding to the calling party in one click. Here is how it works : +. When the user clicks on the "Open calling partner" button, OpenERP sends a query to the Asterisk Manager Interface to get a list of the current phone calls +. If it finds a phone call involving the user's phone, it gets the phone number of the calling party +. It searches the phone number of the calling party in the Partner addresses of OpenERP. If a record matches, it shows the name of the related Partner and proposes to open it, or open its related sale orders or invoices. If no record matches, it proposes to create a new Contact with the presented phone number as 'Phone' or 'Mobile' number or update an existing Contact. A detailed documentation for this module is available on the Akretion Web site : http://www.akretion.com/en/products-and-services/openerp-asterisk-voip-connector """, 'author': 'Akretion', @@ -55,6 +55,8 @@ A detailed documentation for this module is available on the Akretion Web site : 'asterisk_server_view.xml', 'res_users_view.xml', 'res_partner_view.xml', + 'wizard/open_calling_partner_view.xml', + 'wizard/reformat_all_phonenumbers_view.xml', 'security/asterisk_server_security.xml', ], 'demo_xml': ['asterisk_click2dial_demo.xml'], diff --git a/asterisk_click2dial/asterisk_click2dial.py b/asterisk_click2dial/asterisk_click2dial.py index ba9d73e..70f7929 100644 --- a/asterisk_click2dial/asterisk_click2dial.py +++ b/asterisk_click2dial/asterisk_click2dial.py @@ -2,7 +2,7 @@ ############################################################################## # # Asterisk Click2dial module for OpenERP -# Copyright (C) 2010-2012 Alexis de Lattre +# Copyright (C) 2010-2013 Alexis de Lattre # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -20,15 +20,18 @@ ############################################################################## from osv import osv, fields -# Lib required to open a socket (needed to communicate with Asterisk server) -import socket # Lib required to print logs import netsvc # Lib to translate error messages from tools.translate import _ -# Lib for regexp -import re +# Lib for phone number reformating -> pip install phonenumbers +import phonenumbers +# Lib py-asterisk from http://code.google.com/p/py-asterisk/ +# We need a version which has this commit : http://code.google.com/p/py-asterisk/source/detail?r=8d0e1c941cce727c702582f3c9fcd49beb4eeaa4 +# so a version after Nov 20th, 2012 +from Asterisk import Manager +logger = netsvc.Logger() class asterisk_server(osv.osv): '''Asterisk server object, to store all the parameters of the Asterisk IPBXs''' @@ -43,24 +46,25 @@ class asterisk_server(osv.osv): 'national_prefix': fields.char('National prefix', size=4, help="Prefix for national phone calls (don't include the 'out prefix'). For e.g., in France, the phone numbers look like '01 41 98 12 42' : the National prefix is '0'."), 'international_prefix': fields.char('International prefix', required=True, size=4, help="Prefix to add to make international phone calls (don't include the 'out prefix'). For e.g., in France, the International prefix is '00'."), 'country_prefix': fields.char('My country prefix', required=True, size=4, help="Phone prefix of the country where the Asterisk server is located. For e.g. the phone prefix for France is '33'. If the phone number to dial starts with the 'My country prefix', OpenERP will remove the country prefix from the phone number and add the 'out prefix' followed by the 'national prefix'. If the phone number to dial doesn't start with the 'My country prefix', OpenERP will add the 'out prefix' followed by the 'international prefix'."), - 'national_format_allowed': fields.boolean('National format allowed ?', help="Do we allow to use click2dial on phone numbers written in national format, e.g. 01 41 98 12 42, or only in the international format, e.g. +33 1 41 98 12 42 ?"), 'login': fields.char('AMI login', size=30, required=True, help="Login that OpenERP will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server."), 'password': fields.char('AMI password', size=30, required=True, help="Password that Asterisk will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server."), 'context': fields.char('Dialplan context', size=50, required=True, help="Asterisk dialplan context from which the calls will be made. Refer to /etc/asterisk/extensions.conf on your Asterisk server."), 'wait_time': fields.integer('Wait time (sec)', required=True, help="Amount of time (in seconds) Asterisk will try to reach the user's phone before hanging up."), 'extension_priority': fields.integer('Extension priority', required=True, help="Priority of the extension in the Asterisk dialplan. Refer to /etc/asterisk/extensions.conf on your Asterisk server."), - 'alert_info': fields.char('Alert-Info SIP header', size=40, help="Set Alert-Info header in SIP request to user's IP Phone. If empty, the Alert-Info header will not be added. You can use it to have a special ring tone for click2dial, for example you could choose a silent ring tone."), + 'alert_info': fields.char('Alert-Info SIP header', size=255, help="Set Alert-Info header in SIP request to user's IP Phone for the click2dial feature. If empty, the Alert-Info header will not be added. You can use it to have a special ring tone for click2dial (a silent one !) or to activate auto-answer for example."), + 'number_of_digits_to_match_from_end': fields.integer('Number of digits to match from end', help='In several situations, the Asterisk-OpenERP connector will have to find a Partner in OpenERP from a phone number presented by the calling party. As the phone numbers presented by your phone operator may not always be displayed in a standard format, the best method to find the related Partner in OpenERP is to try to match the end of the phone numbers of the Partners in OpenERP with the N last digits of the phone number presented by the calling party. N is the value you should enter in this field.'), 'company_id': fields.many2one('res.company', 'Company', help="Company who uses the Asterisk server."), } _defaults = { - 'active': lambda *a: 1, + 'active': lambda *a: True, 'port': lambda *a: 5038, # Default AMI port 'out_prefix': lambda *a: '0', 'national_prefix': lambda *a: '0', 'international_prefix': lambda *a: '00', 'extension_priority': lambda *a: 1, 'wait_time': lambda *a: 15, + 'number_of_digits_to_match_from_end': lambda *a: 9, } def _check_validity(self, cr, uid, ids): @@ -82,7 +86,9 @@ class asterisk_server(osv.osv): if server.extension_priority < 1: raise osv.except_osv(_('Error :'), _("The 'extension priority' must be a positive value for the Asterisk server '%s'" % server.name)) if server.port > 65535 or server.port < 1: - raise osv.except_osv(_('Error :'), _("You should set a TCP port between 1 and 65535 for the Asterik server '%s'" % server.name)) + raise osv.except_osv(_('Error :'), _("You should set a TCP port between 1 and 65535 for the Asterisk server '%s'" % server.name)) + if server.number_of_digits_to_match_from_end > 20 or server.number_of_digits_to_match_from_end < 1: + raise osv.except_osv(_('Error :'), _("You should set a 'Number of digits to match from end' between 1 and 20 for the Asterisk server '%s'" % server.name)) for check_string in [dialplan_context, alert_info, login, password]: if check_string[1]: try: @@ -93,11 +99,11 @@ class asterisk_server(osv.osv): _constraints = [ - (_check_validity, "Error message in raise", ['out_prefix', 'country_prefix', 'national_prefix', 'international_prefix', 'wait_time', 'extension_priority', 'port', 'context', 'alert_info', 'login', 'password']), + (_check_validity, "Error message in raise", ['out_prefix', 'country_prefix', 'national_prefix', 'international_prefix', 'wait_time', 'extension_priority', 'port', 'context', 'alert_info', 'login', 'password', 'number_of_digits_to_match_from_end']), ] - def reformat_number(self, cr, uid, ids, erp_number, ast_server, context=None): + def _reformat_number(self, cr, uid, erp_number, ast_server, context=None): ''' This function is dedicated to the transformation of the number available in OpenERP to the number that Asterisk should dial. @@ -106,7 +112,6 @@ class asterisk_server(osv.osv): the OpenERP numbers. ''' - logger = netsvc.Logger() error_title_msg = _("Invalid phone number") invalid_international_format_msg = _("The phone number is not written in valid international format. Example of valid international format : +33 1 41 98 12 42") invalid_national_format_msg = _("The phone number is not written in valid national format.") @@ -120,49 +125,40 @@ class asterisk_server(osv.osv): if not tmp_number: raise osv.except_osv(error_title_msg, invalid_format_msg) - # First, we remove all stupid caracters and spaces - for char_to_remove in [' ', '.', '(', ')', '[', ']', '-', '/']: - tmp_number = tmp_number.replace(char_to_remove, '') - # Before starting to use prefix, we convert empty prefix whose value # is False to an empty string - country_prefix = (ast_server.country_prefix or '') - national_prefix = (ast_server.national_prefix or '') - international_prefix = (ast_server.international_prefix or '') - out_prefix = (ast_server.out_prefix or '') - + country_prefix = ast_server.country_prefix or '' + national_prefix = ast_server.national_prefix or '' + international_prefix = ast_server.international_prefix or '' + out_prefix = ast_server.out_prefix or '' + + # Maybe one day we will use + # phonenumbers.format_out_of_country_calling_number(phonenumbers.parse(' 5: + if ast_server.international_prefix and number[0:len(ast_server.international_prefix)] == ast_server.international_prefix: + number = number[len(ast_server.international_prefix):] + number = '+' + number + elif ast_server.national_prefix and number[0:len(ast_server.national_prefix)] == ast_server.national_prefix: + number = number[len(ast_server.national_prefix):] + number = '+' + ast_server.country_prefix + number + return number - def dial(self, cr, uid, ids, erp_number, context=None): - ''' - Open the socket to the Asterisk Manager Interface (AMI) - and send instructions to Dial to Asterisk. That's the important function ! - - ''' - logger = netsvc.Logger() - user = self.pool.get('res.users').browse(cr, uid, uid, context=context) - - # Check if the number to dial is not empty - if not erp_number: - raise osv.except_osv(_('Error :'), _('There is no phone number !')) - # Note : if I write 'Error' without ' :', it won't get translated... - # I don't understand why ! + def _get_asterisk_server_from_user(self, cr, uid, context=None): + '''Returns an asterisk.server browse object''' # We check if the user has an Asterisk server configured + user = self.pool.get('res.users').browse(cr, uid, uid, context=context) if user.asterisk_server_id.id: ast_server = user.asterisk_server_id else: @@ -206,100 +192,135 @@ class asterisk_server(osv.osv): raise osv.except_osv(_('Error :'), _("No Asterisk server configured for the company '%s'.") % user.company_id.name) else: ast_server = self.browse(cr, uid, asterisk_server_ids[0], context=context) + return ast_server + + def _connect_to_asterisk(self, cr, uid, context=None): + ''' + Open the connection to the asterisk manager + Returns an instance of the Asterisk Manager + + ''' + user = self.pool.get('res.users').browse(cr, uid, uid, context=context) + + # Note : if I write 'Error' without ' :', it won't get translated... + # I don't understand why ! + + ast_server = self._get_asterisk_server_from_user(cr, uid, context=context) # We check if the current user has a chan type if not user.asterisk_chan_type: raise osv.except_osv(_('Error :'), _('No channel type configured for the current user.')) # We check if the current user has an internal number - if not user.internal_number: - raise osv.except_osv(_('Error :'), _('No internal phone number configured for the current user')) + if not user.resource: + raise osv.except_osv(_('Error :'), _('No resource name configured for the current user')) - # The user should also have a CallerID - if not user.callerid: - raise osv.except_osv(_('Error :'), _('No callerID configured for the current user')) - # Convert the phone number in the format that will be sent to Asterisk - ast_number = self.reformat_number(cr, uid, ids, erp_number, ast_server, context=context) - logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, "User dialing : channel = %s/%s - Callerid = %s" % (user.asterisk_chan_type, user.internal_number, user.callerid)) + logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, "User's phone : %s/%s" % (user.asterisk_chan_type, user.resource)) logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, "Asterisk server = %s:%d" % (ast_server.ip_address, ast_server.port)) - # Connect to the Asterisk Manager Interface, using IPv6-ready code + # Connect to the Asterisk Manager Interface try: - res = socket.getaddrinfo(str(ast_server.ip_address), ast_server.port, socket.AF_UNSPEC, socket.SOCK_STREAM) - except: - logger.notifyChannel('click2dial', netsvc.LOG_WARNING, "Can't resolve the DNS of the Asterisk server '%s'" % ast_server.ip_address) - raise osv.except_osv(_('Error :'), _("Can't resolve the DNS of the Asterisk server : '%s'" % ast_server.ip_address)) - for result in res: - af, socktype, proto, canonname, sockaddr = result - sock = socket.socket(af, socktype, proto) - try: - sock.connect(sockaddr) - header_received = sock.recv(1024) - logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, 'Header received from Asterisk : %s' % header_received) - - # Login to Asterisk - login_act = 'Action: login\r\n' + \ - 'Events: off\r\n' + \ - 'Username: ' + ast_server.login + '\r\n' + \ - 'Secret: ' + ast_server.password + '\r\n\r\n' - sock.send(login_act.encode('ascii')) - login_answer = self._parse_asterisk_answer(cr, uid, sock, context=context) - if 'Response: Success' in login_answer: - logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, "Successful authentification to Asterisk : %s" % login_answer) - else: - raise osv.except_osv(_('Error :'), _("Authentification to Asterisk failed :\n%s" % login_answer)) - - # Dial with Asterisk - originate_act = 'Action: originate\r\n' + \ - 'Channel: ' + user.asterisk_chan_type + '/' + user.internal_number + '\r\n' + \ - 'Priority: ' + str(ast_server.extension_priority) + '\r\n' + \ - 'Timeout: ' + str(ast_server.wait_time*1000) + '\r\n' + \ - 'CallerId: ' + user.callerid + '\r\n' + \ - 'Exten: ' + ast_number + '\r\n' + \ - 'Context: ' + ast_server.context + '\r\n' - if ast_server.alert_info and user.asterisk_chan_type == 'SIP': - originate_act += 'Variable: SIPAddHeader=Alert-Info: ' + ast_server.alert_info + '\r\n' - originate_act += '\r\n' - sock.send(originate_act.encode('ascii')) - originate_answer = self._parse_asterisk_answer(cr, uid, sock, context=context) - if 'Response: Success' in originate_answer: - logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, 'Successfull originate command : %s' % originate_answer) - else: - raise osv.except_osv(_('Error :'), _("Click to dial with Asterisk failed :\n%s" % originate_answer)) + ast_manager = Manager.Manager((ast_server.ip_address, ast_server.port), ast_server.login, ast_server.password) + except Exception, e: + logger.notifyChannel('click2dial', netsvc.LOG_ERROR, "Error in the Originate request to Asterisk server %s" % ast_server.ip_address) + logger.notifyChannel('click2dial', netsvc.LOG_ERROR, "Here is the detail of the error : '%s'" % e.strerror) + raise osv.except_osv(_('Error :'), _("Problem in the request from OpenERP to Asterisk. Here is the detail of the error: '%s'" % e.strerror)) + return False - # Logout of Asterisk - sock.send(('Action: Logoff\r\n\r\n').encode('ascii')) - logout_answer = self._parse_asterisk_answer(cr, uid, sock, context=context) - if 'Response: Goodbye' in logout_answer: - logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, 'Successfull logout from Asterisk : %s' % logout_answer) - else: - logger.notifyChannel('click2dial', netsvc.LOG_WARNING, 'Logout from Asterisk failed : %s' % logout_answer) - # we catch only network problems here - except socket.error: - logger.notifyChannel('click2dial', netsvc.LOG_WARNING, "Click2dial failed : unable to connect to Asterisk") - raise osv.except_osv(_('Error :'), _("The connection from OpenERP to the Asterisk server failed. Please check the configuration on OpenERP and on Asterisk.")) - finally: - sock.close() - logger.notifyChannel('click2dial', netsvc.LOG_INFO, "Asterisk Click2Dial from %s/%s to %s" % (user.asterisk_chan_type, user.internal_number, ast_number)) + return (user, ast_server, ast_manager) + + def _dial_with_asterisk(self, cr, uid, erp_number, context=None): + if not erp_number: + raise osv.except_osv(_('Error :'), "Hara kiri : you must call the function with erp_number") + + user, ast_server, ast_manager = self._connect_to_asterisk(cr, uid, context=context) + ast_number = self._reformat_number(cr, uid, erp_number, ast_server, context=context) + + # The user should have a CallerID + if not user.callerid: + raise osv.except_osv(_('Error :'), _('No callerID configured for the current user')) + + variable = [] + if user.asterisk_chan_type == 'SIP': + # We can only have one alert-info header in a SIP request + if user.alert_info: + variable.append('SIPAddHeader=Alert-Info: ' + user.alert_info) + elif ast_server.alert_info: + variable.append('SIPAddHeader=Alert-Info: ' + ast_server.alert_info) + if user.variable: + for user_variable in user.variable.split('|'): + variable.append(user_variable.strip()) + + try: + ast_manager.Originate( + user.asterisk_chan_type + '/' + user.resource + ( ('/' + user.dial_suffix) if user.dial_suffix else ''), + context = ast_server.context, + extension = ast_number, + priority = str(ast_server.extension_priority), + timeout = str(ast_server.wait_time*1000), + caller_id = user.callerid, + variable = variable) + except Exception, e: + logger.notifyChannel('click2dial', netsvc.LOG_ERROR, "Error in the Originate request to Asterisk server %s" % ast_server.ip_address) + logger.notifyChannel('click2dial', netsvc.LOG_ERROR, "Here is the detail of the error : '%s'" % e.strerror) + raise osv.except_osv(_('Error :'), _("Click to dial with Asterisk failed.\nHere is the error: '%s'" % e.strerror)) + + finally: + ast_manager.Logoff() return True + def _get_calling_number(self, cr, uid, context=None): + + user, ast_server, ast_manager = self._connect_to_asterisk(cr, uid, context=context) + calling_party_number = False + try: + list_chan = ast_manager.Status() + #from pprint import pprint + #pprint(list_chan) + logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, "Result of Status AMI request: %s"% list_chan) + for chan in list_chan.values(): + sip_account = user.asterisk_chan_type + '/' + user.resource + if chan.get('ChannelState') == '4' and chan.get('ConnectedLineNum') == user.internal_number: # 4 = Ring + logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, "Found a matching Event in 'Ring' state") + calling_party_number = chan.get('CallerIDNum') + break + if chan.get('ChannelState') == '6' and sip_account in chan.get('BridgedChannel'): # 6 = Up + logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, "Found a matching Event in 'Up' state") + calling_party_number = chan.get('CallerIDNum') + break + except Exception, e: + logger.notifyChannel('click2dial', netsvc.LOG_ERROR, "Error in the Status request to Asterisk server %s" % ast_server.ip_address) + logger.notifyChannel('click2dial', netsvc.LOG_ERROR, "Here is the detail of the error : '%s'" % e.strerror) + raise osv.except_osv(_('Error :'), _("Can't get calling number from Asterisk.\nHere is the error: '%s'" % e.strerror)) + + finally: + ast_manager.Logoff() + + logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, "The calling party number is '%s'" % calling_party_number) + + return calling_party_number + + asterisk_server() # Parameters specific for each user class res_users(osv.osv): - _name = "res.users" _inherit = "res.users" + _columns = { 'internal_number': fields.char('Internal number', size=15, help="User's internal phone number."), + 'dial_suffix': fields.char('User-specific dial suffix', size=15, + help="User-specific dial suffix such as aa=2wb for SCCP auto answer."), 'callerid': fields.char('Caller ID', size=50, help="Caller ID used for the calls initiated by this user."), + # You'd probably think : Asterisk should reuse the callerID of sip.conf ! + # But it cannot, cf http://lists.digium.com/pipermail/asterisk-users/2012-January/269787.html 'asterisk_chan_type': fields.selection([ ('SIP', 'SIP'), - ('Local', 'Local'), ('IAX2', 'IAX2'), ('DAHDI', 'DAHDI'), ('Zap', 'Zap'), @@ -307,8 +328,13 @@ class res_users(osv.osv): ('MGCP', 'MGCP'), ('mISDN', 'mISDN'), ('H323', 'H323'), + ('SCCP', 'SCCP'), ], 'Asterisk channel type', help="Asterisk channel type, as used in the Asterisk dialplan. If the user has a regular IP phone, the channel type is 'SIP'."), + 'resource': fields.char('Resource name', size=64, + help="Resource name for the channel type selected. For example, if you use 'Dial(SIP/phone1)' in your Asterisk dialplan to ring the SIP phone of this user, then the resource name for this user is 'phone1'. For a SIP phone, the phone number is often used as resource name, but not always."), + 'alert_info': fields.char('User-specific Alert-Info SIP header', size=255, help="Set a user-specific Alert-Info header in SIP request to user's IP Phone for the click2dial feature. If empty, the Alert-Info header will not be added. You can use it to have a special ring tone for click2dial (a silent one !) or to activate auto-answer for example."), + 'variable': fields.char('User-specific Variable', size=255, help="Set a user-specific 'Variable' field in the Asterisk Manager Interface 'originate' request for the click2dial feature. If you want to have several variable headers, separate them with '|'."), 'asterisk_server_id': fields.many2one('asterisk.server', 'Asterisk server', help="Asterisk server on which the user's phone is connected. If you leave this field empty, it will use the first Asterisk server of the user's company."), } @@ -319,7 +345,7 @@ class res_users(osv.osv): def _check_validity(self, cr, uid, ids): for user in self.browse(cr, uid, ids): - for check_string in [('Internal number', user.internal_number), ('Caller ID', user.callerid)]: + for check_string in [('Resource name', user.resource), ('Internal number', user.internal_number), ('Caller ID', user.callerid)]: if check_string[1]: try: plom = check_string[1].encode('ascii') @@ -328,27 +354,108 @@ class res_users(osv.osv): return True _constraints = [ - (_check_validity, "Error message in raise", ['internal_number', 'callerid']), + (_check_validity, "Error message in raise", ['resource', 'internal_number', 'callerid']), ] res_users() class res_partner_address(osv.osv): - _name = "res.partner.address" _inherit = "res.partner.address" + + def _format_phonenumber_to_e164(self, cr, uid, ids, name, arg, context=None): + result = {} + for addr in self.read(cr, uid, ids, ['phone', 'mobile', 'fax'], context=context): + result[addr['id']] = {} + for fromfield, tofield in [('phone', 'phone_e164'), ('mobile', 'mobile_e164'), ('fax', 'fax_e164')]: + if not addr.get(fromfield): + res = False + else: + try: + res = phonenumbers.format_number(phonenumbers.parse(addr.get(fromfield), None), phonenumbers.PhoneNumberFormat.E164) + except Exception, e: + logger.notifyChannel('click2dial', netsvc.LOG_ERROR, "Cannot reformat the phone number '%s' to E.164 format. Error message: %s" % (addr.get(fromfield), e)) + logger.notifyChannel('click2dial', netsvc.LOG_ERROR, "You should fix this number and run the wizard 'Reformat all phone numbers' from the menu Settings > Configuration > Asterisk") + # If I raise an exception here, it won't be possible to install + # the module on a DB with bad phone numbers + #raise osv.except_osv(_('Error :'), _("Cannot reformat the phone number '%s' to E.164 format. Error message: %s" % (addr.get(fromfield), e))) + res = False + result[addr['id']][tofield] = res + #print "RESULT _format_phonenumber_to_e164", result + return result + + + _columns = { + 'phone_e164': fields.function(_format_phonenumber_to_e164, type='char', size=64, string='Phone in E.164 format', method=True, readonly=True, multi="e164", store={ + 'res.partner.address': (lambda self, cr, uid, ids, c={}: ids, ['phone'], 10), + }), + 'mobile_e164': fields.function(_format_phonenumber_to_e164, type='char', size=64, string='Mobile in E.164 format', method=True, readonly=True, multi="e164", store={ + 'res.partner.address': (lambda self, cr, uid, ids, c={}: ids, ['mobile'], 10), + }), + 'fax_e164': fields.function(_format_phonenumber_to_e164, type='char', size=64, string='Fax in E.164 format', method=True, readonly=True, multi="e164", store={ + 'res.partner.address': (lambda self, cr, uid, ids, c={}: ids, ['fax'], 10), + }), + } + + def _reformat_phonenumbers(self, cr, uid, vals, context=None): + """Reformat phone numbers in international format i.e. +33141981242""" + phonefields = ['phone', 'fax', 'mobile'] + if any([vals.get(field) for field in phonefields]): + user = self.pool.get('res.users').browse(cr, uid, uid, context=context) + # country_id on res.company is a fields.function that looks at + # company_id.partner_id.addres(default).country_id + if user.company_id.partner_id.country: + user_countrycode = user.company_id.partner_id.country.code + else: + # We need to raise an exception here because, if we pass None as second arg of phonenumbers.parse(), it will raise an exception when you try to enter a phone number in national format... so it's better to raise the exception here + raise osv.except_osv(_('Error :'), _("You should set a country on the company '%s'" % user.company_id.name)) + #print "user_countrycode=", user_countrycode + for field in phonefields: + if vals.get(field): + try: + res_parse = phonenumbers.parse(vals.get(field), user_countrycode) + except Exception, e: + raise osv.except_osv(_('Error :'), _("Cannot reformat the phone number '%s' to international format. Error message: %s" % (vals.get(field), e))) + #print "res_parse=", res_parse + vals[field] = phonenumbers.format_number(res_parse, phonenumbers.PhoneNumberFormat.INTERNATIONAL) + return vals + + + def create(self, cr, uid, vals, context=None): + vals_reformated = self._reformat_phonenumbers(cr, uid, vals, context=context) + return super(res_partner_address, self).create(cr, uid, vals_reformated, context=context) + + + def write(self, cr, uid, ids, vals, context=None): + vals_reformated = self._reformat_phonenumbers(cr, uid, vals, context=context) + return super(res_partner_address, self).write(cr, uid, ids, vals_reformated, context=context) + + + def dial(self, cr, uid, ids, phone_field=['phone', 'phone_e164'], context=None): + '''Read the number to dial and call _connect_to_asterisk the right way''' + erp_number_read = self.read(cr, uid, ids[0], phone_field, context=context) + erp_number_e164 = erp_number_read[phone_field[1]] + erp_number_display = erp_number_read[phone_field[0]] + # Check if the number to dial is not empty + if not erp_number_display: + raise osv.except_osv(_('Error :'), _('There is no phone number !')) + elif erp_number_display and not erp_number_e164: + raise osv.except_osv(_('Error :'), _("The phone number isn't stored in the standard E.164 format. Try to run the wizard 'Reformat all phone numbers' from the menu Settings > Configuration > Asterisk.")) + return self.pool.get('asterisk.server')._dial_with_asterisk(cr, uid, erp_number_e164, context=context) + + def action_dial_phone(self, cr, uid, ids, context=None): '''Function called by the button 'Dial' next to the 'phone' field in the partner address view''' - erp_number = self.read(cr, uid, ids, ['phone'], context=context)[0]['phone'] - return self.pool.get('asterisk.server').dial(cr, uid, ids, erp_number, context=context) + return self.dial(cr, uid, ids, phone_field=['phone', 'phone_e164'], context=context) + def action_dial_mobile(self, cr, uid, ids, context=None): '''Function called by the button 'Dial' next to the 'mobile' field in the partner address view''' - erp_number = self.read(cr, uid, ids, ['mobile'], context=context)[0]['mobile'] - return self.pool.get('asterisk.server').dial(cr, uid, ids, erp_number, context=context) + return self.dial(cr, uid, ids, phone_field=['mobile', 'mobile_e164'], context=context) + def get_name_from_phone_number(self, cr, uid, number, context=None): '''Function to get name from phone number. Usefull for use from Asterisk @@ -358,39 +465,54 @@ class res_partner_address(osv.osv): dialplan via the AGI() function and it will use this function via an XML-RPC request. ''' - res = {} - logger = netsvc.Logger() - # We check that "number" is really a number - if not isinstance(number, str): + res = self.get_partner_from_phone_number(cr, uid, number, context=context) + if res: + return res[2] + else: return False - if not number.isdigit(): + + + def get_partner_from_phone_number(self, cr, uid, presented_number, context=None): + # We check that "presented_number" is really a number + logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, u"Call get_name_from_phone_number with number = %s" % presented_number) + if not isinstance(presented_number, (str, unicode)): + logger.notifyChannel('click2dial', netsvc.LOG_WARNING, u"Number '%s' should be a 'str' or 'unicode' but it is a '%s'" % (presented_number, type(presented_number))) + return False + if not presented_number.isdigit(): + logger.notifyChannel('click2dial', netsvc.LOG_WARNING, u"Number '%s' should only contain digits." % presented_number) return False - netsvc.Logger().notifyChannel('click2dial', netsvc.LOG_DEBUG, u"Call get_name_from_phone_number with number = %s" % number) - # Get all the partner addresses : - all_ids = self.search(cr, uid, [], context=context) - # For each partner address, we check if the number matches on the "phone" or "mobile" fields - for entry in self.browse(cr, uid, all_ids, context=context): - if entry.phone: - # We use a regexp on the phone field to remove non-digit caracters - if re.sub(r'\D', '', entry.phone).endswith(number): - logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, u"Answer get_name_from_phone_number with name = %s" % entry.name) - return entry.name - if entry.mobile: - if re.sub(r'\D', '', entry.mobile).endswith(number): - logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, u"Answer get_name_from_phone_number with name = %s" % entry.name) - return entry.name - - logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, u"No match for phone number %s" % number) - return False + ast_server = self.pool.get('asterisk.server')._get_asterisk_server_from_user(cr, uid, context=context) + nr_digits_to_match_from_end = ast_server.number_of_digits_to_match_from_end + + if len(presented_number) >= nr_digits_to_match_from_end: + end_number_to_match = presented_number[-nr_digits_to_match_from_end:len(presented_number)] + else: + end_number_to_match = presented_number + + logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, "Will search phone and mobile numbers in res.partner ending with '%s'" % end_number_to_match) + + # We try to match a phone or mobile number with the same end + pg_seach_number = str('%' + end_number_to_match) + res_ids = self.search(cr, uid, ['|', ('phone_e164', 'ilike', pg_seach_number), ('mobile_e164', 'ilike', pg_seach_number)], context=context) + # TODO : use is_number_match() of the phonenumber lib ? + if len(res_ids) > 1: + logger.notifyChannel('click2dial', netsvc.LOG_WARNING, u"There are several partners addresses (IDS = %s) with a phone number ending with '%s'" % (str(res_ids), end_number_to_match)) + if res_ids: + entry = self.read(cr, uid, res_ids[0], ['name', 'partner_id'], context=context) + logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, u"Answer get_partner_from_phone_number with name = %s" % entry['name']) + return (entry['id'], entry['partner_id'] and entry['partner_id'][0] or False, entry['name']) + else: + logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, u"No match for end of phone number '%s'" % end_number_to_match) + return False res_partner_address() # This module supports multi-company class res_company(osv.osv): - _name = "res.company" _inherit = "res.company" + _columns = { 'asterisk_server_ids': fields.one2many('asterisk.server', 'company_id', 'Asterisk servers', help="List of Asterisk servers.") } diff --git a/asterisk_click2dial/asterisk_click2dial_demo.xml b/asterisk_click2dial/asterisk_click2dial_demo.xml index ddc3a52..148ff41 100644 --- a/asterisk_click2dial/asterisk_click2dial_demo.xml +++ b/asterisk_click2dial/asterisk_click2dial_demo.xml @@ -1,7 +1,7 @@ @@ -32,10 +32,10 @@ - + - - + + @@ -43,9 +43,9 @@ - + @@ -75,8 +75,9 @@ {'asterisk_server_main_view': True} - - + + + diff --git a/asterisk_click2dial/i18n/asterisk_click2dial.pot b/asterisk_click2dial/i18n/asterisk_click2dial.pot index 8d35d8c..bbec3fb 100644 --- a/asterisk_click2dial/i18n/asterisk_click2dial.pot +++ b/asterisk_click2dial/i18n/asterisk_click2dial.pot @@ -4,10 +4,10 @@ # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 5.0.14\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2010-09-10 20:38:35+0000\n" -"PO-Revision-Date: 2010-09-10 20:38:35+0000\n" +"Project-Id-Version: OpenERP Server 6.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-05-28 19:58+0000\n" +"PO-Revision-Date: 2012-05-28 19:58+0000\n" "Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,385 +16,553 @@ msgstr "" "Plural-Forms: \n" #. module: asterisk_click2dial -#: constraint:asterisk.server:0 -msgid "The 'extension priority' must be a positive value" -msgstr "" - -#. module: asterisk_click2dial -#: field:asterisk.server,password:0 -msgid "AMI password" -msgstr "" +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Dial" +msgstr "Appeler" #. module: asterisk_click2dial #: selection:res.users,asterisk_chan_type:0 msgid "SIP" -msgstr "" +msgstr "SIP" #. module: asterisk_click2dial -#: field:asterisk.server,international_prefix:0 -msgid "International prefix" -msgstr "" +#: help:asterisk.server,ip_address:0 +msgid "IP address or DNS name of the Asterisk server." +msgstr "Adresse IP ou DNS du serveur Asterisk." #. module: asterisk_click2dial -#: help:asterisk.server,ip_address:0 -msgid "IPv4 address or DNS name of the Asterisk server." -msgstr "" +#: field:wizard.open.calling.partner,current_phone:0 +msgid "Current phone" +msgstr "Current phone" #. module: asterisk_click2dial -#: selection:res.users,asterisk_chan_type:0 -msgid "mISDN" -msgstr "" +#: field:res.users,callerid:0 +msgid "Caller ID" +msgstr "Identification de l'appelant" #. module: asterisk_click2dial -#: constraint:ir.model:0 -msgid "The Object name must start with x_ and not contain any special character !" -msgstr "" +#: field:asterisk.server,wait_time:0 +msgid "Wait time (sec)" +msgstr "Temps d'attente (sec)" #. module: asterisk_click2dial -#: view:res.partner:0 -#: view:res.partner.address:0 -msgid "Dial" -msgstr "" +#: field:asterisk.server,context:0 +msgid "Dialplan context" +msgstr "Contexte du dialplan" #. module: asterisk_click2dial -#: constraint:asterisk.server:0 -msgid "Only use digits for the 'country prefix'" -msgstr "" +#: field:asterisk.server,company_id:0 +msgid "Company" +msgstr "Société" #. module: asterisk_click2dial -#: field:res.users,asterisk_server_id:0 -msgid "Asterisk server" -msgstr "" +#: help:asterisk.server,out_prefix:0 +msgid "Prefix to dial to place outgoing calls. If you don't use a prefix to place outgoing calls, leave empty." +msgstr "Préfixe à composer pour appeler vers l'extérieur. Si vous n'avez pas à composer un préfixe pour appeler vers l'extérieur, laissez vide." #. module: asterisk_click2dial -#: help:res.users,asterisk_server_id:0 -msgid "Asterisk server on which the user's phone is connected." -msgstr "" +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:111 +#, python-format +msgid "The phone number is not written in valid international format. Example of valid international format : +33 1 41 98 12 42" +msgstr "Le numéro de téléphone n'est pas dans un format international valide. Exemple de numéro de téléphone dans un format international valide : +33 1 41 98 12 42" #. module: asterisk_click2dial -#: model:ir.actions.act_window,name:asterisk_click2dial.action_asterisk_server -#: model:ir.model,name:asterisk_click2dial.model_asterisk_server -msgid "Asterisk Servers" -msgstr "" +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:113 +#, python-format +msgid "The phone number is not written in valid format." +msgstr "Le numéro de téléphone n'est pas dans un format valide." #. module: asterisk_click2dial -#: constraint:ir.actions.act_window:0 -msgid "Invalid model name in the action definition." -msgstr "" +#: field:asterisk.server,national_prefix:0 +msgid "National prefix" +msgstr "Préfixe national" #. module: asterisk_click2dial -#: selection:res.users,asterisk_chan_type:0 -msgid "DAHDI" -msgstr "" +#: help:asterisk.server,national_format_allowed:0 +msgid "Do we allow to use click2dial on phone numbers written in national format, e.g. 01 41 98 12 42, or only in the international format, e.g. +33 1 41 98 12 42 ?" +msgstr "Do we allow to use click2dial on phone numbers written in national format, e.g. 01 41 98 12 42, or only in the international format, e.g. +33 1 41 98 12 42 ?" #. module: asterisk_click2dial -#: help:asterisk.server,extension_priority:0 -msgid "Priority of the extension in the Asterisk dialplan. Refer to /etc/asterisk/extensions.conf on your Asterisk server." -msgstr "" +#: field:asterisk.server,out_prefix:0 +msgid "Out prefix" +msgstr "Préfixe pour l'extérieur" #. module: asterisk_click2dial -#: field:res.users,callerid:0 -msgid "Caller ID" -msgstr "" +#: help:asterisk.server,port:0 +msgid "TCP port on which the Asterisk Manager Interface listens. Defined in /etc/asterisk/manager.conf on Asterisk." +msgstr "Port TCP sur lequel écoute l'interface du Manager Asterisk. Cf /etc/asterisk/manager.conf sur le serveur Asterisk." #. module: asterisk_click2dial -#: model:ir.module.module,description:asterisk_click2dial.module_meta_information -msgid "The module adds dial button in partner address\n" -"so that you can directly dial a phone number through Asterisk.\n" -"Documentation is available on the Arkretion Web site http://[TODO]" -msgstr "" +#: view:wizard.open.calling.partner:0 +msgid "Update an existing contact" +msgstr "Update an existing contact" #. module: asterisk_click2dial -#: help:asterisk.server,name:0 -msgid "Asterisk server name." -msgstr "" +#: field:res.users,internal_number:0 +msgid "Internal number" +msgstr "Numéro interne" #. module: asterisk_click2dial -#: view:res.partner:0 -#: view:res.partner.address:0 -msgid "Mobile : " -msgstr "" +#: field:res.users,asterisk_chan_type:0 +msgid "Asterisk channel type" +msgstr "Type de canal Asterisk" #. module: asterisk_click2dial -#: field:asterisk.server,login:0 -msgid "AMI login" -msgstr "" +#: constraint:asterisk.server:0 +#: constraint:res.users:0 +msgid "Error message in raise" +msgstr "Error message in raise" #. module: asterisk_click2dial -#: view:res.company:0 -msgid "Asterisk servers for click2dial" -msgstr "" +#: help:asterisk.server,national_prefix:0 +msgid "Prefix for national phone calls (don't include the 'out prefix'). For e.g., in France, the phone numbers look like '01 41 98 12 42' : the National prefix is '0'." +msgstr "Préfixe pour les appels nationaux (ne pas inclure le préfixe pour l'extérieur). Par exemple, en France, les numéros de téléphone sont du type '01 41 98 12 42' ; le préfixe national est '0'." #. module: asterisk_click2dial -#: field:asterisk.server,wait_time:0 -msgid "Wait time (sec)" -msgstr "" +#: view:wizard.open.calling.partner:0 +msgid "Create a new contact" +msgstr "Create a new contact" #. module: asterisk_click2dial -#: field:asterisk.server,context:0 -msgid "Dialplan context" -msgstr "" +#: help:asterisk.server,password:0 +msgid "Password that Asterisk will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." +msgstr "Password that Asterisk will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." #. module: asterisk_click2dial -#: field:asterisk.server,extension_priority:0 -msgid "Extension priority" -msgstr "" +#: field:wizard.open.calling.partner,calling_number:0 +msgid "Calling number" +msgstr "Numéro appelant" #. module: asterisk_click2dial -#: field:asterisk.server,company_id:0 -msgid "Company" -msgstr "" +#: field:res.users,alert_info:0 +msgid "User-specific Alert-Info SIP header" +msgstr "En-tête SIP Alert-Info spécifique à l'utilisateur" #. module: asterisk_click2dial -#: help:asterisk.server,country_prefix:0 -msgid "Phone prefix of the country where the Asterisk server is located. For e.g. the phone prefix for France is '33'. If the phone number to dial starts with the 'My country prefix', OpenERP will remove the country prefix from the phone number and add the 'out prefix' followed by the 'national prefix'. If the phone number to dial doesn't start with the 'My country prefix', OpenERP will add the 'out prefix' followed by the 'international prefix'." -msgstr "" +#: help:asterisk.server,active:0 +msgid "The active field allows you to hide the Asterisk server without deleting it." +msgstr "The active field allows you to hide the Asterisk server without deleting it." #. module: asterisk_click2dial -#: help:asterisk.server,out_prefix:0 -msgid "Prefix to dial to place outgoing calls. If you don't use a prefix to place outgoing calls, leave empty." -msgstr "" +#: view:res.users:0 +msgid "Telephony" +msgstr "Téléphonie" #. module: asterisk_click2dial -#: selection:res.users,asterisk_chan_type:0 -msgid "Zap" -msgstr "" +#: view:asterisk.server:0 +#: model:ir.actions.act_window,name:asterisk_click2dial.action_asterisk_server +#: model:ir.ui.menu,name:asterisk_click2dial.act_menu_ast_server +#: field:res.company,asterisk_server_ids:0 +msgid "Asterisk servers" +msgstr "Serveurs Asterisk" #. module: asterisk_click2dial -#: help:asterisk.server,context:0 -msgid "Asterisk dialplan context from which the calls will be made. Refer to /etc/asterisk/extensions.conf on your Asterisk server." -msgstr "" +#: help:wizard.open.calling.partner,partner_id:0 +msgid "Partner related to the calling number" +msgstr "Partenaire associé au numéro appelant" #. module: asterisk_click2dial -#: help:res.users,callerid:0 -msgid "Caller ID used for the calls initiated by this user." -msgstr "" +#: field:wizard.open.calling.partner,partner_id:0 +msgid "Partner" +msgstr "Partenaire" + +#. module: asterisk_click2dial +#: field:asterisk.server,alert_info:0 +msgid "Alert-Info SIP header" +msgstr "En-tête SIP Alert-Info SIP" #. module: asterisk_click2dial #: selection:res.users,asterisk_chan_type:0 -msgid "IAX2" -msgstr "" +msgid "mISDN" +msgstr "mISDN" #. module: asterisk_click2dial -#: view:res.company:0 -msgid "IPBX" -msgstr "" +#: model:ir.model,name:asterisk_click2dial.model_res_company +msgid "Companies" +msgstr "Sociétés" #. module: asterisk_click2dial -#: model:ir.module.module,shortdesc:asterisk_click2dial.module_meta_information -msgid "Asterisk Click2dial" -msgstr "" +#: help:wizard.open.calling.partner,partner_address_id:0 +msgid "Partner contact related to the calling number" +msgstr "Partner contact related to the calling number" #. module: asterisk_click2dial -#: help:res.company,asterisk_server_ids:0 -msgid "List of Asterisk servers." -msgstr "" +#: constraint:res.company:0 +msgid "Error! You can not create recursive companies." +msgstr "Erreur ! Vous ne pouvez pas créer de sociétés récursives" #. module: asterisk_click2dial -#: selection:res.users,asterisk_chan_type:0 -msgid "MGCP" -msgstr "" +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:275 +#, python-format +msgid "No callerID configured for the current user" +msgstr "No callerID configured for the current user" #. module: asterisk_click2dial -#: selection:res.users,asterisk_chan_type:0 -msgid "Skinny" -msgstr "" +#: field:asterisk.server,national_format_allowed:0 +msgid "National format allowed ?" +msgstr "Format national autorisé ?" #. module: asterisk_click2dial -#: constraint:ir.ui.view:0 -msgid "Invalid XML for View Architecture!" -msgstr "" +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:511 +#, python-format +msgid "Could not get the calling number from Asterisk. Check your setup and look at the OpenERP debug logs." +msgstr "Could not get the calling number from Asterisk. Check your setup and look at the OpenERP debug logs." + +#. module: asterisk_click2dial +#: help:asterisk.server,name:0 +msgid "Asterisk server name." +msgstr "Nom du serveur Asterisk." + +#. module: asterisk_click2dial +#: field:asterisk.server,country_prefix:0 +msgid "My country prefix" +msgstr "Préfixe du pays" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "IAX2" +msgstr "IAX2" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:80 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:82 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:84 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:86 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:92 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:195 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:229 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:233 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:244 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:264 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:270 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:275 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:301 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:311 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:339 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:395 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:414 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:511 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:522 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:614 +#, python-format +msgid "Error :" +msgstr "Erreur :" #. module: asterisk_click2dial #: help:res.users,internal_number:0 msgid "User's internal phone number." -msgstr "" +msgstr "Numéro de téléphone interne de l'utilisateur." #. module: asterisk_click2dial -#: help:asterisk.server,national_prefix:0 -msgid "Prefix for national phone calls (don't include the 'out prefix'). For e.g., in France, the phone numbers look like '01 41 98 12 42' : the National prefix is '0'." -msgstr "" +#: model:ir.actions.act_window,name:asterisk_click2dial.action_open_calling_partner +#: model:ir.ui.menu,name:asterisk_click2dial.menu_open_calling_partner_sales +#: view:wizard.open.calling.partner:0 +msgid "Open calling partner" +msgstr "Ouvrir le partenaire appelant" #. module: asterisk_click2dial -#: help:asterisk.server,port:0 -msgid "TCP port on which the Asterisk Manager Interface listens. Defined in /etc/asterisk/manager.conf on Asterisk." -msgstr "" +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:414 +#, python-format +msgid "There is no phone number !" +msgstr "Il n'y a pas de numéro de téléphone !" + +#. module: asterisk_click2dial +#: model:ir.model,name:asterisk_click2dial.model_wizard_open_calling_partner +msgid "wizard.open.calling.partner" +msgstr "wizard.open.calling.partner" #. module: asterisk_click2dial #: help:asterisk.server,international_prefix:0 msgid "Prefix to add to make international phone calls (don't include the 'out prefix'). For e.g., in France, the International prefix is '00'." -msgstr "" +msgstr "Préfixe à ajouter pour passer des appels vers l'étranger (ne pas inclure le préfixe pour l'extérieur). Par exemple, en France, le préfixe pour l'international est '00'." #. module: asterisk_click2dial -#: field:res.users,internal_number:0 -msgid "Internal number" -msgstr "" +#: help:res.users,asterisk_chan_type:0 +msgid "Asterisk channel type, as used in the Asterisk dialplan. If the user has a regular IP phone, the channel type is 'SIP'." +msgstr "Type de canal Asterisk, tel qu'utilisé dans le dialplan d'Asterisk. Si l'utilisateur a un téléphone IP classique, le type de canal est 'SIP'." #. module: asterisk_click2dial -#: field:res.users,asterisk_chan_type:0 -msgid "Asterisk channel type" -msgstr "" +#: help:asterisk.server,company_id:0 +msgid "Company who uses the Asterisk server." +msgstr "Société qui utilise le serveur Asterisk." #. module: asterisk_click2dial -#: field:asterisk.server,out_prefix:0 -msgid "Out prefix" -msgstr "" +#: help:wizard.open.calling.partner,calling_number:0 +msgid "Phone number of calling party that has been obtained from Asterisk." +msgstr "Phone number of calling party that has been obtained from Asterisk." #. module: asterisk_click2dial -#: constraint:asterisk.server:0 -msgid "TCP ports range from 1 to 65535" -msgstr "" +#: view:wizard.open.calling.partner:0 +msgid "Contact form" +msgstr "Contact form" #. module: asterisk_click2dial -#: view:res.partner:0 -#: view:res.partner.address:0 -msgid "Phone : " -msgstr "" +#: field:wizard.open.calling.partner,current_mobile:0 +msgid "Current mobile" +msgstr "Current mobile" #. module: asterisk_click2dial -#: help:asterisk.server,company_id:0 -msgid "Company who uses the Asterisk server." -msgstr "" +#: help:asterisk.server,wait_time:0 +msgid "Amount of time (in seconds) Asterisk will try to reach the user's phone before hanging up." +msgstr "Temps (en secondes) pendant lequel Asterisk essayera de joindre le téléphone de l'utilisateur avant d'abandonner." #. module: asterisk_click2dial -#: constraint:asterisk.server:0 -msgid "Only use digits for the 'out prefix' or leave empty" -msgstr "" +#: model:ir.model,name:asterisk_click2dial.model_res_partner_address +msgid "Partner Addresses" +msgstr "Carnet d'adresses" #. module: asterisk_click2dial -#: field:asterisk.server,ip_address:0 -msgid "Asterisk IP addr. or DNS" -msgstr "" +#: selection:res.users,asterisk_chan_type:0 +msgid "Zap" +msgstr "Zap" #. module: asterisk_click2dial -#: help:asterisk.server,password:0 -msgid "Password that Asterisk will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." -msgstr "" +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:229 +#, python-format +msgid "No channel type configured for the current user." +msgstr "Aucun type de canal n'est configuré pour le présent utilisateur." #. module: asterisk_click2dial -#: constraint:asterisk.server:0 -msgid "Only use digits for 'international prefix'" -msgstr "" +#: field:asterisk.server,international_prefix:0 +msgid "International prefix" +msgstr "Préfixe international" + +#. module: asterisk_click2dial +#: constraint:res.users:0 +msgid "The chosen company is not in the allowed companies for this user" +msgstr "La société choisie n'est pas autorisée pour cet utilisateur." + +#. module: asterisk_click2dial +#: view:wizard.open.calling.partner:0 +msgid "Update mobile" +msgstr "Update mobile" + +#. module: asterisk_click2dial +#: field:asterisk.server,extension_priority:0 +msgid "Extension priority" +msgstr "Priorité de l'extension" + +#. module: asterisk_click2dial +#: model:res.groups,name:asterisk_click2dial.group_asterisk_cid +msgid "Asterisk CallerID" +msgstr "Asterisk CallerID" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:339 +#, python-format +msgid "The connection from OpenERP to the Asterisk server failed. Please check the configuration on OpenERP and on Asterisk." +msgstr "La connexion depuis OpenERP vers le serveur Asterisk a échoué. Vérifiez la configuration côté OpenERP et côté Asterisk." + +#. module: asterisk_click2dial +#: help:asterisk.server,context:0 +msgid "Asterisk dialplan context from which the calls will be made. Refer to /etc/asterisk/extensions.conf on your Asterisk server." +msgstr "Contexte du dialplan d'Asterisk depuis lequel les appels seront initiés. Cf /etc/asterisk/extensions.conf sur le serveur Asterisk." + +#. module: asterisk_click2dial +#: help:asterisk.server,extension_priority:0 +msgid "Priority of the extension in the Asterisk dialplan. Refer to /etc/asterisk/extensions.conf on your Asterisk server." +msgstr "Priorité de l'extension dans le dialplan d'Asterisk. Cf /etc/asterisk/extensions.conf sur le serveur Asterisk." + +#. module: asterisk_click2dial +#: view:res.users:0 +msgid "User" +msgstr "Utilisateur" + +#. module: asterisk_click2dial +#: field:asterisk.server,active:0 +msgid "Active" +msgstr "Actif" #. module: asterisk_click2dial #: selection:res.users,asterisk_chan_type:0 -msgid "H323" -msgstr "" +msgid "MGCP" +msgstr "MGCP" #. module: asterisk_click2dial -#: field:asterisk.server,national_prefix:0 -msgid "National prefix" -msgstr "" +#: field:wizard.open.calling.partner,to_update_partner_address_id:0 +msgid "Contact to update" +msgstr "Contact to update" #. module: asterisk_click2dial -#: field:asterisk.server,country_prefix:0 -msgid "My country prefix" -msgstr "" +#: view:wizard.open.calling.partner:0 +msgid "Related sale orders" +msgstr "Bons de commande associés" #. module: asterisk_click2dial -#: view:asterisk.server:0 -#: field:res.company,asterisk_server_ids:0 -msgid "Asterisk servers" -msgstr "" +#: help:res.users,variable:0 +msgid "Set a user-specific 'Variable' field in the Asterisk Manager Interface 'originate' request for the click2dial feature. If you want to have several variable headers, separate them with '|'." +msgstr "Set a user-specific 'Variable' field in the Asterisk Manager Interface 'originate' request for the click2dial feature. If you want to have several variable headers, separate them with '|'." + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "Skinny" +msgstr "Skinny" + +#. module: asterisk_click2dial +#: help:res.users,alert_info:0 +msgid "Set a user-specific Alert-Info header in SIP request to user's IP Phone for the click2dial feature. If empty, the Alert-Info header will not be added. You can use it to have a special ring tone for click2dial (a silent one !) or to activate auto-answer for example. If you want to have several variable headers, separate them with '|'." +msgstr "Set a user-specific Alert-Info header in SIP request to user's IP Phone for the click2dial feature. If empty, the Alert-Info header will not be added. You can use it to have a special ring tone for click2dial (a silent one !) or to activate auto-answer for example. If you want to have several variable headers, separate them with '|'." + +#. module: asterisk_click2dial +#: view:wizard.open.calling.partner:0 +msgid "with calling number as mobile" +msgstr "with calling number as mobile" + +#. module: asterisk_click2dial +#: field:wizard.open.calling.partner,partner_address_id:0 +msgid "Contact name" +msgstr "Contact name" + +#. module: asterisk_click2dial +#: sql_constraint:res.users:0 +msgid "You can not have two users with the same login !" +msgstr "VOus ne pouvez pas avoir deux utilsiateurs avec le même login !" + +#. module: asterisk_click2dial +#: field:asterisk.server,ip_address:0 +msgid "Asterisk IP addr. or DNS" +msgstr "Adr. IP ou DNS d'Asterisk" + +#. module: asterisk_click2dial +#: help:res.company,asterisk_server_ids:0 +msgid "List of Asterisk servers." +msgstr "Liste des serveurs Asterisk." #. module: asterisk_click2dial #: help:asterisk.server,login:0 msgid "Login that OpenERP will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." -msgstr "" +msgstr "Nom d'utilisateur qu'OpenERP utilisera pour communiquer avec l'interface du Manager d'Asterisk. Cf /etc/asterisk/manager.conf sur le serveur Asterisk." #. module: asterisk_click2dial #: field:asterisk.server,name:0 msgid "Asterisk server name" -msgstr "" +msgstr "Nom du serveur Asterisk" #. module: asterisk_click2dial -#: help:asterisk.server,wait_time:0 -msgid "Amount of time (in seconds) Asterisk will try to reach the user's phone before hanging up." -msgstr "" +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:233 +#, python-format +msgid "No internal phone number configured for the current user" +msgstr "Aucun numéro de téléphone interne n'est configuré pour le présent utilisateur." #. module: asterisk_click2dial -#: help:res.users,asterisk_chan_type:0 -msgid "Asterisk channel type, as used in the Asterisk dialplan. If the user has a regular IP phone, the channel type is 'SIP'." -msgstr "" +#: view:wizard.open.calling.partner:0 +msgid "Cancel" +msgstr "Annuler" #. module: asterisk_click2dial -#: constraint:asterisk.server:0 -msgid "Only use digits for the 'national prefix' or leave empty" -msgstr "" +#: model:ir.model,name:asterisk_click2dial.model_res_users +msgid "res.users" +msgstr "res.users" #. module: asterisk_click2dial -#: field:asterisk.server,port:0 -msgid "Port" -msgstr "" +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:112 +#, python-format +msgid "The phone number is not written in valid national format." +msgstr "Le numéro de téléphone n'est pas dans un format national valide." #. module: asterisk_click2dial -#: constraint:asterisk.server:0 -msgid "You should enter a 'Wait time' value between 1 and 120 seconds" -msgstr "" +#: field:asterisk.server,password:0 +msgid "AMI password" +msgstr "Mot de passe AMI" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "Can't resolve the DNS of the Asterisk server : " -msgstr "" +#: view:wizard.open.calling.partner:0 +msgid "Partner form" +msgstr "Fiche partenaire" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "Invalid phone number" -msgstr "" +#: help:res.users,asterisk_server_id:0 +msgid "Asterisk server on which the user's phone is connected. If you leave this field empty, it will use the first Asterisk server of the user's company." +msgstr "Asterisk server on which the user's phone is connected. If you leave this field empty, it will use the first Asterisk server of the user's company." #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "The phone number is not written in valid international format. Example of valid international format : +33 1 41 98 12 42" -msgstr "" +#: field:res.users,asterisk_server_id:0 +msgid "Asterisk server" +msgstr "Serveur Asterisk" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "The phone number is not written in valid national format." -msgstr "" +#: model:ir.model,name:asterisk_click2dial.model_asterisk_server +msgid "Asterisk Servers" +msgstr "Serveurs Asterisk" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "The phone number is not written in valid format." -msgstr "" +#: selection:res.users,asterisk_chan_type:0 +msgid "DAHDI" +msgstr "DAHDI" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "Error :" -msgstr "" +#: field:asterisk.server,login:0 +msgid "AMI login" +msgstr "Nom d'utilisateur AMI" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:195 #, python-format -msgid "There is no phone number !" -msgstr "" +msgid "No Asterisk server configured for the company '%s'." +msgstr "Aucun serveur Asterisk n'est associé à la société '%s'." #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "No Asterisk server configured for the current user." -msgstr "" +#: help:wizard.open.calling.partner,to_update_partner_address_id:0 +msgid "Partner contact on which the phone or mobile number will be written" +msgstr "Partner contact on which the phone or mobile number will be written" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "No channel type configured for the current user." -msgstr "" +#: help:asterisk.server,country_prefix:0 +msgid "Phone prefix of the country where the Asterisk server is located. For e.g. the phone prefix for France is '33'. If the phone number to dial starts with the 'My country prefix', OpenERP will remove the country prefix from the phone number and add the 'out prefix' followed by the 'national prefix'. If the phone number to dial doesn't start with the 'My country prefix', OpenERP will add the 'out prefix' followed by the 'international prefix'." +msgstr "Préfixe téléphonique du pays dans lequel est situé le serveur Asterisk. Par exemple, le préfixe téléphonique de la France est '33'. Si le numéro de téléphone à appeler commence par le préfixe du pays, OpenERP supprimera ce préfixe du numéro de téléphone à composer et ajoutera le préfixe pour l'extérieur suivi par le préfixe national. Si le numéro de téléphone à appeler ne commence pas par le préfixe du pays, OpenERP ajoutera le préfixe pour l'extérieur suivi par le préfixe international." #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "No internal phone number configured for the current user" -msgstr "" +#: help:res.users,callerid:0 +msgid "Caller ID used for the calls initiated by this user." +msgstr "'Caller ID' des appels passés par l'utilisateur." #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "The connection from OpenERP to the Asterisk server failed. Please check the configuration on OpenERP and on Asterisk." -msgstr "" +#: view:res.company:0 +msgid "IPBX" +msgstr "IPBX" +#. module: asterisk_click2dial +#: view:wizard.open.calling.partner:0 +msgid "with calling number as phone" +msgstr "with calling number as phone" + +#. module: asterisk_click2dial +#: sql_constraint:res.company:0 +msgid "The company name must be unique !" +msgstr "Le nom de la société doit être unique !" + +#. module: asterisk_click2dial +#: view:wizard.open.calling.partner:0 +msgid "Update phone" +msgstr "Update phone" + +#. module: asterisk_click2dial +#: help:asterisk.server,alert_info:0 +msgid "Set Alert-Info header in SIP request to user's IP Phone for the click2dial feature. If empty, the Alert-Info header will not be added. You can use it to have a special ring tone for click2dial (a silent one !) or to activate auto-answer for example. If you want to have several variable headers, separate them with '|'." +msgstr "Set Alert-Info header in SIP request to user's IP Phone for the click2dial feature. If empty, the Alert-Info header will not be added. You can use it to have a special ring tone for click2dial (a silent one !) or to activate auto-answer for example. If you want to have several variable headers, separate them with '|'." + +#. module: asterisk_click2dial +#: view:wizard.open.calling.partner:0 +msgid "Related invoices" +msgstr "Factures associées" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "H323" +msgstr "H323" + +#. module: asterisk_click2dial +#: field:res.users,variable:0 +msgid "User-specific Variable" +msgstr "Variable spécifique à l'utilisateur" + +#. module: asterisk_click2dial +#: field:asterisk.server,port:0 +msgid "Port" +msgstr "Port" + +#. module: asterisk_click2dial +#: view:wizard.open.calling.partner:0 +msgid "No partner contact found in OpenERP with this number" +msgstr "" diff --git a/asterisk_click2dial/i18n/bg.po b/asterisk_click2dial/i18n/bg.po new file mode 100644 index 0000000..fdde724 --- /dev/null +++ b/asterisk_click2dial/i18n/bg.po @@ -0,0 +1,435 @@ +# Bulgarian translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2010-09-10 20:38+0000\n" +"PO-Revision-Date: 2011-03-30 07:31+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Bulgarian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-04-17 05:22+0000\n" +"X-Generator: Launchpad (build 15099)\n" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "The 'extension priority' must be a positive value" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,password:0 +msgid "AMI password" +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "SIP" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,international_prefix:0 +msgid "International prefix" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,ip_address:0 +msgid "IPv4 address or DNS name of the Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "mISDN" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:ir.model:0 +msgid "" +"The Object name must start with x_ and not contain any special character !" +msgstr "" +"Името на обекта трябва да започва с x_ и не може да никакви специални знаци !" + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Dial" +msgstr "Набиране" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'country prefix'" +msgstr "" + +#. module: asterisk_click2dial +#: field:res.users,asterisk_server_id:0 +msgid "Asterisk server" +msgstr "" + +#. module: asterisk_click2dial +#: help:res.users,asterisk_server_id:0 +msgid "Asterisk server on which the user's phone is connected." +msgstr "" + +#. module: asterisk_click2dial +#: model:ir.actions.act_window,name:asterisk_click2dial.action_asterisk_server +#: model:ir.model,name:asterisk_click2dial.model_asterisk_server +msgid "Asterisk Servers" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:ir.actions.act_window:0 +msgid "Invalid model name in the action definition." +msgstr "Невалидно име на модел при задаване на действие" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "DAHDI" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,extension_priority:0 +msgid "" +"Priority of the extension in the Asterisk dialplan. Refer to " +"/etc/asterisk/extensions.conf on your Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: field:res.users,callerid:0 +msgid "Caller ID" +msgstr "Идентификатор на звъняващия" + +#. module: asterisk_click2dial +#: model:ir.module.module,description:asterisk_click2dial.module_meta_information +msgid "" +"The module adds dial button in partner address\n" +"so that you can directly dial a phone number through Asterisk.\n" +"Documentation is available on the Arkretion Web site http://[TODO]" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,name:0 +msgid "Asterisk server name." +msgstr "" + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Mobile : " +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,login:0 +msgid "AMI login" +msgstr "" + +#. module: asterisk_click2dial +#: view:res.company:0 +msgid "Asterisk servers for click2dial" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,wait_time:0 +msgid "Wait time (sec)" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,context:0 +msgid "Dialplan context" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,extension_priority:0 +msgid "Extension priority" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,company_id:0 +msgid "Company" +msgstr "Фирма" + +#. module: asterisk_click2dial +#: help:asterisk.server,country_prefix:0 +msgid "" +"Phone prefix of the country where the Asterisk server is located. For e.g. " +"the phone prefix for France is '33'. If the phone number to dial starts with " +"the 'My country prefix', OpenERP will remove the country prefix from the " +"phone number and add the 'out prefix' followed by the 'national prefix'. If " +"the phone number to dial doesn't start with the 'My country prefix', OpenERP " +"will add the 'out prefix' followed by the 'international prefix'." +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,out_prefix:0 +msgid "" +"Prefix to dial to place outgoing calls. If you don't use a prefix to place " +"outgoing calls, leave empty." +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "Zap" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,context:0 +msgid "" +"Asterisk dialplan context from which the calls will be made. Refer to " +"/etc/asterisk/extensions.conf on your Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: help:res.users,callerid:0 +msgid "Caller ID used for the calls initiated by this user." +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "IAX2" +msgstr "" + +#. module: asterisk_click2dial +#: view:res.company:0 +msgid "IPBX" +msgstr "" + +#. module: asterisk_click2dial +#: model:ir.module.module,shortdesc:asterisk_click2dial.module_meta_information +msgid "Asterisk Click2dial" +msgstr "" + +#. module: asterisk_click2dial +#: help:res.company,asterisk_server_ids:0 +msgid "List of Asterisk servers." +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "MGCP" +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "Skinny" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:ir.ui.view:0 +msgid "Invalid XML for View Architecture!" +msgstr "" + +#. module: asterisk_click2dial +#: help:res.users,internal_number:0 +msgid "User's internal phone number." +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,national_prefix:0 +msgid "" +"Prefix for national phone calls (don't include the 'out prefix'). For e.g., " +"in France, the phone numbers look like '01 41 98 12 42' : the National " +"prefix is '0'." +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,port:0 +msgid "" +"TCP port on which the Asterisk Manager Interface listens. Defined in " +"/etc/asterisk/manager.conf on Asterisk." +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,international_prefix:0 +msgid "" +"Prefix to add to make international phone calls (don't include the 'out " +"prefix'). For e.g., in France, the International prefix is '00'." +msgstr "" + +#. module: asterisk_click2dial +#: field:res.users,internal_number:0 +msgid "Internal number" +msgstr "" + +#. module: asterisk_click2dial +#: field:res.users,asterisk_chan_type:0 +msgid "Asterisk channel type" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,out_prefix:0 +msgid "Out prefix" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "TCP ports range from 1 to 65535" +msgstr "" + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Phone : " +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,company_id:0 +msgid "Company who uses the Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'out prefix' or leave empty" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,ip_address:0 +msgid "Asterisk IP addr. or DNS" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,password:0 +msgid "" +"Password that Asterisk will use to communicate with the Asterisk Manager " +"Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for 'international prefix'" +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "H323" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,national_prefix:0 +msgid "National prefix" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,country_prefix:0 +msgid "My country prefix" +msgstr "" + +#. module: asterisk_click2dial +#: view:asterisk.server:0 +#: field:res.company,asterisk_server_ids:0 +msgid "Asterisk servers" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,login:0 +msgid "" +"Login that OpenERP will use to communicate with the Asterisk Manager " +"Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,name:0 +msgid "Asterisk server name" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,wait_time:0 +msgid "" +"Amount of time (in seconds) Asterisk will try to reach the user's phone " +"before hanging up." +msgstr "" + +#. module: asterisk_click2dial +#: help:res.users,asterisk_chan_type:0 +msgid "" +"Asterisk channel type, as used in the Asterisk dialplan. If the user has a " +"regular IP phone, the channel type is 'SIP'." +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'national prefix' or leave empty" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,port:0 +msgid "Port" +msgstr "Порт" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "You should enter a 'Wait time' value between 1 and 120 seconds" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "Can't resolve the DNS of the Asterisk server : " +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "Invalid phone number" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "" +"The phone number is not written in valid international format. Example of " +"valid international format : +33 1 41 98 12 42" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "The phone number is not written in valid national format." +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "The phone number is not written in valid format." +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "Error :" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "There is no phone number !" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "No Asterisk server configured for the current user." +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "No channel type configured for the current user." +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "No internal phone number configured for the current user" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "" +"The connection from OpenERP to the Asterisk server failed. Please check the " +"configuration on OpenERP and on Asterisk." +msgstr "" diff --git a/asterisk_click2dial/i18n/es.po b/asterisk_click2dial/i18n/es.po new file mode 100644 index 0000000..5c55f18 --- /dev/null +++ b/asterisk_click2dial/i18n/es.po @@ -0,0 +1,477 @@ +# Spanish translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2010-09-10 20:38+0000\n" +"PO-Revision-Date: 2011-08-23 18:36+0000\n" +"Last-Translator: FULL NAME \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: 2012-04-17 05:22+0000\n" +"X-Generator: Launchpad (build 15099)\n" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "The 'extension priority' must be a positive value" +msgstr "La \"prioridad de la extensión\" debe ser un valor positivo" + +#. module: asterisk_click2dial +#: field:asterisk.server,password:0 +msgid "AMI password" +msgstr "Contraseña AMI" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "SIP" +msgstr "SIP" + +#. module: asterisk_click2dial +#: field:asterisk.server,international_prefix:0 +msgid "International prefix" +msgstr "Prefijo internacional" + +#. module: asterisk_click2dial +#: help:asterisk.server,ip_address:0 +msgid "IPv4 address or DNS name of the Asterisk server." +msgstr "Dirección IPv4 o nombre DNS del servidor Asterisk." + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "mISDN" +msgstr "mISDN" + +#. module: asterisk_click2dial +#: constraint:ir.model:0 +msgid "" +"The Object name must start with x_ and not contain any special character !" +msgstr "" +"¡El nombre del objeto debe empezar con x_ y no contener ningún carácter " +"especial!" + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Dial" +msgstr "Marcar" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'country prefix'" +msgstr "Sólo utilizar dígitos para el \"prefijo del país\"" + +#. module: asterisk_click2dial +#: field:res.users,asterisk_server_id:0 +msgid "Asterisk server" +msgstr "Servidor Asterisk" + +#. module: asterisk_click2dial +#: help:res.users,asterisk_server_id:0 +msgid "Asterisk server on which the user's phone is connected." +msgstr "" +"Servidor de Asterisk en el que el teléfono del usuario está conectado." + +#. module: asterisk_click2dial +#: model:ir.actions.act_window,name:asterisk_click2dial.action_asterisk_server +#: model:ir.model,name:asterisk_click2dial.model_asterisk_server +msgid "Asterisk Servers" +msgstr "Servidores Asterisk" + +#. module: asterisk_click2dial +#: constraint:ir.actions.act_window:0 +msgid "Invalid model name in the action definition." +msgstr "Nombre del modelo inválido en la definición de acción." + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "DAHDI" +msgstr "DAHDI" + +#. module: asterisk_click2dial +#: help:asterisk.server,extension_priority:0 +msgid "" +"Priority of the extension in the Asterisk dialplan. Refer to " +"/etc/asterisk/extensions.conf on your Asterisk server." +msgstr "" +"Prioridad de la extensión en el dialplan de Asterisk. Se refieren a " +"/etc/asterisk/extensions.conf en el servidor Asterisk." + +#. module: asterisk_click2dial +#: field:res.users,callerid:0 +msgid "Caller ID" +msgstr "ID de llamada" + +#. module: asterisk_click2dial +#: model:ir.module.module,description:asterisk_click2dial.module_meta_information +msgid "" +"The module adds dial button in partner address\n" +"so that you can directly dial a phone number through Asterisk.\n" +"Documentation is available on the Arkretion Web site http://[TODO]" +msgstr "" +"Este módulo agrega un botón de marcación en la dirección de la empresa\n" +"de modo que puede llamar directamente un número de teléfono a través de " +"Asterisk.\n" +"La documentación está disponible en el sitio Web http:// Arkretion [TODO]" + +#. module: asterisk_click2dial +#: help:asterisk.server,name:0 +msgid "Asterisk server name." +msgstr "Nombre del servidor Asterisk." + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Mobile : " +msgstr "Móvil : " + +#. module: asterisk_click2dial +#: field:asterisk.server,login:0 +msgid "AMI login" +msgstr "login AMI" + +#. module: asterisk_click2dial +#: view:res.company:0 +msgid "Asterisk servers for click2dial" +msgstr "Servidores de Asterisk para click2dial" + +#. module: asterisk_click2dial +#: field:asterisk.server,wait_time:0 +msgid "Wait time (sec)" +msgstr "Tiempo de espera (seg)" + +#. module: asterisk_click2dial +#: field:asterisk.server,context:0 +msgid "Dialplan context" +msgstr "Contexto del plan de marcado" + +#. module: asterisk_click2dial +#: field:asterisk.server,extension_priority:0 +msgid "Extension priority" +msgstr "Prioridad de extensión" + +#. module: asterisk_click2dial +#: field:asterisk.server,company_id:0 +msgid "Company" +msgstr "Compañía" + +#. module: asterisk_click2dial +#: help:asterisk.server,country_prefix:0 +msgid "" +"Phone prefix of the country where the Asterisk server is located. For e.g. " +"the phone prefix for France is '33'. If the phone number to dial starts with " +"the 'My country prefix', OpenERP will remove the country prefix from the " +"phone number and add the 'out prefix' followed by the 'national prefix'. If " +"the phone number to dial doesn't start with the 'My country prefix', OpenERP " +"will add the 'out prefix' followed by the 'international prefix'." +msgstr "" +"Prefijo telefónico del país donde se encuentra el servidor Asterisk. Por " +"ejemplo, el prefijo telefónico de Francia es \"33\". Si el número de " +"teléfono para marcar comienza con el \"Mi prefijo del país\", OpenERP " +"eliminará el prefijo del país a partir del número de teléfono y agregar el " +"\"prefijo exterior\" seguido por el \"prefijo nacional\". Si el número de " +"teléfono para marcar no se inicia con el \"Mi prefijo del país\", OpenERP le " +"agrega el \"prefijo exterior\" seguido por el \"prefijo internacional\"." + +#. module: asterisk_click2dial +#: help:asterisk.server,out_prefix:0 +msgid "" +"Prefix to dial to place outgoing calls. If you don't use a prefix to place " +"outgoing calls, leave empty." +msgstr "" +"Prefijo que marcar para realizar llamadas. Si usted no usa un prefijo para " +"realizar llamadas, dejar en blanco." + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "Zap" +msgstr "Zap" + +#. module: asterisk_click2dial +#: help:asterisk.server,context:0 +msgid "" +"Asterisk dialplan context from which the calls will be made. Refer to " +"/etc/asterisk/extensions.conf on your Asterisk server." +msgstr "" +"Contexto dialplan de Asterisk desde la que las llamadas se realizarán. Se " +"refieren a /etc/asterisk/extensions.conf en el servidor Asterisk." + +#. module: asterisk_click2dial +#: help:res.users,callerid:0 +msgid "Caller ID used for the calls initiated by this user." +msgstr "ID llamada que utiliza para las llamadas iniciadas por este usuario." + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "IAX2" +msgstr "IAX2" + +#. module: asterisk_click2dial +#: view:res.company:0 +msgid "IPBX" +msgstr "IPBX" + +#. module: asterisk_click2dial +#: model:ir.module.module,shortdesc:asterisk_click2dial.module_meta_information +msgid "Asterisk Click2dial" +msgstr "Asterisk Click2dial" + +#. module: asterisk_click2dial +#: help:res.company,asterisk_server_ids:0 +msgid "List of Asterisk servers." +msgstr "Lista de servidores de Asterisk." + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "MGCP" +msgstr "MGCP" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "Skinny" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:ir.ui.view:0 +msgid "Invalid XML for View Architecture!" +msgstr "¡XML inválido para la definición de la vista!" + +#. module: asterisk_click2dial +#: help:res.users,internal_number:0 +msgid "User's internal phone number." +msgstr "Número de teléfono interno del usuario." + +#. module: asterisk_click2dial +#: help:asterisk.server,national_prefix:0 +msgid "" +"Prefix for national phone calls (don't include the 'out prefix'). For e.g., " +"in France, the phone numbers look like '01 41 98 12 42' : the National " +"prefix is '0'." +msgstr "" +"Prefijo para llamadas nacionales (sin incluir el prefijo 'exterior'). Por " +"ejemplo, en Francia, los números de teléfono parecen '01 41 98 12 42 \": el " +"prefijo nacional es '0 '." + +#. module: asterisk_click2dial +#: help:asterisk.server,port:0 +msgid "" +"TCP port on which the Asterisk Manager Interface listens. Defined in " +"/etc/asterisk/manager.conf on Asterisk." +msgstr "" +"Puerto TCP en el que la interfaz de Asterisk Manager escucha. Se define en " +"/etc/asterisk/manager.conf en Asterisk." + +#. module: asterisk_click2dial +#: help:asterisk.server,international_prefix:0 +msgid "" +"Prefix to add to make international phone calls (don't include the 'out " +"prefix'). For e.g., in France, the International prefix is '00'." +msgstr "" +"Prefijo a añadir para hacer llamadas internacionales (no incluyen los " +"\"prefijo externo\"). Por ejemplo, en Francia, el prefijo internacional es " +"\"00\"." + +#. module: asterisk_click2dial +#: field:res.users,internal_number:0 +msgid "Internal number" +msgstr "Número interno" + +#. module: asterisk_click2dial +#: field:res.users,asterisk_chan_type:0 +msgid "Asterisk channel type" +msgstr "Tipo de canal de Asterisk" + +#. module: asterisk_click2dial +#: field:asterisk.server,out_prefix:0 +msgid "Out prefix" +msgstr "Prefijo de salida" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "TCP ports range from 1 to 65535" +msgstr "TCP puertos rango 1 a 65535" + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Phone : " +msgstr "Teléfono : " + +#. module: asterisk_click2dial +#: help:asterisk.server,company_id:0 +msgid "Company who uses the Asterisk server." +msgstr "Compañía que utiliza el servidor Asterisk." + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'out prefix' or leave empty" +msgstr "Sólo utilizar dígitos para el \"prefijo exterior\" o dejar en blanco" + +#. module: asterisk_click2dial +#: field:asterisk.server,ip_address:0 +msgid "Asterisk IP addr. or DNS" +msgstr "Dirección IP o DNS Asterisk" + +#. module: asterisk_click2dial +#: help:asterisk.server,password:0 +msgid "" +"Password that Asterisk will use to communicate with the Asterisk Manager " +"Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." +msgstr "" +"Contraseña que Asterisk va a utilizar para comunicarse con la interfaz de " +"Asterisk Manager. Se refieren a /etc/asterisk/manager.conf en su servidor " +"Asterisk." + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for 'international prefix'" +msgstr "Sólo utilizar dígitos para el \"prefijo internacional\"" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "H323" +msgstr "H323" + +#. module: asterisk_click2dial +#: field:asterisk.server,national_prefix:0 +msgid "National prefix" +msgstr "Prefijo nacional" + +#. module: asterisk_click2dial +#: field:asterisk.server,country_prefix:0 +msgid "My country prefix" +msgstr "Prefijo de mi país" + +#. module: asterisk_click2dial +#: view:asterisk.server:0 +#: field:res.company,asterisk_server_ids:0 +msgid "Asterisk servers" +msgstr "Servidores Asterisk" + +#. module: asterisk_click2dial +#: help:asterisk.server,login:0 +msgid "" +"Login that OpenERP will use to communicate with the Asterisk Manager " +"Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." +msgstr "" +"Inicio de sesión que OpenERP utilizará para comunicarse con la interfaz de " +"Asterisk Manager. Se refieren a /etc/asterisk/manager.conf en su servidor " +"Asterisk." + +#. module: asterisk_click2dial +#: field:asterisk.server,name:0 +msgid "Asterisk server name" +msgstr "Nombre servidor Asterisk" + +#. module: asterisk_click2dial +#: help:asterisk.server,wait_time:0 +msgid "" +"Amount of time (in seconds) Asterisk will try to reach the user's phone " +"before hanging up." +msgstr "" +"Cantidad de tiempo (en segundos) Asterisk intentará llegar a el teléfono del " +"usuario antes de colgar." + +#. module: asterisk_click2dial +#: help:res.users,asterisk_chan_type:0 +msgid "" +"Asterisk channel type, as used in the Asterisk dialplan. If the user has a " +"regular IP phone, the channel type is 'SIP'." +msgstr "" +"Tipo de canal de Asterisk, que se utiliza en el dialplan de Asterisk. Si el " +"usuario tiene un teléfono IP, el tipo de canal es \"SIP\"." + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'national prefix' or leave empty" +msgstr "Sólo utilizar dígitos para el 'prefijo nacional' o dejar en blanco" + +#. module: asterisk_click2dial +#: field:asterisk.server,port:0 +msgid "Port" +msgstr "Puerto" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "You should enter a 'Wait time' value between 1 and 120 seconds" +msgstr "" +"Debe ingresar el valor de un \"tiempo de espera\" entre 1 y 120 segundos" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "Can't resolve the DNS of the Asterisk server : " +msgstr "No se puede resolver el DNS del servidor de Asterisk: " + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "Invalid phone number" +msgstr "Número de teléfono no válido" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "" +"The phone number is not written in valid international format. Example of " +"valid international format : +33 1 41 98 12 42" +msgstr "" +"El número de teléfono no está escrito en formato internacional válido. " +"Ejemplo de formato internacional válida: +33 1 41 98 12 42" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "The phone number is not written in valid national format." +msgstr "El número de teléfono no está escrito en el formato nacional válido." + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "The phone number is not written in valid format." +msgstr "El número de teléfono no está escrito en el formato válido." + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "Error :" +msgstr "Error:" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "There is no phone number !" +msgstr "No hay un número de teléfono!" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "No Asterisk server configured for the current user." +msgstr "No hay ningún servidor Asterisk configurado para el usuario actual." + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "No channel type configured for the current user." +msgstr "Ningún tipo de canal configurado para el usuario actual." + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "No internal phone number configured for the current user" +msgstr "No hay número de teléfono interno configurado para el usuario actual" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "" +"The connection from OpenERP to the Asterisk server failed. Please check the " +"configuration on OpenERP and on Asterisk." +msgstr "" +"La conexión de OpenERP al servidor de Asterisk ha fallado. Compruebe la " +"configuración de OpenERP y de Asterisk." diff --git a/asterisk_click2dial/i18n/fr_FR.po b/asterisk_click2dial/i18n/fr_FR.po index be2fbff..edd433f 100644 --- a/asterisk_click2dial/i18n/fr_FR.po +++ b/asterisk_click2dial/i18n/fr_FR.po @@ -5,9 +5,9 @@ msgid "" msgstr "" "Project-Id-Version: OpenERP Server 5.0.14\n" -"Report-Msgid-Bugs-To: support@openerp.com\n" -"POT-Creation-Date: 2010-09-10 20:15:08+0000\n" -"PO-Revision-Date: 2010-09-10 20:15:08+0000\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2012-05-28 19:59+0000\n" +"PO-Revision-Date: 2012-05-28 19:59+0000\n" "Last-Translator: Alexis de Lattre \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -16,14 +16,10 @@ msgstr "" "Plural-Forms: \n" #. module: asterisk_click2dial -#: constraint:asterisk.server:0 -msgid "The 'extension priority' must be a positive value" -msgstr "La priorité de l'extension doit être une valeur positive" - -#. module: asterisk_click2dial -#: field:asterisk.server,password:0 -msgid "AMI password" -msgstr "Mot de passe AMI" +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Dial" +msgstr "Appeler" #. module: asterisk_click2dial #: selection:res.users,asterisk_chan_type:0 @@ -31,162 +27,227 @@ msgid "SIP" msgstr "SIP" #. module: asterisk_click2dial -#: field:asterisk.server,international_prefix:0 -msgid "International prefix" -msgstr "Préfixe international" +#: help:asterisk.server,ip_address:0 +msgid "IP address or DNS name of the Asterisk server." +msgstr "Adresse IP ou DNS du serveur Asterisk." #. module: asterisk_click2dial -#: help:asterisk.server,ip_address:0 -msgid "IPv4 address or DNS name of the Asterisk server." -msgstr "Adresse IPv4 ou nom DNS du serveur Asterisk." +#: field:wizard.open.calling.partner,current_phone:0 +msgid "Current phone" +msgstr "Tél. actuel" #. module: asterisk_click2dial -#: selection:res.users,asterisk_chan_type:0 -msgid "mISDN" -msgstr "mISDN" +#: field:res.users,callerid:0 +msgid "Caller ID" +msgstr "Identification de l'appelant" #. module: asterisk_click2dial -#: constraint:ir.model:0 -msgid "The Object name must start with x_ and not contain any special character !" -msgstr "Le nom de l'objet doit commencer avec x_ et ne pas contenir de charactères spéciaux !" +#: field:asterisk.server,wait_time:0 +msgid "Wait time (sec)" +msgstr "Temps d'attente (sec)" #. module: asterisk_click2dial -#: view:res.partner:0 -#: view:res.partner.address:0 -msgid "Dial" -msgstr "Appeler" +#: field:asterisk.server,context:0 +msgid "Dialplan context" +msgstr "Contexte du dialplan" #. module: asterisk_click2dial -#: constraint:asterisk.server:0 -msgid "Only use digits for the 'country prefix'" -msgstr "N'utiliser que des chiffres pour le préfixe du pays" +#: field:asterisk.server,company_id:0 +msgid "Company" +msgstr "Société" #. module: asterisk_click2dial -#: field:res.users,asterisk_server_id:0 -msgid "Asterisk server" -msgstr "Serveur Asterisk" +#: help:asterisk.server,out_prefix:0 +msgid "Prefix to dial to place outgoing calls. If you don't use a prefix to place outgoing calls, leave empty." +msgstr "Préfixe à composer pour appeler vers l'extérieur. Si vous n'avez pas à composer un préfixe pour appeler vers l'extérieur, laissez vide." #. module: asterisk_click2dial -#: help:res.users,asterisk_server_id:0 -msgid "Asterisk server on which the user's phone is connected." -msgstr "Serveur Asterisk sur lequel le téléphone de l'utilisateur est connecté." +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:111 +#, python-format +msgid "The phone number is not written in valid international format. Example of valid international format : +33 1 41 98 12 42" +msgstr "Le numéro de téléphone n'est pas dans un format international valide. Exemple de numéro de téléphone dans un format international valide : +33 1 41 98 12 42" #. module: asterisk_click2dial -#: model:ir.actions.act_window,name:asterisk_click2dial.action_asterisk_server -#: model:ir.model,name:asterisk_click2dial.model_asterisk_server -msgid "Asterisk Servers" -msgstr "Serveurs Asterisk" +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:113 +#, python-format +msgid "The phone number is not written in valid format." +msgstr "Le numéro de téléphone n'est pas dans un format valide." #. module: asterisk_click2dial -#: constraint:ir.actions.act_window:0 -msgid "Invalid model name in the action definition." -msgstr "Invalid model name in the action definition." +#: field:asterisk.server,national_prefix:0 +msgid "National prefix" +msgstr "Préfixe national" #. module: asterisk_click2dial -#: selection:res.users,asterisk_chan_type:0 -msgid "DAHDI" -msgstr "DAHDI" +#: help:asterisk.server,national_format_allowed:0 +msgid "Do we allow to use click2dial on phone numbers written in national format, e.g. 01 41 98 12 42, or only in the international format, e.g. +33 1 41 98 12 42 ?" +msgstr "Do we allow to use click2dial on phone numbers written in national format, e.g. 01 41 98 12 42, or only in the international format, e.g. +33 1 41 98 12 42 ?" #. module: asterisk_click2dial -#: help:asterisk.server,extension_priority:0 -msgid "Priority of the extension in the Asterisk dialplan. Refer to /etc/asterisk/extensions.conf on your Asterisk server." -msgstr "Priorité de l'extension dans le dialplan d'Asterisk. Cf /etc/asterisk/extensions.conf sur le serveur Asterisk." +#: field:asterisk.server,out_prefix:0 +msgid "Out prefix" +msgstr "Préfixe pour l'extérieur" #. module: asterisk_click2dial -#: field:res.users,callerid:0 -msgid "Caller ID" -msgstr "Identification de l'appelant" +#: help:asterisk.server,port:0 +msgid "TCP port on which the Asterisk Manager Interface listens. Defined in /etc/asterisk/manager.conf on Asterisk." +msgstr "Port TCP sur lequel écoute l'interface du Manager Asterisk. Cf /etc/asterisk/manager.conf sur le serveur Asterisk." #. module: asterisk_click2dial -#: help:asterisk.server,name:0 -msgid "Asterisk server name." -msgstr "Nom du serveur Asterisk." +#: view:wizard.open.calling.partner:0 +msgid "Update an existing contact" +msgstr "Mettre à jour un contact existant" #. module: asterisk_click2dial -#: view:res.partner:0 -#: view:res.partner.address:0 -msgid "Mobile : " -msgstr "Portable : " +#: field:res.users,internal_number:0 +msgid "Internal number" +msgstr "Numéro interne" #. module: asterisk_click2dial -#: field:asterisk.server,login:0 -msgid "AMI login" -msgstr "Nom d'utilisateur AMI" +#: field:res.users,asterisk_chan_type:0 +msgid "Asterisk channel type" +msgstr "Type de canal Asterisk" #. module: asterisk_click2dial -#: view:res.company:0 -msgid "Asterisk servers for click2dial" -msgstr "Serveurs Asterisk pour le click2dial" +#: constraint:asterisk.server:0 +#: constraint:res.users:0 +msgid "Error message in raise" +msgstr "Error message in raise" #. module: asterisk_click2dial -#: field:asterisk.server,wait_time:0 -msgid "Wait time (sec)" -msgstr "Temps d'attente (sec)" +#: help:asterisk.server,national_prefix:0 +msgid "Prefix for national phone calls (don't include the 'out prefix'). For e.g., in France, the phone numbers look like '01 41 98 12 42' : the National prefix is '0'." +msgstr "Préfixe pour les appels nationaux (ne pas inclure le préfixe pour l'extérieur). Par exemple, en France, les numéros de téléphone sont du type '01 41 98 12 42' ; le préfixe national est '0'." #. module: asterisk_click2dial -#: field:asterisk.server,context:0 -msgid "Dialplan context" -msgstr "Contexte du dialplan" +#: view:wizard.open.calling.partner:0 +msgid "Create a new contact" +msgstr "Créer un nouveau contact" #. module: asterisk_click2dial -#: field:asterisk.server,extension_priority:0 -msgid "Extension priority" -msgstr "Priorité de l'extension" +#: help:asterisk.server,password:0 +msgid "Password that Asterisk will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." +msgstr "Password that Asterisk will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." #. module: asterisk_click2dial -#: field:asterisk.server,company_id:0 -msgid "Company" -msgstr "Société" +#: field:wizard.open.calling.partner,calling_number:0 +msgid "Calling number" +msgstr "Numéro appelant" #. module: asterisk_click2dial -#: help:asterisk.server,country_prefix:0 -msgid "Phone prefix of the country where the Asterisk server is located. For e.g. the phone prefix for France is '33'. If the phone number to dial starts with the 'My country prefix', OpenERP will remove the country prefix from the phone number and add the 'out prefix' followed by the 'national prefix'. If the phone number to dial doesn't start with the 'My country prefix', OpenERP will add the 'out prefix' followed by the 'international prefix'." -msgstr "Préfixe téléphonique du pays dans lequel est situé le serveur Asterisk. Par exemple, le préfixe téléphonique de la France est '33'. Si le numéro de téléphone à appeler commence par le préfixe du pays, OpenERP supprimera ce préfixe du numéro de téléphone à composer et ajoutera le préfixe pour l'extérieur suivi par le préfixe national. Si le numéro de téléphone à appeler ne commence pas par le préfixe du pays, OpenERP ajoutera le préfixe pour l'extérieur suivi par le préfixe international." +#: field:res.users,alert_info:0 +msgid "User-specific Alert-Info SIP header" +msgstr "En-tête SIP Alert-Info spécifique à l'utilisateur" #. module: asterisk_click2dial -#: selection:res.users,asterisk_chan_type:0 -msgid "Skinny" -msgstr "Skinny" +#: help:asterisk.server,active:0 +msgid "The active field allows you to hide the Asterisk server without deleting it." +msgstr "The active field allows you to hide the Asterisk server without deleting it." #. module: asterisk_click2dial -#: help:asterisk.server,context:0 -msgid "Asterisk dialplan context from which the calls will be made. Refer to /etc/asterisk/extensions.conf on your Asterisk server." -msgstr "Contexte du dialplan d'Asterisk depuis lequel les appels seront initiés. Cf /etc/asterisk/extensions.conf sur le serveur Asterisk." +#: view:res.users:0 +msgid "Telephony" +msgstr "Téléphonie" #. module: asterisk_click2dial -#: help:res.users,callerid:0 -msgid "Caller ID used for the calls initiated by this user." -msgstr "'Caller ID' des appels passés par l'utilisateur." +#: view:asterisk.server:0 +#: model:ir.actions.act_window,name:asterisk_click2dial.action_asterisk_server +#: model:ir.ui.menu,name:asterisk_click2dial.act_menu_ast_server +#: field:res.company,asterisk_server_ids:0 +msgid "Asterisk servers" +msgstr "Serveurs Asterisk" + +#. module: asterisk_click2dial +#: help:wizard.open.calling.partner,partner_id:0 +msgid "Partner related to the calling number" +msgstr "Partenaire associé au numéro appelant" + +#. module: asterisk_click2dial +#: field:wizard.open.calling.partner,partner_id:0 +msgid "Partner" +msgstr "Partenaire" + +#. module: asterisk_click2dial +#: field:asterisk.server,alert_info:0 +msgid "Alert-Info SIP header" +msgstr "En-tête SIP Alert-Info SIP" #. module: asterisk_click2dial #: selection:res.users,asterisk_chan_type:0 -msgid "IAX2" -msgstr "IAX2" +msgid "mISDN" +msgstr "mISDN" #. module: asterisk_click2dial -#: view:res.company:0 -msgid "IPBX" -msgstr "IPBX" +#: model:ir.model,name:asterisk_click2dial.model_res_company +msgid "Companies" +msgstr "Sociétés" #. module: asterisk_click2dial -#: model:ir.module.module,shortdesc:asterisk_click2dial.module_meta_information -msgid "Asterisk Click2dial" -msgstr "Asterisk Click2dial" +#: help:wizard.open.calling.partner,partner_address_id:0 +msgid "Partner contact related to the calling number" +msgstr "Contact partenaire associé au numéro de l'appelant" #. module: asterisk_click2dial -#: help:res.company,asterisk_server_ids:0 -msgid "List of Asterisk servers." -msgstr "Liste des serveurs Asterisk." +#: constraint:res.company:0 +msgid "Error! You can not create recursive companies." +msgstr "Erreur ! Vous ne pouvez pas créer de sociétés récursives" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:275 +#, python-format +msgid "No callerID configured for the current user" +msgstr "No callerID configured for the current user" + +#. module: asterisk_click2dial +#: field:asterisk.server,national_format_allowed:0 +msgid "National format allowed ?" +msgstr "Format national autorisé ?" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:511 +#, python-format +msgid "Could not get the calling number from Asterisk. Check your setup and look at the OpenERP debug logs." +msgstr "Could not get the calling number from Asterisk. Check your setup and look at the OpenERP debug logs." + +#. module: asterisk_click2dial +#: help:asterisk.server,name:0 +msgid "Asterisk server name." +msgstr "Nom du serveur Asterisk." + +#. module: asterisk_click2dial +#: field:asterisk.server,country_prefix:0 +msgid "My country prefix" +msgstr "Préfixe du pays" #. module: asterisk_click2dial #: selection:res.users,asterisk_chan_type:0 -msgid "MGCP" -msgstr "MGCP" +msgid "IAX2" +msgstr "IAX2" #. module: asterisk_click2dial -#: constraint:ir.ui.view:0 -msgid "Invalid XML for View Architecture!" -msgstr "XML non valide pour l'architecture de la vue" +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:80 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:82 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:84 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:86 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:92 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:195 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:229 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:233 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:244 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:264 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:270 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:275 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:301 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:311 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:339 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:395 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:414 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:511 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:522 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:614 +#, python-format +msgid "Error :" +msgstr "Erreur :" #. module: asterisk_click2dial #: help:res.users,internal_number:0 @@ -194,14 +255,22 @@ msgid "User's internal phone number." msgstr "Numéro de téléphone interne de l'utilisateur." #. module: asterisk_click2dial -#: constraint:asterisk.server:0 -msgid "You should enter a 'Wait time' value between 1 and 120 seconds" -msgstr "Vous devez entrer un temps d'attente compris entre 1 et 120 secondes" +#: model:ir.actions.act_window,name:asterisk_click2dial.action_open_calling_partner +#: model:ir.ui.menu,name:asterisk_click2dial.menu_open_calling_partner_sales +#: view:wizard.open.calling.partner:0 +msgid "Open calling partner" +msgstr "Ouvrir le partenaire appelant" #. module: asterisk_click2dial -#: help:asterisk.server,port:0 -msgid "TCP port on which the Asterisk Manager Interface listens. Defined in /etc/asterisk/manager.conf on Asterisk." -msgstr "Port TCP sur lequel écoute l'interface du Manager Asterisk. Cf /etc/asterisk/manager.conf sur le serveur Asterisk." +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:414 +#, python-format +msgid "There is no phone number !" +msgstr "Il n'y a pas de numéro de téléphone !" + +#. module: asterisk_click2dial +#: model:ir.model,name:asterisk_click2dial.model_wizard_open_calling_partner +msgid "wizard.open.calling.partner" +msgstr "wizard.open.calling.partner" #. module: asterisk_click2dial #: help:asterisk.server,international_prefix:0 @@ -209,87 +278,156 @@ msgid "Prefix to add to make international phone calls (don't include the 'out p msgstr "Préfixe à ajouter pour passer des appels vers l'étranger (ne pas inclure le préfixe pour l'extérieur). Par exemple, en France, le préfixe pour l'international est '00'." #. module: asterisk_click2dial -#: help:asterisk.server,national_prefix:0 -msgid "Prefix for national phone calls (don't include the 'out prefix'). For e.g., in France, the phone numbers look like '01 41 98 12 42' : the National prefix is '0'." -msgstr "Préfixe pour les appels nationaux (ne pas inclure le préfixe pour l'extérieur). Par exemple, en France, les numéros de téléphone sont du type '01 41 98 12 42' ; le préfixe national est '0'." +#: help:res.users,asterisk_chan_type:0 +msgid "Asterisk channel type, as used in the Asterisk dialplan. If the user has a regular IP phone, the channel type is 'SIP'." +msgstr "Type de canal Asterisk, tel qu'utilisé dans le dialplan d'Asterisk. Si l'utilisateur a un téléphone IP classique, le type de canal est 'SIP'." +#. module: asterisk_click2dial +#: help:asterisk.server,company_id:0 +msgid "Company who uses the Asterisk server." +msgstr "Société qui utilise le serveur Asterisk." #. module: asterisk_click2dial -#: field:res.users,internal_number:0 -msgid "Internal number" -msgstr "Numéro interne" +#: help:wizard.open.calling.partner,calling_number:0 +msgid "Phone number of calling party that has been obtained from Asterisk." +msgstr "Phone number of calling party that has been obtained from Asterisk." #. module: asterisk_click2dial -#: field:res.users,asterisk_chan_type:0 -msgid "Asterisk channel type" -msgstr "Type de canal Asterisk" +#: view:wizard.open.calling.partner:0 +msgid "Contact form" +msgstr "Fiche du contact" #. module: asterisk_click2dial -#: field:asterisk.server,out_prefix:0 -msgid "Out prefix" -msgstr "Préfixe pour l'extérieur" +#: field:wizard.open.calling.partner,current_mobile:0 +msgid "Current mobile" +msgstr "Tél. portable actuel" #. module: asterisk_click2dial -#: constraint:asterisk.server:0 -msgid "TCP ports range from 1 to 65535" -msgstr "Les ports TCP vont de 1 à 65535" +#: help:asterisk.server,wait_time:0 +msgid "Amount of time (in seconds) Asterisk will try to reach the user's phone before hanging up." +msgstr "Temps (en secondes) pendant lequel Asterisk essayera de joindre le téléphone de l'utilisateur avant d'abandonner." #. module: asterisk_click2dial -#: view:res.partner:0 -#: view:res.partner.address:0 -msgid "Phone : " -msgstr "Téléphone : " +#: model:ir.model,name:asterisk_click2dial.model_res_partner_address +msgid "Partner Addresses" +msgstr "Carnet d'adresses" #. module: asterisk_click2dial -#: help:asterisk.server,company_id:0 -msgid "Company who uses the Asterisk server." -msgstr "Société qui utilise le serveur Asterisk." +#: selection:res.users,asterisk_chan_type:0 +msgid "Zap" +msgstr "Zap" #. module: asterisk_click2dial -#: constraint:asterisk.server:0 -msgid "Only use digits for the 'out prefix' or leave empty" -msgstr "N'utiliser que des chiffres pour le préfixe pour appeler vers l'extérieur ou laisser vide" +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:229 +#, python-format +msgid "No channel type configured for the current user." +msgstr "Aucun type de canal n'est configuré pour le présent utilisateur." #. module: asterisk_click2dial -#: field:asterisk.server,ip_address:0 -msgid "Asterisk IP addr. or DNS" -msgstr "Adr. IP ou DNS d'Asterisk" +#: field:asterisk.server,international_prefix:0 +msgid "International prefix" +msgstr "Préfixe international" #. module: asterisk_click2dial -#: help:asterisk.server,password:0 -msgid "Password that Asterisk will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." -msgstr "Password that Asterisk will use to communicate with the Asterisk Manager Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." +#: constraint:res.users:0 +msgid "The chosen company is not in the allowed companies for this user" +msgstr "La société choisie n'est pas autorisée pour cet utilisateur." #. module: asterisk_click2dial -#: help:asterisk.server,out_prefix:0 -msgid "Prefix to dial to place outgoing calls. If you don't use a prefix to place outgoing calls, leave empty." -msgstr "Préfixe à composer pour appeler vers l'extérieur. Si vous n'avez pas à composer un préfixe pour appeler vers l'extérieur, laissez vide." +#: view:wizard.open.calling.partner:0 +msgid "Update mobile" +msgstr "Mettre à jour le portable" #. module: asterisk_click2dial -#: constraint:asterisk.server:0 -msgid "Only use digits for 'international prefix'" -msgstr "N'utiliser que des chiffres pour le préfixe international" +#: field:asterisk.server,extension_priority:0 +msgid "Extension priority" +msgstr "Priorité de l'extension" + +#. module: asterisk_click2dial +#: model:res.groups,name:asterisk_click2dial.group_asterisk_cid +msgid "Asterisk CallerID" +msgstr "Asterisk CallerID" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:339 +#, python-format +msgid "The connection from OpenERP to the Asterisk server failed. Please check the configuration on OpenERP and on Asterisk." +msgstr "La connexion depuis OpenERP vers le serveur Asterisk a échoué. Vérifiez la configuration côté OpenERP et côté Asterisk." + +#. module: asterisk_click2dial +#: help:asterisk.server,context:0 +msgid "Asterisk dialplan context from which the calls will be made. Refer to /etc/asterisk/extensions.conf on your Asterisk server." +msgstr "Contexte du dialplan d'Asterisk depuis lequel les appels seront initiés. Cf /etc/asterisk/extensions.conf sur le serveur Asterisk." + +#. module: asterisk_click2dial +#: help:asterisk.server,extension_priority:0 +msgid "Priority of the extension in the Asterisk dialplan. Refer to /etc/asterisk/extensions.conf on your Asterisk server." +msgstr "Priorité de l'extension dans le dialplan d'Asterisk. Cf /etc/asterisk/extensions.conf sur le serveur Asterisk." + +#. module: asterisk_click2dial +#: view:res.users:0 +msgid "User" +msgstr "Utilisateur" + +#. module: asterisk_click2dial +#: field:asterisk.server,active:0 +msgid "Active" +msgstr "Actif" #. module: asterisk_click2dial #: selection:res.users,asterisk_chan_type:0 -msgid "H323" -msgstr "H323" +msgid "MGCP" +msgstr "MGCP" #. module: asterisk_click2dial -#: field:asterisk.server,national_prefix:0 -msgid "National prefix" -msgstr "Préfixe national" +#: field:wizard.open.calling.partner,to_update_partner_address_id:0 +msgid "Contact to update" +msgstr "Contact à mettre à jour" #. module: asterisk_click2dial -#: field:asterisk.server,country_prefix:0 -msgid "My country prefix" -msgstr "Préfixe du pays" +#: view:wizard.open.calling.partner:0 +msgid "Related sale orders" +msgstr "Bons de commande associés" #. module: asterisk_click2dial -#: view:asterisk.server:0 -#: field:res.company,asterisk_server_ids:0 -msgid "Asterisk servers" -msgstr "Serveurs Asterisk" +#: help:res.users,variable:0 +msgid "Set a user-specific 'Variable' field in the Asterisk Manager Interface 'originate' request for the click2dial feature. If you want to have several variable headers, separate them with '|'." +msgstr "Set a user-specific 'Variable' field in the Asterisk Manager Interface 'originate' request for the click2dial feature. If you want to have several variable headers, separate them with '|'." + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "Skinny" +msgstr "Skinny" + +#. module: asterisk_click2dial +#: help:res.users,alert_info:0 +msgid "Set a user-specific Alert-Info header in SIP request to user's IP Phone for the click2dial feature. If empty, the Alert-Info header will not be added. You can use it to have a special ring tone for click2dial (a silent one !) or to activate auto-answer for example. If you want to have several variable headers, separate them with '|'." +msgstr "Set a user-specific Alert-Info header in SIP request to user's IP Phone for the click2dial feature. If empty, the Alert-Info header will not be added. You can use it to have a special ring tone for click2dial (a silent one !) or to activate auto-answer for example. If you want to have several variable headers, separate them with '|'." + +#. module: asterisk_click2dial +#: view:wizard.open.calling.partner:0 +msgid "with calling number as mobile" +msgstr "avec le numéro appelant comme portable" + +#. module: asterisk_click2dial +#: field:wizard.open.calling.partner,partner_address_id:0 +msgid "Contact name" +msgstr "Nom du contact" + +#. module: asterisk_click2dial +#: sql_constraint:res.users:0 +msgid "You can not have two users with the same login !" +msgstr "VOus ne pouvez pas avoir deux utilsiateurs avec le même login !" + +#. module: asterisk_click2dial +#: field:asterisk.server,ip_address:0 +msgid "Asterisk IP addr. or DNS" +msgstr "Adr. IP ou DNS d'Asterisk" + +#. module: asterisk_click2dial +#: help:res.company,asterisk_server_ids:0 +msgid "List of Asterisk servers." +msgstr "Liste des serveurs Asterisk." #. module: asterisk_click2dial #: help:asterisk.server,login:0 @@ -302,93 +440,129 @@ msgid "Asterisk server name" msgstr "Nom du serveur Asterisk" #. module: asterisk_click2dial -#: help:asterisk.server,wait_time:0 -msgid "Amount of time (in seconds) Asterisk will try to reach the user's phone before hanging up." -msgstr "Temps (en secondes) pendant lequel Asterisk essayera de joindre le téléphone de l'utilisateur avant d'abandonner." +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:233 +#, python-format +msgid "No internal phone number configured for the current user" +msgstr "Aucun numéro de téléphone interne n'est configuré pour le présent utilisateur." #. module: asterisk_click2dial -#: help:res.users,asterisk_chan_type:0 -msgid "Asterisk channel type, as used in the Asterisk dialplan. If the user has a regular IP phone, the channel type is 'SIP'." -msgstr "Type de canal Asterisk, tel qu'utilisé dans le dialplan d'Asterisk. Si l'utilisateur a un téléphone IP classique, le type de canal est 'SIP'." +#: view:wizard.open.calling.partner:0 +msgid "Cancel" +msgstr "Annuler" #. module: asterisk_click2dial -#: constraint:asterisk.server:0 -msgid "Only use digits for the 'national prefix' or leave empty" -msgstr "N'utiliser que des chiffres pour le préfixe national ou laisser vide" +#: model:ir.model,name:asterisk_click2dial.model_res_users +msgid "res.users" +msgstr "res.users" #. module: asterisk_click2dial -#: field:asterisk.server,port:0 -msgid "Port" -msgstr "Port" +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:112 +#, python-format +msgid "The phone number is not written in valid national format." +msgstr "Le numéro de téléphone n'est pas dans un format national valide." + +#. module: asterisk_click2dial +#: field:asterisk.server,password:0 +msgid "AMI password" +msgstr "Mot de passe AMI" + +#. module: asterisk_click2dial +#: view:wizard.open.calling.partner:0 +msgid "Partner form" +msgstr "Fiche partenaire" + +#. module: asterisk_click2dial +#: help:res.users,asterisk_server_id:0 +msgid "Asterisk server on which the user's phone is connected. If you leave this field empty, it will use the first Asterisk server of the user's company." +msgstr "Asterisk server on which the user's phone is connected. If you leave this field empty, it will use the first Asterisk server of the user's company." + +#. module: asterisk_click2dial +#: field:res.users,asterisk_server_id:0 +msgid "Asterisk server" +msgstr "Serveur Asterisk" + +#. module: asterisk_click2dial +#: model:ir.model,name:asterisk_click2dial.model_asterisk_server +msgid "Asterisk Servers" +msgstr "Serveurs Asterisk" #. module: asterisk_click2dial #: selection:res.users,asterisk_chan_type:0 -msgid "Zap" -msgstr "Zap" +msgid "DAHDI" +msgstr "DAHDI" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "Can't resolve the DNS of the Asterisk server : " -msgstr "Impossible de résoudre la DNS du serveur Asterisk : " +#: field:asterisk.server,login:0 +msgid "AMI login" +msgstr "Nom d'utilisateur AMI" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:195 #, python-format -msgid "Invalid phone number" -msgstr "Numéro de téléphone invalide" +msgid "No Asterisk server configured for the company '%s'." +msgstr "Aucun serveur Asterisk n'est associé à la société '%s'." #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "The phone number is not written in valid international format. Example of valid international format : +33 1 41 98 12 42" -msgstr "Le numéro de téléphone n'est pas dans un format international valide. Exemple de numéro de téléphone dans un format international valide : +33 1 41 98 12 42" +#: help:wizard.open.calling.partner,to_update_partner_address_id:0 +msgid "Partner contact on which the phone or mobile number will be written" +msgstr "Partner contact on which the phone or mobile number will be written" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "The phone number is not written in valid national format." -msgstr "Le numéro de téléphone n'est pas dans un format national valide." +#: help:asterisk.server,country_prefix:0 +msgid "Phone prefix of the country where the Asterisk server is located. For e.g. the phone prefix for France is '33'. If the phone number to dial starts with the 'My country prefix', OpenERP will remove the country prefix from the phone number and add the 'out prefix' followed by the 'national prefix'. If the phone number to dial doesn't start with the 'My country prefix', OpenERP will add the 'out prefix' followed by the 'international prefix'." +msgstr "Préfixe téléphonique du pays dans lequel est situé le serveur Asterisk. Par exemple, le préfixe téléphonique de la France est '33'. Si le numéro de téléphone à appeler commence par le préfixe du pays, OpenERP supprimera ce préfixe du numéro de téléphone à composer et ajoutera le préfixe pour l'extérieur suivi par le préfixe national. Si le numéro de téléphone à appeler ne commence pas par le préfixe du pays, OpenERP ajoutera le préfixe pour l'extérieur suivi par le préfixe international." #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "The phone number is not written in valid format." -msgstr "Le numéro de téléphone n'est pas dans un format valide." +#: help:res.users,callerid:0 +msgid "Caller ID used for the calls initiated by this user." +msgstr "'Caller ID' des appels passés par l'utilisateur." #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "Error :" -msgstr "Erreur :" +#: view:res.company:0 +msgid "IPBX" +msgstr "IPBX" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "There is no phone number !" -msgstr "Il n'y a pas de numéro de téléphone !" +#: view:wizard.open.calling.partner:0 +msgid "with calling number as phone" +msgstr "avec le numéro appelant comme tél." #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "No Asterisk server configured for the current user." -msgstr "Aucun serveur Asterisk n'est configuré pour le présent utilisateur." +#: sql_constraint:res.company:0 +msgid "The company name must be unique !" +msgstr "Le nom de la société doit être unique !" #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "No channel type configured for the current user." -msgstr "Aucun type de canal n'est configuré pour le présent utilisateur." +#: view:wizard.open.calling.partner:0 +msgid "Update phone" +msgstr "Mettre à jour le tél." #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "No internal phone number configured for the current user" -msgstr "Aucun numéro de téléphone interne n'est configuré pour le présent utilisateur." +#: help:asterisk.server,alert_info:0 +msgid "Set Alert-Info header in SIP request to user's IP Phone for the click2dial feature. If empty, the Alert-Info header will not be added. You can use it to have a special ring tone for click2dial (a silent one !) or to activate auto-answer for example. If you want to have several variable headers, separate them with '|'." +msgstr "Set Alert-Info header in SIP request to user's IP Phone for the click2dial feature. If empty, the Alert-Info header will not be added. You can use it to have a special ring tone for click2dial (a silent one !) or to activate auto-answer for example. If you want to have several variable headers, separate them with '|'." #. module: asterisk_click2dial -#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 -#, python-format -msgid "The connection from OpenERP to the Asterisk server failed. Please check the configuration on OpenERP and on Asterisk." -msgstr "La connexion depuis OpenERP vers le serveur Asterisk a échoué. Vérifiez la configuration côté OpenERP et côté Asterisk." +#: view:wizard.open.calling.partner:0 +msgid "Related invoices" +msgstr "Factures associées" +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "H323" +msgstr "H323" + +#. module: asterisk_click2dial +#: field:res.users,variable:0 +msgid "User-specific Variable" +msgstr "Variable spécifique à l'utilisateur" + +#. module: asterisk_click2dial +#: field:asterisk.server,port:0 +msgid "Port" +msgstr "Port" + +#. module: asterisk_click2dial +#: view:wizard.open.calling.partner:0 +msgid "No partner contact found in OpenERP with this number" +msgstr "Aucun contact partenaire n'a été trouvé dans OpenERP avec ce numéro" diff --git a/asterisk_click2dial/i18n/hr.po b/asterisk_click2dial/i18n/hr.po new file mode 100644 index 0000000..8adfe26 --- /dev/null +++ b/asterisk_click2dial/i18n/hr.po @@ -0,0 +1,434 @@ +# Croatian translation for openobject-addons +# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011 +# This file is distributed under the same license as the openobject-addons package. +# FIRST AUTHOR , 2011. +# +msgid "" +msgstr "" +"Project-Id-Version: openobject-addons\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2010-09-10 20:38+0000\n" +"PO-Revision-Date: 2011-12-19 15:44+0000\n" +"Last-Translator: FULL NAME \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: 2012-04-17 05:22+0000\n" +"X-Generator: Launchpad (build 15099)\n" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "The 'extension priority' must be a positive value" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,password:0 +msgid "AMI password" +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "SIP" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,international_prefix:0 +msgid "International prefix" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,ip_address:0 +msgid "IPv4 address or DNS name of the Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "mISDN" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:ir.model:0 +msgid "" +"The Object name must start with x_ and not contain any special character !" +msgstr "" + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Dial" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'country prefix'" +msgstr "" + +#. module: asterisk_click2dial +#: field:res.users,asterisk_server_id:0 +msgid "Asterisk server" +msgstr "" + +#. module: asterisk_click2dial +#: help:res.users,asterisk_server_id:0 +msgid "Asterisk server on which the user's phone is connected." +msgstr "" + +#. module: asterisk_click2dial +#: model:ir.actions.act_window,name:asterisk_click2dial.action_asterisk_server +#: model:ir.model,name:asterisk_click2dial.model_asterisk_server +msgid "Asterisk Servers" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:ir.actions.act_window:0 +msgid "Invalid model name in the action definition." +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "DAHDI" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,extension_priority:0 +msgid "" +"Priority of the extension in the Asterisk dialplan. Refer to " +"/etc/asterisk/extensions.conf on your Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: field:res.users,callerid:0 +msgid "Caller ID" +msgstr "" + +#. module: asterisk_click2dial +#: model:ir.module.module,description:asterisk_click2dial.module_meta_information +msgid "" +"The module adds dial button in partner address\n" +"so that you can directly dial a phone number through Asterisk.\n" +"Documentation is available on the Arkretion Web site http://[TODO]" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,name:0 +msgid "Asterisk server name." +msgstr "" + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Mobile : " +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,login:0 +msgid "AMI login" +msgstr "" + +#. module: asterisk_click2dial +#: view:res.company:0 +msgid "Asterisk servers for click2dial" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,wait_time:0 +msgid "Wait time (sec)" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,context:0 +msgid "Dialplan context" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,extension_priority:0 +msgid "Extension priority" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,company_id:0 +msgid "Company" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,country_prefix:0 +msgid "" +"Phone prefix of the country where the Asterisk server is located. For e.g. " +"the phone prefix for France is '33'. If the phone number to dial starts with " +"the 'My country prefix', OpenERP will remove the country prefix from the " +"phone number and add the 'out prefix' followed by the 'national prefix'. If " +"the phone number to dial doesn't start with the 'My country prefix', OpenERP " +"will add the 'out prefix' followed by the 'international prefix'." +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,out_prefix:0 +msgid "" +"Prefix to dial to place outgoing calls. If you don't use a prefix to place " +"outgoing calls, leave empty." +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "Zap" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,context:0 +msgid "" +"Asterisk dialplan context from which the calls will be made. Refer to " +"/etc/asterisk/extensions.conf on your Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: help:res.users,callerid:0 +msgid "Caller ID used for the calls initiated by this user." +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "IAX2" +msgstr "" + +#. module: asterisk_click2dial +#: view:res.company:0 +msgid "IPBX" +msgstr "" + +#. module: asterisk_click2dial +#: model:ir.module.module,shortdesc:asterisk_click2dial.module_meta_information +msgid "Asterisk Click2dial" +msgstr "" + +#. module: asterisk_click2dial +#: help:res.company,asterisk_server_ids:0 +msgid "List of Asterisk servers." +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "MGCP" +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "Skinny" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:ir.ui.view:0 +msgid "Invalid XML for View Architecture!" +msgstr "" + +#. module: asterisk_click2dial +#: help:res.users,internal_number:0 +msgid "User's internal phone number." +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,national_prefix:0 +msgid "" +"Prefix for national phone calls (don't include the 'out prefix'). For e.g., " +"in France, the phone numbers look like '01 41 98 12 42' : the National " +"prefix is '0'." +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,port:0 +msgid "" +"TCP port on which the Asterisk Manager Interface listens. Defined in " +"/etc/asterisk/manager.conf on Asterisk." +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,international_prefix:0 +msgid "" +"Prefix to add to make international phone calls (don't include the 'out " +"prefix'). For e.g., in France, the International prefix is '00'." +msgstr "" + +#. module: asterisk_click2dial +#: field:res.users,internal_number:0 +msgid "Internal number" +msgstr "" + +#. module: asterisk_click2dial +#: field:res.users,asterisk_chan_type:0 +msgid "Asterisk channel type" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,out_prefix:0 +msgid "Out prefix" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "TCP ports range from 1 to 65535" +msgstr "" + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Phone : " +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,company_id:0 +msgid "Company who uses the Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'out prefix' or leave empty" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,ip_address:0 +msgid "Asterisk IP addr. or DNS" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,password:0 +msgid "" +"Password that Asterisk will use to communicate with the Asterisk Manager " +"Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for 'international prefix'" +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "H323" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,national_prefix:0 +msgid "National prefix" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,country_prefix:0 +msgid "My country prefix" +msgstr "" + +#. module: asterisk_click2dial +#: view:asterisk.server:0 +#: field:res.company,asterisk_server_ids:0 +msgid "Asterisk servers" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,login:0 +msgid "" +"Login that OpenERP will use to communicate with the Asterisk Manager " +"Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,name:0 +msgid "Asterisk server name" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,wait_time:0 +msgid "" +"Amount of time (in seconds) Asterisk will try to reach the user's phone " +"before hanging up." +msgstr "" + +#. module: asterisk_click2dial +#: help:res.users,asterisk_chan_type:0 +msgid "" +"Asterisk channel type, as used in the Asterisk dialplan. If the user has a " +"regular IP phone, the channel type is 'SIP'." +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'national prefix' or leave empty" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,port:0 +msgid "Port" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "You should enter a 'Wait time' value between 1 and 120 seconds" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "Can't resolve the DNS of the Asterisk server : " +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "Invalid phone number" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "" +"The phone number is not written in valid international format. Example of " +"valid international format : +33 1 41 98 12 42" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "The phone number is not written in valid national format." +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "The phone number is not written in valid format." +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "Error :" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "There is no phone number !" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "No Asterisk server configured for the current user." +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "No channel type configured for the current user." +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "No internal phone number configured for the current user" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "" +"The connection from OpenERP to the Asterisk server failed. Please check the " +"configuration on OpenERP and on Asterisk." +msgstr "" diff --git a/asterisk_click2dial/i18n/pt_BR.po b/asterisk_click2dial/i18n/pt_BR.po new file mode 100644 index 0000000..b0ce95a --- /dev/null +++ b/asterisk_click2dial/i18n/pt_BR.po @@ -0,0 +1,444 @@ +# 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: 2010-09-10 20:38+0000\n" +"PO-Revision-Date: 2012-01-30 18:27+0000\n" +"Last-Translator: Rafael Sales - http://www.tompast.com.br \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: 2012-04-17 05:22+0000\n" +"X-Generator: Launchpad (build 15099)\n" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "The 'extension priority' must be a positive value" +msgstr "A 'prioridade da extensão' deve ser um valor positivo" + +#. module: asterisk_click2dial +#: field:asterisk.server,password:0 +msgid "AMI password" +msgstr "Senha AMI" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "SIP" +msgstr "SIP" + +#. module: asterisk_click2dial +#: field:asterisk.server,international_prefix:0 +msgid "International prefix" +msgstr "Prefixo Internacional" + +#. module: asterisk_click2dial +#: help:asterisk.server,ip_address:0 +msgid "IPv4 address or DNS name of the Asterisk server." +msgstr "Endereço IPv4 ou o nome DNS do servidor Asterisk." + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "mISDN" +msgstr "mISDN" + +#. module: asterisk_click2dial +#: constraint:ir.model:0 +msgid "" +"The Object name must start with x_ and not contain any special character !" +msgstr "" +"O nome do objeto deve iniciar com x_ e não conter nenhum caracter especial." + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Dial" +msgstr "Discar" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'country prefix'" +msgstr "Usar somente dígitos para o 'prefixo do país '" + +#. module: asterisk_click2dial +#: field:res.users,asterisk_server_id:0 +msgid "Asterisk server" +msgstr "Servidor Asterisk" + +#. module: asterisk_click2dial +#: help:res.users,asterisk_server_id:0 +msgid "Asterisk server on which the user's phone is connected." +msgstr "" + +#. module: asterisk_click2dial +#: model:ir.actions.act_window,name:asterisk_click2dial.action_asterisk_server +#: model:ir.model,name:asterisk_click2dial.model_asterisk_server +msgid "Asterisk Servers" +msgstr "Servidores Asterisk" + +#. module: asterisk_click2dial +#: constraint:ir.actions.act_window:0 +msgid "Invalid model name in the action definition." +msgstr "Nome do modelo Inválido na definição da ação" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "DAHDI" +msgstr "DAHDI" + +#. module: asterisk_click2dial +#: help:asterisk.server,extension_priority:0 +msgid "" +"Priority of the extension in the Asterisk dialplan. Refer to " +"/etc/asterisk/extensions.conf on your Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: field:res.users,callerid:0 +msgid "Caller ID" +msgstr "Identificação da Chamada" + +#. module: asterisk_click2dial +#: model:ir.module.module,description:asterisk_click2dial.module_meta_information +msgid "" +"The module adds dial button in partner address\n" +"so that you can directly dial a phone number through Asterisk.\n" +"Documentation is available on the Arkretion Web site http://[TODO]" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,name:0 +msgid "Asterisk server name." +msgstr "Nome do Servidor Asterisk" + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Mobile : " +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,login:0 +msgid "AMI login" +msgstr "Login AMI" + +#. module: asterisk_click2dial +#: view:res.company:0 +msgid "Asterisk servers for click2dial" +msgstr "Servidores Asterisk para o click2dial" + +#. module: asterisk_click2dial +#: field:asterisk.server,wait_time:0 +msgid "Wait time (sec)" +msgstr "Tempo de espera em (seg)" + +#. module: asterisk_click2dial +#: field:asterisk.server,context:0 +msgid "Dialplan context" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,extension_priority:0 +msgid "Extension priority" +msgstr "Prioridade da Extensão" + +#. module: asterisk_click2dial +#: field:asterisk.server,company_id:0 +msgid "Company" +msgstr "Empresa" + +#. module: asterisk_click2dial +#: help:asterisk.server,country_prefix:0 +msgid "" +"Phone prefix of the country where the Asterisk server is located. For e.g. " +"the phone prefix for France is '33'. If the phone number to dial starts with " +"the 'My country prefix', OpenERP will remove the country prefix from the " +"phone number and add the 'out prefix' followed by the 'national prefix'. If " +"the phone number to dial doesn't start with the 'My country prefix', OpenERP " +"will add the 'out prefix' followed by the 'international prefix'." +msgstr "" +"Prefixo de telefone do país onde o servidor Asterisk está localizado. Por " +"exemplo, para o prefixo de telefone no Brasil você deve utilizar '55 '. Se o " +"número de telefone à discar começa com \"Este prefixo de país\", OpenERP irá " +"remover o prefixo do país a partir do número de telefone e adicionar o " +"'prefixo de saída' seguido pelo 'prefixo nacional \". Se o número de " +"telefone para discar não começa com o \"Meu prefixo do país\", OpenERP irá " +"adicionar o 'out prefixo' seguido pelo 'prefixo internacional \"." + +#. module: asterisk_click2dial +#: help:asterisk.server,out_prefix:0 +msgid "" +"Prefix to dial to place outgoing calls. If you don't use a prefix to place " +"outgoing calls, leave empty." +msgstr "" +"Prefixo para fazer chamadas de saída. Se você não usar um prefixo para fazer " +"chamadas de saída, deixe vazio." + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "Zap" +msgstr "Zap" + +#. module: asterisk_click2dial +#: help:asterisk.server,context:0 +msgid "" +"Asterisk dialplan context from which the calls will be made. Refer to " +"/etc/asterisk/extensions.conf on your Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: help:res.users,callerid:0 +msgid "Caller ID used for the calls initiated by this user." +msgstr "ID de Chamada utilizado para as chamadas iniciadas por esse usuário." + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "IAX2" +msgstr "IAX2" + +#. module: asterisk_click2dial +#: view:res.company:0 +msgid "IPBX" +msgstr "IPBX" + +#. module: asterisk_click2dial +#: model:ir.module.module,shortdesc:asterisk_click2dial.module_meta_information +msgid "Asterisk Click2dial" +msgstr "Asterisk Click2dial" + +#. module: asterisk_click2dial +#: help:res.company,asterisk_server_ids:0 +msgid "List of Asterisk servers." +msgstr "Lista de Servidores Asterisk" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "MGCP" +msgstr "MGCP" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "Skinny" +msgstr "Skinny" + +#. module: asterisk_click2dial +#: constraint:ir.ui.view:0 +msgid "Invalid XML for View Architecture!" +msgstr "XML inválido para Arquitetura da View" + +#. module: asterisk_click2dial +#: help:res.users,internal_number:0 +msgid "User's internal phone number." +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,national_prefix:0 +msgid "" +"Prefix for national phone calls (don't include the 'out prefix'). For e.g., " +"in France, the phone numbers look like '01 41 98 12 42' : the National " +"prefix is '0'." +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,port:0 +msgid "" +"TCP port on which the Asterisk Manager Interface listens. Defined in " +"/etc/asterisk/manager.conf on Asterisk." +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,international_prefix:0 +msgid "" +"Prefix to add to make international phone calls (don't include the 'out " +"prefix'). For e.g., in France, the International prefix is '00'." +msgstr "" + +#. module: asterisk_click2dial +#: field:res.users,internal_number:0 +msgid "Internal number" +msgstr "" + +#. module: asterisk_click2dial +#: field:res.users,asterisk_chan_type:0 +msgid "Asterisk channel type" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,out_prefix:0 +msgid "Out prefix" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "TCP ports range from 1 to 65535" +msgstr "" + +#. module: asterisk_click2dial +#: view:res.partner:0 +#: view:res.partner.address:0 +msgid "Phone : " +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,company_id:0 +msgid "Company who uses the Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'out prefix' or leave empty" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,ip_address:0 +msgid "Asterisk IP addr. or DNS" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,password:0 +msgid "" +"Password that Asterisk will use to communicate with the Asterisk Manager " +"Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for 'international prefix'" +msgstr "" + +#. module: asterisk_click2dial +#: selection:res.users,asterisk_chan_type:0 +msgid "H323" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,national_prefix:0 +msgid "National prefix" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,country_prefix:0 +msgid "My country prefix" +msgstr "" + +#. module: asterisk_click2dial +#: view:asterisk.server:0 +#: field:res.company,asterisk_server_ids:0 +msgid "Asterisk servers" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,login:0 +msgid "" +"Login that OpenERP will use to communicate with the Asterisk Manager " +"Interface. Refer to /etc/asterisk/manager.conf on your Asterisk server." +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,name:0 +msgid "Asterisk server name" +msgstr "" + +#. module: asterisk_click2dial +#: help:asterisk.server,wait_time:0 +msgid "" +"Amount of time (in seconds) Asterisk will try to reach the user's phone " +"before hanging up." +msgstr "" + +#. module: asterisk_click2dial +#: help:res.users,asterisk_chan_type:0 +msgid "" +"Asterisk channel type, as used in the Asterisk dialplan. If the user has a " +"regular IP phone, the channel type is 'SIP'." +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "Only use digits for the 'national prefix' or leave empty" +msgstr "" + +#. module: asterisk_click2dial +#: field:asterisk.server,port:0 +msgid "Port" +msgstr "" + +#. module: asterisk_click2dial +#: constraint:asterisk.server:0 +msgid "You should enter a 'Wait time' value between 1 and 120 seconds" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "Can't resolve the DNS of the Asterisk server : " +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "Invalid phone number" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "" +"The phone number is not written in valid international format. Example of " +"valid international format : +33 1 41 98 12 42" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "The phone number is not written in valid national format." +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "The phone number is not written in valid format." +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "Error :" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "There is no phone number !" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "No Asterisk server configured for the current user." +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "No channel type configured for the current user." +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "No internal phone number configured for the current user" +msgstr "" + +#. module: asterisk_click2dial +#: code:addons/asterisk_click2dial/asterisk_click2dial.py:0 +#, python-format +msgid "" +"The connection from OpenERP to the Asterisk server failed. Please check the " +"configuration on OpenERP and on Asterisk." +msgstr "" diff --git a/asterisk_click2dial/res_partner_view.xml b/asterisk_click2dial/res_partner_view.xml index 41c5f32..5cf689d 100644 --- a/asterisk_click2dial/res_partner_view.xml +++ b/asterisk_click2dial/res_partner_view.xml @@ -1,7 +1,7 @@ diff --git a/asterisk_click2dial/wizard/__init__.py b/asterisk_click2dial/wizard/__init__.py new file mode 100644 index 0000000..bbeca5b --- /dev/null +++ b/asterisk_click2dial/wizard/__init__.py @@ -0,0 +1,23 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# Asterisk Click2Dial module for OpenERP +# Copyright (C) 2012-2013 Alexis de Lattre +# +# 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 . +# +############################################################################## + +import reformat_all_phonenumbers +import open_calling_partner diff --git a/asterisk_click2dial/wizard/open_calling_partner.py b/asterisk_click2dial/wizard/open_calling_partner.py new file mode 100644 index 0000000..59bf531 --- /dev/null +++ b/asterisk_click2dial/wizard/open_calling_partner.py @@ -0,0 +1,209 @@ +# -*- encoding: utf-8 -*- +############################################################################## +# +# Asterisk Click2dial module for OpenERP +# Copyright (C) 2010-2013 Alexis de Lattre +# +# 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 osv import osv, fields +import netsvc +# Lib to translate error messages +from tools.translate import _ + +logger = netsvc.Logger() + + +class wizard_open_calling_partner(osv.osv_memory): + _name = "wizard.open.calling.partner" + _description = "Open calling partner" + + _columns = { + # I can't set any field to readonly, because otherwize it would call + # default_get (and thus connect to Asterisk) a second time when the user + # clicks on one of the buttons + 'calling_number': fields.char('Calling number', size=30, help="Phone number of calling party that has been obtained from Asterisk."), + 'partner_address_id': fields.many2one('res.partner.address', 'Contact name', help="Partner contact related to the calling number. If there is none and you want to update an existing partner"), + 'partner_id': fields.many2one('res.partner', 'Partner', help="Partner related to the calling number."), + 'to_update_partner_address_id': fields.many2one('res.partner.address', 'Contact to update', help="Partner contact on which the phone or mobile number will be written"), + 'current_phone': fields.related('to_update_partner_address_id', 'phone', type='char', relation='res.partner.address', string='Current phone'), + 'current_mobile': fields.related('to_update_partner_address_id', 'mobile', type='char', relation='res.partner.address', string='Current mobile'), + } + + + def default_get(self, cr, uid, fields, context=None): + '''Thanks to the default_get method, we are able to query Asterisk and + get the corresponding partner when we launch the wizard''' + res = {} + #calling_number = self.pool.get('asterisk.server')._get_calling_number(cr, uid, context=context) + #To test the code without Asterisk server + calling_number = "0141981242" + if calling_number: + res['calling_number'] = calling_number + partner = self.pool.get('res.partner.address').get_partner_from_phone_number(cr, uid, calling_number, context=context) + if partner: + res['partner_address_id'] = partner[0] + res['partner_id'] = partner[1] + else: + res['partner_id'] = False + res['partner_address_id'] = False + res['to_update_partner_address_id'] = False + else: + logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, "Could not get the calling number from Asterisk.") + raise osv.except_osv(_('Error :'), _("Could not get the calling number from Asterisk. Are you currently on the phone ? If yes, check your setup and look at the OpenERP debug logs.")) + + return res + + + def open_filtered_object(self, cr, uid, ids, oerp_object, context=None): + '''Returns the action that opens the list view of the 'oerp_object' + given as argument filtered on the partner''' + # This module only depends on "base" + # and I don't want to add a dependancy on "sale" or "account" + # So I just check here that the model exists, to avoid a crash + if not self.pool.get('ir.model').search(cr, uid, [('model', '=', oerp_object._name)], context=context): + raise osv.except_osv(_('Error :'), _("The object '%s' is not found in your OpenERP database, probably because the related module is not installed." % oerp_object._description)) + + partner_id = self.browse(cr, uid, ids[0], context=context).partner_id.id + if partner_id: + action = { + 'name': oerp_object._description, + 'view_type': 'form', + 'view_mode': 'tree,form', + 'res_model': oerp_object._name, + 'type': 'ir.actions.act_window', + 'nodestroy': False, # close the pop-up wizard after action + 'target': 'current', + 'domain': [('partner_id', '=', partner_id)], + } + return action + else: + return False + + + def open_sale_orders(self, cr, uid, ids, context=None): + '''Function called by the related button of the wizard''' + return self.open_filtered_object(cr, uid, ids, self.pool.get('sale.order'), context=context) + + + def open_invoices(self, cr, uid, ids, context=None): + '''Function called by the related button of the wizard''' + return self.open_filtered_object(cr, uid, ids, self.pool.get('account.invoice'), context=context) + + + def simple_open(self, cr, uid, ids, object_name='res.partner', context=None): + if object_name == 'res.partner': + record_id = self.browse(cr, uid, ids[0], context=context).partner_id.id + label = 'Partner' + elif object_name == 'res.partner.address': + record_id = self.browse(cr, uid, ids[0], context=context).partner_address_id.id + label = 'Contact' + else: + raise osv.except_osv(_('Error :'), "This object '%s' is not supported" % object_name) + if record_id: + return { + 'name': label, + 'view_type': 'form', + 'view_mode': 'form,tree', + 'res_model': object_name, + 'type': 'ir.actions.act_window', + 'nodestroy': False, # close the pop-up wizard after action + 'target': 'current', + 'res_id': record_id, + } + else: + return False + + + def open_partner(self, cr, uid, ids, context=None): + '''Function called by the related button of the wizard''' + return self.simple_open(cr, uid, ids, object_name='res.partner', context=context) + + + def open_partner_address(self, cr, uid, ids, context=None): + '''Function called by the related button of the wizard''' + return self.simple_open(cr, uid, ids, object_name='res.partner.address', context=context) + + + def create_partner_address(self, cr, uid, ids, phone_type='phone', context=None): + '''Function called by the related button of the wizard''' + calling_number = self.read(cr, uid, ids[0], ['calling_number'], context=context)['calling_number'] + ast_server = self.pool.get('asterisk.server')._get_asterisk_server_from_user(cr, uid, context=context) + # Convert the number to the international format + number_to_write = self.pool.get('asterisk.server')._convert_number_to_international_format(cr, uid, calling_number, ast_server, context=context) + + context['default_' + phone_type] = number_to_write + action = { + 'name': 'Create new contact', + 'view_type': 'form', + 'view_mode': 'form,tree', + 'res_model': 'res.partner.address', + 'type': 'ir.actions.act_window', + 'nodestroy': False, + 'target': 'current', + 'context': context, + } + return action + + + def create_partner_address_phone(self, cr, uid, ids, context=None): + return self.create_partner_address(cr, uid, ids, phone_type='phone', context=context) + + + def create_partner_address_mobile(self, cr, uid, ids, context=None): + return self.create_partner_address(cr, uid, ids, phone_type='mobile', context=context) + + + def update_partner_address(self, cr, uid, ids, phone_type='mobile', context=None): + cur_wizard = self.browse(cr, uid, ids[0], context=context) + if not cur_wizard.to_update_partner_address_id: + raise osv.except_osv(_('Error :'), _("Select the contact to update.")) + ast_server = self.pool.get('asterisk.server')._get_asterisk_server_from_user(cr, uid, context=context) + number_to_write = self.pool.get('asterisk.server')._convert_number_to_international_format(cr, uid, cur_wizard.calling_number, ast_server, context=context) + self.pool.get('res.partner.address').write(cr, uid, cur_wizard.to_update_partner_address_id.id, {phone_type: number_to_write}, context=context) + action = { + 'name': 'Contact: ' + cur_wizard.to_update_partner_address_id.name, + 'view_type': 'form', + 'view_mode': 'form,tree', + 'res_model': 'res.partner.address', + 'type': 'ir.actions.act_window', + 'nodestroy': False, + 'target': 'current', + 'res_id': cur_wizard.to_update_partner_address_id.id + } + return action + + + def update_partner_address_phone(self, cr, uid, ids, context=None): + return self.update_partner_address(cr, uid, ids, phone_type='phone', context=context) + + + def update_partner_address_mobile(self, cr, uid, ids, context=None): + return self.update_partner_address(cr, uid, ids, phone_type='mobile', context=context) + + + def onchange_to_update_partner_address(self, cr, uid, ids, to_update_partner_address_id, context=None): + res = {} + res['value'] = {} + if to_update_partner_address_id: + to_update_partner_address = self.pool.get('res.partner.address').browse(cr, uid, to_update_partner_address_id, context=context) + res['value'].update({'current_phone': to_update_partner_address.phone, + 'current_mobile': to_update_partner_address.mobile}) + else: + res['value'].update({'current_phone': False, 'current_mobile': False}) + return res + +wizard_open_calling_partner() diff --git a/asterisk_click2dial/wizard/open_calling_partner_view.xml b/asterisk_click2dial/wizard/open_calling_partner_view.xml new file mode 100644 index 0000000..e527750 --- /dev/null +++ b/asterisk_click2dial/wizard/open_calling_partner_view.xml @@ -0,0 +1,67 @@ + + + + + + + + + view_open_calling_partner + wizard.open.calling.partner + form + +
+ + + + + + + + + + + 4 + +
+
+ + +
+