Browse Source

Backport all new features/enhancements of the trunk branch to OpenERP 6.0.

6.0
Alexis de Lattre 11 years ago
parent
commit
ec5d70238c
  1. 2
      asterisk_click2dial/__init__.py
  2. 40
      asterisk_click2dial/__terp__.py
  3. 458
      asterisk_click2dial/asterisk_click2dial.py
  4. 7
      asterisk_click2dial/asterisk_click2dial_demo.xml
  5. 15
      asterisk_click2dial/asterisk_server_view.xml
  6. 628
      asterisk_click2dial/i18n/asterisk_click2dial.pot
  7. 435
      asterisk_click2dial/i18n/bg.po
  8. 477
      asterisk_click2dial/i18n/es.po
  9. 608
      asterisk_click2dial/i18n/fr_FR.po
  10. 434
      asterisk_click2dial/i18n/hr.po
  11. 444
      asterisk_click2dial/i18n/pt_BR.po
  12. 36
      asterisk_click2dial/res_partner_view.xml
  13. 15
      asterisk_click2dial/res_users_view.xml
  14. 101
      asterisk_click2dial/scripts/get_cid_name.py
  15. 13
      asterisk_click2dial/scripts/get_cid_name_timeout.sh
  16. 2
      asterisk_click2dial/security/asterisk_server_security.xml
  17. 23
      asterisk_click2dial/wizard/__init__.py
  18. 209
      asterisk_click2dial/wizard/open_calling_partner.py
  19. 67
      asterisk_click2dial/wizard/open_calling_partner_view.xml
  20. 67
      asterisk_click2dial/wizard/reformat_all_phonenumbers.py
  21. 39
      asterisk_click2dial/wizard/reformat_all_phonenumbers_view.xml
  22. 11
      asterisk_click2dial_crm/__init__.py
  23. 64
      asterisk_click2dial_crm/__terp__.py
  24. 77
      asterisk_click2dial_crm/asterisk_click2dial_crm.py
  25. 78
      asterisk_click2dial_crm/i18n/asterisk_click2dial_crm.pot
  26. 78
      asterisk_click2dial_crm/i18n/fr.po
  27. 110
      asterisk_click2dial_crm/res_partner_address.py
  28. 41
      asterisk_click2dial_crm/res_users_view.xml
  29. 29
      asterisk_click2dial_crm/wizard/__init__.py
  30. 78
      asterisk_click2dial_crm/wizard/create_crm_phonecall.py
  31. 37
      asterisk_click2dial_crm/wizard/create_crm_phonecall_view.xml
  32. 30
      asterisk_click2dial_crm/wizard/open_calling_partner_view.xml

2
asterisk_click2dial/__init__.py

@ -20,4 +20,4 @@
##############################################################################
import asterisk_click2dial
import wizard

40
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'],

458
asterisk_click2dial/asterisk_click2dial.py

@ -2,7 +2,7 @@
##############################################################################
#
# Asterisk Click2dial module for OpenERP
# Copyright (C) 2010-2012 Alexis de Lattre <alexis@via.ecp.fr>
# Copyright (C) 2010-2013 Alexis de Lattre <alexis@via.ecp.fr>
#
# 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('<phone_number_e164', None), 'FR')
# The country code seems to be OK with the ones of OpenERP
# But it returns sometimes numbers with '-'... we have to investigate this first
# International format
if tmp_number[0] == '+':
if tmp_number[0] != '+':
raise # This should never happen
# Remove the starting '+' of the number
tmp_number = tmp_number.replace('+','')
logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, 'Number after removal of special char = %s' % tmp_number)
# At this stage, 'tmp_number' should only contain digits
if not tmp_number.isdigit():
raise osv.except_osv(error_title_msg, invalid_format_msg)
tmp_number = tmp_number.replace('+','')
logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, 'Number after removal of special char = %s' % tmp_number)
logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, 'Country prefix = %s' % country_prefix)
if country_prefix == tmp_number[0:len(country_prefix)]:
# If the number is a national number,
# remove 'my country prefix' and add 'national prefix'
tmp_number = (national_prefix) + tmp_number[len(country_prefix):len(tmp_number)]
logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, 'National prefix = %s - Number with national prefix = %s' % (national_prefix, tmp_number))
else:
# If the number is an international number,
# add 'international prefix'
tmp_number = international_prefix + tmp_number
logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, 'International prefix = %s - Number with international prefix = %s' % (international_prefix, tmp_number))
# At this stage, 'tmp_number' should only contain digits
if not tmp_number.isdigit():
raise osv.except_osv(error_title_msg, invalid_format_msg)
# National format, allowed
elif ast_server.national_format_allowed:
# No treatment required
if not tmp_number.isdigit():
raise osv.except_osv(error_title_msg, invalid_national_format_msg)
logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, 'Country prefix = %s' % country_prefix)
if country_prefix == tmp_number[0:len(country_prefix)]:
# If the number is a national number,
# remove 'my country prefix' and add 'national prefix'
tmp_number = (national_prefix) + tmp_number[len(country_prefix):len(tmp_number)]
logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, 'National prefix = %s - Number with national prefix = %s' % (national_prefix, tmp_number))
# National format, disallowed
elif not ast_server.national_format_allowed:
raise osv.except_osv(error_title_msg, invalid_international_format_msg)
else:
# If the number is an international number,
# add 'international prefix'
tmp_number = international_prefix + tmp_number
logger.notifyChannel('click2dial', netsvc.LOG_DEBUG, 'International prefix = %s - Number with international prefix = %s' % (international_prefix, tmp_number))
# Add 'out prefix' to all numbers
tmp_number = out_prefix + tmp_number
@ -170,33 +166,23 @@ class asterisk_server(osv.osv):
return tmp_number
def _parse_asterisk_answer(self, cr, uid, sock, context=None):
'''Parse the answer of the Asterisk Manager Interface'''
answer = ''
data = ''
while '\r\n\r\n' not in data:
data = sock.recv(1024)
if data:
answer += data
return answer
def _convert_number_to_international_format(self, cr, uid, number, ast_server, context=None):
'''Convert the number presented by the phone network to a number
in international format e.g. +33141981242'''
if number and number.isdigit() and len(number) > 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.")
}

7
asterisk_click2dial/asterisk_click2dial_demo.xml

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Asterisk Click2dial module for OpenERP
Copyright (C) 2010-2012 Alexis de Lattre <alexis@via.ecp.fr>
Copyright (C) 2010-2013 Alexis de Lattre <alexis@via.ecp.fr>
The licence is in the file __terp__.py
Demo data for the click2dial module
@ -21,14 +21,19 @@
</record>
<record id="base.user_root" model="res.users">
<field name="internal_number">11</field>
<field name="resource">11</field>
<field name="callerid">Administrator &lt;0141981242&gt;</field>
<field name="asterisk_server_id" ref="demo_ast_server"/>
</record>
<record id="base.user_demo" model="res.users">
<field name="internal_number">12</field>
<field name="resource">12</field>
<field name="callerid">Demo user &lt;0141984212&gt;</field>
<field name="asterisk_server_id" ref="demo_ast_server"/>
</record>
<record id="base.main_address" model="res.partner.address">
<field name="country_id" ref="base.fr"/>
</record>
</data>
</openerp>

15
asterisk_click2dial/asterisk_server_view.xml

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Asterisk Click2dial module for OpenERP
Copyright (C) 2010-2012 Alexis de Lattre <alexis@via.ecp.fr>
Copyright (C) 2010-2013 Alexis de Lattre <alexis@via.ecp.fr>
The licence is in the file __terp__.py
-->
@ -32,10 +32,10 @@
<field name="company_id" select="1" invisible="not context.get('asterisk_server_main_view', False)" />
<newline />
<field name="name" select="1" />
<field name="active" select="2" />
<field name="active" />
<field name="ip_address" select="1" />
<field name="port" select="2" />
<field name="login" select="2" />
<field name="port" />
<field name="login" />
<field name="password" password="True" />
<field name="context" />
<field name="extension_priority" />
@ -43,9 +43,9 @@
<field name="national_prefix" />
<field name="international_prefix" />
<field name="country_prefix" select="1" />
<field name="national_format_allowed" />
<field name="alert_info" />
<field name="wait_time" />
<field name="number_of_digits_to_match_from_end" />
</form>
</field>
</record>
@ -75,8 +75,9 @@
<field name="context">{'asterisk_server_main_view': True}</field>
</record>
<!-- Menu entry under Administration > Configuration -->
<menuitem action="action_asterisk_server" id="act_menu_ast_server" parent="base.menu_config" />
<!-- Menu entry under Settings > Configuration -->
<menuitem id="menu_asterisk_servers" name="Asterisk" parent="base.menu_config" groups="base.group_extended"/>
<menuitem action="action_asterisk_server" id="act_menu_ast_server" parent="menu_asterisk_servers" sequence="50"/>
</data>

628
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 ""

435
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 <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <EMAIL@ADDRESS>\n"
"Language-Team: Bulgarian <bg@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 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 ""

477
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 <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <EMAIL@ADDRESS>\n"
"Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 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."

608
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 <alexis@via.ecp.fr>\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"

434
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 <EMAIL@ADDRESS>, 2011.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <EMAIL@ADDRESS>\n"
"Language-Team: Croatian <hr@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 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 ""

444
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 <EMAIL@ADDRESS>, 2012.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\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 <Unknown>\n"
"Language-Team: Brazilian Portuguese <pt_BR@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 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 ""

36
asterisk_click2dial/res_partner_view.xml

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Asterisk Click2dial module for OpenERP
Copyright (C) 2010-2012 Alexis de Lattre <alexis@via.ecp.fr>
Copyright (C) 2010-2013 Alexis de Lattre <alexis@via.ecp.fr>
The licence is in the file __terp__.py
Inherit partner_address views to add 'Dial' button next to 'phone'
@ -14,22 +14,19 @@
<record id="asterisk_res_partner_address_dial1" model="ir.ui.view">
<field name="name">asterisk.res.partner.address.dial1</field>
<field name="model">res.partner.address</field>
<field name="type">form</field>
<field name="priority">15</field>
<field name="inherit_id" ref="base.view_partner_address_form1"/>
<field name="arch" type="xml">
<data>
<field name="phone" position="replace">
<label string="Phone : " align="1.0" />
<group colspan="1" col="6">
<field name="phone" nolabel="1" colspan="5" select="2" />
<group colspan="2" col="8">
<field name="phone" colspan="7" />
<button name="action_dial_phone" string="Dial" type="object"/>
</group>
</field>
<field name="mobile" position="replace">
<label string="Mobile : " align="1.0" />
<group colspan="1" col="6">
<field name="mobile" nolabel="1" colspan="5" select="2" />
<group colspan="2" col="8">
<field name="mobile" colspan="7" />
<button name="action_dial_mobile" string="Dial" type="object"/>
</group>
</field>
@ -40,22 +37,19 @@
<record id="asterisk_res_partner_address_dial2" model="ir.ui.view">
<field name="name">asterisk.res.partner.address.dial2</field>
<field name="model">res.partner.address</field>
<field name="type">form</field>
<field name="priority">15</field>
<field name="inherit_id" ref="base.view_partner_address_form2"/>
<field name="arch" type="xml">
<data>
<field name="phone" position="replace">
<label string="Phone : " align="1.0" />
<group colspan="1" col="6">
<field name="phone" nolabel="1" colspan="5" select="2" />
<group colspan="2" col="8">
<field name="phone" colspan="7" />
<button name="action_dial_phone" string="Dial" type="object"/>
</group>
</field>
<field name="mobile" position="replace">
<label string="Mobile : " align="1.0" />
<group colspan="1" col="6">
<field name="mobile" nolabel="1" colspan="5" select="2" />
<group colspan="2" col="8">
<field name="mobile" colspan="7" />
<button name="action_dial_mobile" string="Dial" type="object"/>
</group>
</field>
@ -66,22 +60,19 @@
<record id="asterisk_res_partner_dial" model="ir.ui.view">
<field name="name">asterisk.res.partner.dial</field>
<field name="model">res.partner</field>
<field name="type">form</field>
<field name="priority">15</field>
<field name="inherit_id" ref="base.view_partner_form"/>
<field name="arch" type="xml">
<data>
<field name="phone" position="replace">
<label string="Phone : " align="1.0" />
<group colspan="1" col="6">
<field name="phone" nolabel="1" colspan="5" select="2" />
<group colspan="2" col="8">
<field name="phone" colspan="7" />
<button name="action_dial_phone" string="Dial" type="object"/>
</group>
</field>
<field name="mobile" position="replace">
<label string="Mobile : " align="1.0" />
<group colspan="1" col="6">
<field name="mobile" nolabel="1" colspan="5" select="2" />
<group colspan="2" col="8">
<field name="mobile" colspan="7" />
<button name="action_dial_mobile" string="Dial" type="object"/>
</group>
</field>
@ -90,6 +81,5 @@
</record>
</data>
</openerp>

15
asterisk_click2dial/res_users_view.xml

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Asterisk Click2dial module for OpenERP
Copyright (C) 2010-2012 Alexis de Lattre <alexis@via.ecp.fr>
Copyright (C) 2010-2013 Alexis de Lattre <alexis@via.ecp.fr>
The licence is in the file __terp__.py
Inherit res_users view to add the click2dial-related fields
@ -11,17 +11,22 @@
<data>
<record id="asterisk_res_users_internal_number" model="ir.ui.view">
<field name="name">asterisk.res.users.internal.number</field>
<field name="name">asterisk.res.users.telephony_tab</field>
<field name="model">res.users</field>
<field name="type">form</field>
<field name="inherit_id" ref="base.view_users_form"/>
<field name="arch" type="xml">
<page string="User" position="after">
<page string="Telephony">
<field name="internal_number" select="2"/>
<separator string="Standard parameters" colspan="4"/>
<field name="asterisk_chan_type"/>
<field name="callerid" />
<field name="resource"/>
<field name="internal_number"/>
<field name="callerid"/>
<field name="asterisk_server_id"/>
<separator string="Optional parameters - for experts only, can be left empty" colspan="4"/>
<field name="dial_suffix"/>
<field name="alert_info"/>
<field name="variable"/>
</page>
</page>
</field>

101
asterisk_click2dial/scripts/get_cid_name.py

@ -4,18 +4,19 @@
CallerID name lookup in OpenERP for Asterisk IPBX
When executed from the dialplan on an incoming phone call, it will lookup in
OpenERP's partner addresses, and, if it finds the phone number, it will get the
OpenERP's partners, and, if it finds the phone number, it will get the
corresponding name of the person and use this name as CallerID name for the incoming call.
Requires the "asterisk_click2dial" module (available in the extra-addons)
on OpenERP version >= 5
Requires the "asterisk_click2dial" module
available from https://code.launchpad.net/openerp-asterisk-connector
for OpenERP version >= 5.0
This script is designed to be used as an AGI on an Asterisk IPBX...
BUT I advise you to use a wrapper around this script to control the
execution time. Why ? Because if the script takes too much time to
execute or get stucks (in the XML-RPC request for example), then the
incoming phone call will also get stucks and you will miss a call !
The most simple solution I found is to use the "timeout" shell command to
The simplest solution I found is to use the "timeout" shell command to
call this script, for example :
# timeout 1s get_cid_name.py <OPTIONS>
@ -34,11 +35,14 @@
It's probably a good idea to create a user in OpenERP dedicated to this task.
This user only needs to be part of the group "Asterisk CallerID", which has
read access on the 'res.partner.address' object, nothing more.
Note that this script can be used without OpenERP, with just the geolocalisation
feature : for that, don't use option --server ; only use --geoloc
"""
__author__ = "Alexis de Lattre <alexis.delattre@akretion.com>"
__date__ = "December 2010"
__version__ = "0.1"
__version__ = "0.3"
# Copyright (C) 2010-2012 Alexis de Lattre <alexis.delattre@akretion.com>
#
@ -61,18 +65,22 @@ from optparse import OptionParser
# CID Name that will be displayed if there is no match in res.partner.address
# and no geolocalisation
default_cid_name = "Not in OpenERP"
# Define command line options
option_server = {'names': ('-s', '--server'), 'dest': 'server', 'type': 'string', 'help': 'DNS or IP address of the OpenERP server. Default = localhost', 'action': 'store', 'default':'localhost'}
option_server = {'names': ('-s', '--server'), 'dest': 'server', 'type': 'string', 'help': 'DNS or IP address of the OpenERP server. Default = none (will not try to connect to OpenERP)', 'action': 'store', 'default': False}
option_port = {'names': ('-p', '--port'), 'dest': 'port', 'type': 'int', 'help': "Port of OpenERP's XML-RPC interface. Default = 8069", 'action': 'store', 'default': 8069}
option_ssl = {'names': ('-e', '--ssl'), 'dest': 'ssl', 'help': "Use XML-RPC secure i.e. with SSL instead of clear XML-RPC. Default = no, use clear XML-RPC.", 'action': 'store_true', 'default': False}
option_database = {'names': ('-d', '--database'), 'dest': 'database', 'type': 'string', 'help': "OpenERP database name. Default = openerp", 'action': 'store', 'default': 'openerp'}
option_ssl = {'names': ('-e', '--ssl'), 'dest': 'ssl', 'help': "Use XML-RPC secure i.e. with SSL instead of clear XML-RPC. Default = no, use clear XML-RPC", 'action': 'store_true', 'default': False}
option_database = {'names': ('-d', '--database'), 'dest': 'database', 'type': 'string', 'help': "OpenERP database name. Default = 'openerp'", 'action': 'store', 'default': 'openerp'}
option_user = {'names': ('-u', '--user-id'), 'dest': 'user', 'type': 'int', 'help': "OpenERP user ID to use when connecting to OpenERP. Default = 2", 'action': 'store', 'default': 2}
option_password = {'names': ('-w', '--password'), 'dest': 'password', 'type': 'string', 'help': "Password of the OpenERP user. Default = demo", 'action': 'store', 'default': 'demo'}
option_password = {'names': ('-w', '--password'), 'dest': 'password', 'type': 'string', 'help': "Password of the OpenERP user. Default = 'demo'", 'action': 'store', 'default': 'demo'}
option_ascii = {'names': ('-a', '--ascii'), 'dest': 'ascii', 'help': "Convert name from UTF-8 to ASCII. Default = no, keep UTF-8", 'action': 'store_true', 'default': False}
option_geoloc = {'names': ('-g', '--geoloc'), 'dest': 'geoloc', 'help': "Try to geolocate phone numbers unknown to OpenERP. This features requires the 'phonenumbers' Python lib. To install it, run 'sudo pip install phonenumbers' Default = no", 'action': 'store_true', 'default': False}
option_geoloc_lang = {'names': ('-l', '--geoloc-lang'), 'dest': 'lang', 'help': "Language in which the name of the country and city name will be displayed by the geolocalisation database. Use the 2 letters ISO code of the language. Default = 'en'", 'action': 'store', 'default': "en"}
option_geoloc_country = {'names': ('-c', '--geoloc-country'), 'dest': 'country', 'help': "2 letters ISO code for your country e.g. 'FR' for France. This will be used by the geolocalisation system to parse the phone number of the calling party. Default = 'FR'", 'action': 'store', 'default': "FR"}
options = [option_server, option_port, option_ssl, option_database, option_user, option_password, option_ascii]
options = [option_server, option_port, option_ssl, option_database, option_user, option_password, option_ascii, option_geoloc, option_geoloc_lang, option_geoloc_country]
def stdout_write(string):
'''Wrapper on sys.stdout.write'''
@ -90,13 +98,26 @@ def stderr_write(string):
sys.stdout.flush()
return True
def reformat_phone_number_before_query_openerp(number):
'''We match only on the end of the phone number'''
if len(number) >= 9:
return number[-9:len(number)] # Take 9 last numbers
def geolocate_phone_number(number, my_country_code, lang):
import phonenumbers
import phonenumbers.geocoder
res = ''
phonenum = phonenumbers.parse(number, my_country_code.upper())
city = phonenumbers.area_description_for_number(phonenum, lang.lower())
#country = phonenumbers.country_name_for_number(phonenum, lang.lower())
country_code = phonenumbers.region_code_for_number(phonenum)
if country_code == my_country_code.upper():
# We don't display the country name when it's my own country
if city:
res = city
else:
return number
# Convert country code to country name
country = phonenumbers.geocoder._region_display_name(country_code, lang.lower())
if country and city:
res = country + ' ' + city
elif country and not city:
res = country
return res
def convert_to_ascii(my_unicode):
'''Convert to ascii, with clever management of accents (é -> e, è -> e)'''
@ -137,6 +158,14 @@ def main(options, arguments):
for variable in stdinput.keys():
stderr_write("%s = %s\n" % (variable, stdinput.get(variable)))
# If we already have a "True" caller ID name
# i.e. not just digits, but a real name, then we don't try to
# connect to OpenERP or geoloc, we just keep it
if stdinput.get('agi_calleridname') and not stdinput.get('agi_calleridname').isdigit() and stdinput.get('agi_calleridname').lower() not in ['asterisk', 'unknown', 'anonymous']:
stdout_write('VERBOSE "Incoming CallerID name is %s"\n' % stdinput.get('agi_calleridname'))
stdout_write('VERBOSE "As it is a real name, we do not change it"\n')
return True
input_cid_number = stdinput.get('agi_callerid')
stderr_write('stdout encoding = %s\n' % sys.stdout.encoding or 'utf-8')
@ -150,30 +179,40 @@ def main(options, arguments):
exit(0)
stdout_write('VERBOSE "CallerID number = %s"\n' % input_cid_number)
query_number = reformat_phone_number_before_query_openerp(input_cid_number)
stderr_write("phone number sent to OpenERP = %s\n" % query_number)
if options.ssl:
stdout_write('VERBOSE "Starting XML-RPC secure request on OpenERP %s:%s"\n' % (options.server, str(options.port)))
protocol = 'https'
else:
stdout_write('VERBOSE "Starting clear XML-RPC request on OpenERP %s:%s"\n' % (options.server, str(options.port)))
protocol = 'http'
sock = xmlrpclib.ServerProxy('%s://%s:%s/xmlrpc/object' % (protocol, options.server, str(options.port)))
res = False
if options.server: # Yes, this script can be used without "-s openerp_server" !
if options.ssl:
stdout_write('VERBOSE "Starting XML-RPC secure request on OpenERP %s:%s"\n' % (options.server, str(options.port)))
protocol = 'https'
else:
stdout_write('VERBOSE "Starting clear XML-RPC request on OpenERP %s:%s"\n' % (options.server, str(options.port)))
protocol = 'http'
res = sock.execute(options.database, options.user, options.password, 'res.partner.address', 'get_name_from_phone_number', query_number)
# To simulate a long execution of the XML-RPC request
#import time
#time.sleep(5)
sock = xmlrpclib.ServerProxy('%s://%s:%s/xmlrpc/object' % (protocol, options.server, str(options.port)))
stdout_write('VERBOSE "End of XML-RPC request on OpenERP"\n')
try:
res = sock.execute(options.database, options.user, options.password, 'res.partner.address', 'get_name_from_phone_number', input_cid_number)
stdout_write('VERBOSE "End of XML-RPC request on OpenERP"\n')
if not res:
stdout_write('VERBOSE "Phone number not found in OpenERP"\n')
except:
stdout_write('VERBOSE "Could not connect to OpenERP"\n')
res = False
# To simulate a long execution of the XML-RPC request
#import time
#time.sleep(5)
# Function to limit the size of the CID name to 40 chars
if res:
if len(res) > 40:
res = res[0:40]
elif options.geoloc:
# if the number is not found in OpenERP, we try to geolocate
stdout_write('VERBOSE "Trying to geolocate with country %s and lang %s"\n' % (options.country, options.lang))
res = geolocate_phone_number(input_cid_number, options.country, options.lang)
else:
# if the number is not found in OpenERP, we put 'default_cid_name' as CID Name
# if the number is not found in OpenERP and geoloc is off, we put 'default_cid_name' as CID Name
res = default_cid_name
# All SIP phones should support UTF-8... but in case you have analog phones over TDM

13
asterisk_click2dial/scripts/get_cid_name_timeout.sh

@ -14,5 +14,14 @@
# in the "coreutils" package
# The first argument of the "timeout" command is the maximum execution time
# In this example, we chose 1 second
timeout 1s /usr/local/bin/get_cid_name.py -s openerp.mycompany.com -d erp_prod -u 12 -w "mypasswd"
# In this example, we chose 2 seconds. Note that geolocalisation takes about
# 1 second on an small machine ; so if you enable the --geoloc option,
# don't put a 1 sec timeout !
# To test this script manually (i.e. outside of Asterisk), run :
# echo "agi_callerid:0141981242"|get_cid_name_timeout.sh
# where 0141981242 is a phone number that could be presented by the calling party
PATH=/usr/local/sbin:/usr/local/bin:/var/lib/asterisk/agi-bin:/sbin:/bin:/usr/sbin:/usr/bin
timeout 2s get_cid_name.py --server openerp.mycompany.com --database erp_prod --user-id 12 --password "thepasswd" --geoloc --geoloc-country "FR" --geoloc-lang "fr"

2
asterisk_click2dial/security/asterisk_server_security.xml

@ -2,7 +2,7 @@
<!--
Asterisk Click2dial module for OpenERP
Copyright (C) 2010-2012 Alexis de Lattre <alexis@via.ecp.fr>
The licence is in the file __terp__.py
The licence is in the file __openerp__.py
-->
<openerp>

23
asterisk_click2dial/wizard/__init__.py

@ -0,0 +1,23 @@
# -*- coding: utf-8 -*-
##############################################################################
#
# Asterisk Click2Dial module for OpenERP
# Copyright (C) 2012-2013 Alexis de Lattre <alexis@via.ecp.fr>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
import reformat_all_phonenumbers
import open_calling_partner

209
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 <alexis@via.ecp.fr>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from 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()

67
asterisk_click2dial/wizard/open_calling_partner_view.xml

@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Asterisk Click2dial module for OpenERP
Copyright (C) 2012-2013 Alexis de Lattre <alexis@via.ecp.fr>
The licence is in the file __terp__.py
-->
<openerp>
<data>
<!-- Get partner from incoming phone call -->
<record id="view_open_calling_partner" model="ir.ui.view">
<field name="name">view_open_calling_partner</field>
<field name="model">wizard.open.calling.partner</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Open calling partner">
<field name="calling_number" colspan="4"/>
<group attrs="{'invisible':[('partner_id','=',False)]}" colspan="4">
<field name="partner_address_id" />
<field name="partner_id" />
</group>
<newline />
<group colspan="4" attrs="{'invisible':[('partner_id','=',False)]}">
<button name="open_partner" icon="gtk-go-forward" string="Partner form" type="object" />
<button name="open_sale_orders" icon="gtk-go-forward" string="Related sale orders" type="object" />
<button name="open_invoices" icon="gtk-go-forward" string="Related invoices" type="object" />
<button special="cancel" icon="gtk-cancel" string="Cancel" />
<newline />
<!-- TODO : try to reimplement the scenario where the partner_address exist but not the partner ; cf the 6.1 branch -->
</group>
<group attrs="{'invisible':[('partner_address_id','!=',False)]}" colspan="4" col="8">
<label string="No partner contact found in OpenERP with this number" colspan="8" />
<separator string="Create a new contact" colspan="8" />
<button name="create_partner_address_phone" icon="gtk-new" string="with calling number as phone" type="object" colspan="4"/>
<button name="create_partner_address_mobile" icon="gtk-new" string="with calling number as mobile" type="object" colspan="4"/>
<newline />
<separator string="Update an existing contact" colspan="8" />
<field name="to_update_partner_address_id" colspan="8" on_change="onchange_to_update_partner_address(to_update_partner_address_id)"/>
<field name="current_phone" colspan="6"/>
<button name="update_partner_address_phone" icon="gtk-convert" string="Update phone" type="object" colspan="2"/>
<field name="current_mobile" colspan="6"/>
<button name="update_partner_address_mobile" icon="gtk-convert" string="Update mobile" type="object" colspan="2"/>
<newline />
<button special="cancel" icon="gtk-cancel" string="Cancel" colspan="8" />
</group>
<!-- I repeat the cancel button for layout reasons -->
</form>
</field>
</record>
<record id="action_open_calling_partner" model="ir.actions.act_window">
<field name="name">Open calling partner</field>
<field name="res_model">wizard.open.calling.partner</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<menuitem id="menu_open_calling_partner_sales" parent="base.menu_base_partner" action="action_open_calling_partner" sequence="50" />
</data>
</openerp>

67
asterisk_click2dial/wizard/reformat_all_phonenumbers.py

@ -0,0 +1,67 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Asterisk Click2dial module for OpenERP
# Copyright (C) 2012-2013 Alexis de Lattre <alexis@via.ecp.fr>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv, fields
import netsvc
from tools.translate import _
logger = netsvc.Logger()
class reformat_all_phonenumbers(osv.osv_memory):
_name = "reformat.all.phonenumbers"
_description = "Reformat all phone numbers"
_columns = {
'phonenumbers_not_reformatted': fields.text("Phone numbers that couldn't be reformatted"),
}
def run_reformat_all_phonenumbers(self, cr, uid, ids, context=None):
print "RUN ids=", ids
addr_obj = self.pool.get('res.partner.address')
phonefields = ['phone', 'fax', 'mobile']
logger.notifyChannel('click2dial', netsvc.LOG_INFO, 'Starting to reformat all the phone numbers')
all_addr_ids = addr_obj.search(cr, uid, ['|', ('active', '=', True), ('active', '=', False)], context=context)
phonenumbers_not_reformatted = ''
for addr in addr_obj.read(cr, uid, all_addr_ids, ['name'] + phonefields, context=context):
init_addr = addr.copy()
# addr is _updated_ by the fonction _reformat_phonenumbers()
try:
addr_obj._reformat_phonenumbers(cr, uid, addr, context=context)
except Exception, e:
#raise osv.except_osv(_('Error :'), _("Problem on partner contact '%s'. Error message: %s" % (init_addr.get('name'), e[1])))
phonenumbers_not_reformatted += "Problem on partner contact '%s'. Error message: %s" % (init_addr.get('name'), e[1]) + "\n"
logger.notifyChannel('click2dial', netsvc.LOG_WARNING, "Problem on partner contact '%s'. Error message: %s" % (init_addr.get('name'), e[1]))
continue
# Test if the phone numbers have been changed
if any([init_addr.get(field) != addr.get(field) for field in phonefields]):
addr.pop('id')
addr.pop('name')
logger.notifyChannel('click2dial', netsvc.LOG_INFO, 'Reformating phone number: FROM %s TO %s' % (unicode(init_addr), unicode(addr)))
addr_obj.write(cr, uid, init_addr['id'], addr, context=context)
if not phonenumbers_not_reformatted:
phonenumbers_not_reformatted = 'All phone numbers have been reformatted successfully.'
self.write(cr, uid, ids, {'phonenumbers_not_reformatted': phonenumbers_not_reformatted}, context=context)
logger.notifyChannel('click2dial', netsvc.LOG_INFO, 'End of the phone number reformatting wizard')
return True
reformat_all_phonenumbers()

39
asterisk_click2dial/wizard/reformat_all_phonenumbers_view.xml

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Asterisk Click2dial module for OpenERP
Copyright (C) 2012-2013 Alexis de Lattre <alexis@via.ecp.fr>
The licence is in the file __terp__.py
-->
<openerp>
<data>
<record id="reformat_all_phonenumbers_form" model="ir.ui.view">
<field name="name">reformat_all_phonenumbers.form</field>
<field name="model">reformat.all.phonenumbers</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="Reformat all phone numbers">
<label string="This wizard reformats the phone, mobile and fax numbers of all partner contacts in standard international format e.g. +33141981242" colspan="4"/>
<button special="cancel" icon="gtk-cancel" string="Close" />
<button name="run_reformat_all_phonenumbers" icon="gtk-ok" string="Reformat all phone numbers" type="object" />
<label colspan="4" string="Phone numbers that couldn't be reformatted:"/>
<field name="phonenumbers_not_reformatted" colspan="4" nolabel="1"/>
</form>
</field>
</record>
<record id="reformat_all_phonenumbers_action" model="ir.actions.act_window">
<field name="name">Reformat all phone numbers</field>
<field name="res_model">reformat.all.phonenumbers</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
<!-- Menu entry under Settings > Configuration -->
<menuitem id="reformat_all_phonenumbers_menu" action="reformat_all_phonenumbers_action" parent="menu_asterisk_servers" sequence="100"/>
</data>
</openerp>

11
asterisk_click2dial_crm/__init__.py

@ -1,10 +1,11 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Asterisk click2dial CRM module for OpenERP
# Copyright (c) 2011 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
# Jesús Martín <jmartin@zikzakmedia.com>
# $Id$
# Copyright (c) 2012 Akretion (http://www.akretion.com)
# @author: Jesús Martín <jmartin@zikzakmedia.com>
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@ -21,5 +22,5 @@
#
##############################################################################
import res_partner_address
import asterisk_click2dial_crm
import wizard

64
asterisk_click2dial_crm/__terp__.py

@ -0,0 +1,64 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Asterisk click2dial CRM module for OpenERP
# Copyright (c) 2011 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
# Copyright (c) 2012 Akretion (http://www.akretion.com)
# @author: Jesús Martín <jmartin@zikzakmedia.com>
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
{
"name": "Asterisk Click2dial CRM",
"version": "0.1",
"author": "Zikzakmedia SL, Akretion",
"website": "http://www.zikzakmedia.com",
"license" : "AGPL-3",
"category": "Customer Relationship Management",
"description": """
This module adds CRM-specific features to the asterisk_click2dial module.
It adds 2 features :
First, when you do a click2dial, OpenERP will propose you to create an
outbound phone call in the CRM ; if you answer 'Yes', it will create the phone
call in the CRM and open it in a new tab. If some users don't want to be asked
to create a phone call in the CRM each time they do a click2dial, you
should disable the corresponding option in the 'Telephony' tab of the 'User'
form.
Second, when you receive a phone call and run the wizard "Open calling partner",
if the partner is found in OpenERP, you will see a button that proposes to create
an inbound phone call in the CRM.
This module has been initially developped by Zikzakmedia and has been enhanced by Akretion.
A detailed documentation for the OpenERP-Asterisk connector is available on the Akretion Web site : http://www.akretion.com/en/products-and-services/openerp-asterisk-voip-connector
""",
"depends": [
'asterisk_click2dial',
'crm',
],
"init_xml": [],
"demo_xml": [],
"update_xml": [
'wizard/open_calling_partner_view.xml',
'wizard/create_crm_phonecall_view.xml',
'res_users_view.xml',
],
"installable": True,
}

77
asterisk_click2dial_crm/asterisk_click2dial_crm.py

@ -0,0 +1,77 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Asterisk click2dial CRM module for OpenERP
# Copyright (c) 2011 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
# Copyright (c) 2012 Akretion (http://www.akretion.com)
# @author: Jesús Martín <jmartin@zikzakmedia.com>
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv, fields
# Lib to translate error messages
from tools.translate import _
class res_partner_address(osv.osv):
_inherit = "res.partner.address"
def dial(self, cr, uid, ids, phone_field='phone', context=None):
'''
This method open the phone call history when the phone click2dial
button of asterisk_click2dial module is pressed
:return the phone call history view of the partner
'''
if context is None:
context = {}
super(res_partner_address, self).dial(cr, uid, ids, phone_field=phone_field, context=context)
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
context['partner_address_id'] = ids[0]
action_start_wizard = {
'name': 'Create phone call in CRM',
'type': 'ir.actions.act_window',
'res_model': 'wizard.create.crm.phonecall',
'view_type': 'form',
'view_mode': 'form',
'nodestroy': True,
'target': 'new',
'context': context,
}
if user.context_propose_creation_crm_call:
return action_start_wizard
else:
return True
res_partner_address()
class res_users(osv.osv):
_inherit = "res.users"
_columns = {
# Field name starts with 'context_' to allow modification by the user
# in his preferences, cf server/openerp/addons/base/res/res_users.py
# in "def write" of "class users"
# This exists in since OpenERP 6.0 (it is not in OpenERP 5.0)
'context_propose_creation_crm_call': fields.boolean('Propose to create a call in CRM after a click2dial'),
}
_defaults = {
'context_propose_creation_crm_call': lambda *a: True,
}
res_users()

78
asterisk_click2dial_crm/i18n/asterisk_click2dial_crm.pot

@ -4,10 +4,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.0.2\n"
"Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2011-11-09 15:28+0000\n"
"PO-Revision-Date: 2011-11-09 15:28+0000\n"
"Project-Id-Version: OpenERP Server 6.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-02 23:46+0000\n"
"PO-Revision-Date: 2012-06-02 23:46+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@ -16,23 +16,63 @@ msgstr ""
"Plural-Forms: \n"
#. module: asterisk_click2dial_crm
#: model:ir.model,name:asterisk_click2dial_crm.model_res_partner_address
msgid "Partner Addresses"
msgstr "Partner Addresses"
#: model:ir.actions.act_window,name:asterisk_click2dial_crm.action_create_crm_phonecall
msgid "Create CRM phonecall"
msgstr ""
#. module: asterisk_click2dial_crm
#: code:addons/asterisk_click2dial_crm/wizard/create_crm_phonecall.py:45
#, python-format
msgid "Call with"
msgstr ""
#. module: asterisk_click2dial_crm
#: view:wizard.open.calling.partner:0
msgid "Create call in CRM"
msgstr ""
#. module: asterisk_click2dial_crm
#: view:wizard.create.crm.phonecall:0
msgid "CRM phone call"
msgstr ""
#. module: asterisk_click2dial_crm
#: view:wizard.create.crm.phonecall:0
msgid "No"
msgstr ""
#. module: asterisk_click2dial_crm
#: model:ir.model,name:asterisk_click2dial_crm.model_wizard_open_calling_partner
msgid "wizard.open.calling.partner"
msgstr ""
#. module: asterisk_click2dial_crm
#: model:ir.module.module,description:asterisk_click2dial_crm.module_meta_information
msgid "\n"
" Create a outbound phone call when the user makes a call phone by clicking\n"
" the click2dial button of the partner address view, and opens it in a new tab.\n"
" "
msgstr "\n"
" Create a outbound phone call when the user makes a call phone by clicking\n"
" the click2dial button of the partner address view, and opens it in a new tab.\n"
" "
#: model:ir.model,name:asterisk_click2dial_crm.model_wizard_create_crm_phonecall
msgid "wizard.create.crm.phonecall"
msgstr ""
#. module: asterisk_click2dial_crm
#: field:res.users,context_propose_creation_crm_call:0
msgid "Propose to create a call in CRM after a click2dial"
msgstr ""
#. module: asterisk_click2dial_crm
#: model:ir.module.module,shortdesc:asterisk_click2dial_crm.module_meta_information
msgid "Asterisk Click2dial CRM"
msgstr "Asterisk Click2dial CRM"
#: view:wizard.create.crm.phonecall:0
msgid "Create a phone call in the CRM ?"
msgstr ""
#. module: asterisk_click2dial_crm
#: model:ir.model,name:asterisk_click2dial_crm.model_res_users
msgid "res.users"
msgstr ""
#. module: asterisk_click2dial_crm
#: view:wizard.create.crm.phonecall:0
msgid "Yes"
msgstr ""
#. module: asterisk_click2dial_crm
#: model:ir.model,name:asterisk_click2dial_crm.model_res_partner_address
msgid "Partner Addresses"
msgstr ""

78
asterisk_click2dial_crm/i18n/fr.po

@ -0,0 +1,78 @@
# Translation of OpenERP Server.
# This file contains the translation of the following modules:
# * asterisk_click2dial_crm
#
msgid ""
msgstr ""
"Project-Id-Version: OpenERP Server 6.1\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2012-06-02 23:47+0000\n"
"PO-Revision-Date: 2012-06-02 23:47+0000\n"
"Last-Translator: <>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"
#. module: asterisk_click2dial_crm
#: model:ir.actions.act_window,name:asterisk_click2dial_crm.action_create_crm_phonecall
msgid "Create CRM phonecall"
msgstr "Créer un appel dans la CRM"
#. module: asterisk_click2dial_crm
#: code:addons/asterisk_click2dial_crm/wizard/create_crm_phonecall.py:45
#, python-format
msgid "Call with"
msgstr "Conversation avec"
#. module: asterisk_click2dial_crm
#: view:wizard.open.calling.partner:0
msgid "Create call in CRM"
msgstr "Créer un appel dans la CRM"
#. module: asterisk_click2dial_crm
#: view:wizard.create.crm.phonecall:0
msgid "CRM phone call"
msgstr "Appel dans la CRM"
#. module: asterisk_click2dial_crm
#: view:wizard.create.crm.phonecall:0
msgid "No"
msgstr "Non"
#. module: asterisk_click2dial_crm
#: model:ir.model,name:asterisk_click2dial_crm.model_wizard_open_calling_partner
msgid "wizard.open.calling.partner"
msgstr "wizard.open.calling.partner"
#. module: asterisk_click2dial_crm
#: model:ir.model,name:asterisk_click2dial_crm.model_wizard_create_crm_phonecall
msgid "wizard.create.crm.phonecall"
msgstr "wizard.create.crm.phonecall"
#. module: asterisk_click2dial_crm
#: field:res.users,context_propose_creation_crm_call:0
msgid "Propose to create a call in CRM after a click2dial"
msgstr "Propose de créer un appel dans la CRM après un click2dial"
#. module: asterisk_click2dial_crm
#: view:wizard.create.crm.phonecall:0
msgid "Create a phone call in the CRM ?"
msgstr "Créer un appel téléphonique dans la CRM ?"
#. module: asterisk_click2dial_crm
#: model:ir.model,name:asterisk_click2dial_crm.model_res_users
msgid "res.users"
msgstr "res.users"
#. module: asterisk_click2dial_crm
#: view:wizard.create.crm.phonecall:0
msgid "Yes"
msgstr "Oui"
#. module: asterisk_click2dial_crm
#: model:ir.model,name:asterisk_click2dial_crm.model_res_partner_address
msgid "Partner Addresses"
msgstr "Carnet d'adresses"

110
asterisk_click2dial_crm/res_partner_address.py

@ -1,110 +0,0 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2011 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
# Jesús Martín <jmartin@zikzakmedia.com>
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv, fields
# Lib to translate error messages
from tools.translate import _
class res_partner_address(osv.osv):
_name = "res.partner.address"
_inherit = "res.partner.address"
def action_dial_phone(self, cr, uid, ids, context=None):
'''
This method open the phone call history when the phone click2dial
button of asterisk_click2dial module is pressed
:return the phone call history view of the partner
'''
if context is None:
context = {}
super(res_partner_address, self).action_dial_phone(cr, uid, ids, context)
crm_phonecall_id = self.create_phonecall(cr, uid, ids, context)
partner = self.browse(cr, uid, ids[0], context).partner_id
return {
'name': partner.name,
'domain': "[('partner_address_id.partner_id.id', '=', %s)]" % partner.id,
'res_model': 'crm.phonecall',
'res_id': crm_phonecall_id,
'view_type': 'form',
'view_mode': 'form,tree',
'view_id': False,
'type': 'ir.actions.act_window',
'nodestroy': True,
'target': 'current',
'context': context,
}
def action_dial_mobile(self, cr, uid, ids, context=None):
'''
This method open the phone call history when the mobile click2dial
button of asterisk_click2dial module is pressed
:return the phone call history view of the partner
'''
if context is None:
context = {}
super(res_partner_address, self).action_dial_mobile(cr, uid, ids, context)
crm_phonecall_id = self.create_phonecall(cr, uid, ids, context)
partner = self.browse(cr, uid, ids[0], context).partner_id
return {
'name': partner.name,
'domain': "[('partner_address_id.partner_id.id', '=', %s)]" % partner.id,
'res_model': 'crm.phonecall',
'res_id': crm_phonecall_id,
'view_type': 'form',
'view_mode': 'form,tree',
'view_id': False,
'type': 'ir.actions.act_window',
'nodestroy': True,
'target': 'current',
'context': context,
}
def create_phonecall(self, cr, uid, ids, context = None):
'''
This method creates a phone call history when the phone click2dial
button of asterisk_click2dial module is pressed and opens it.
:return True
'''
if context is None:
context = {}
crm_phonecall_obj = self.pool.get('crm.phonecall')
partner_address = self.browse(cr, uid, ids[0], context)
categ_ids = self.pool.get('crm.case.categ').search(cr, uid, [('name','=','Outbound')], context={'lang': 'en_US'})
case_seccion_ids = self.pool.get('crm.case.section').search(cr, uid, [('member_ids', 'in', uid)], context = context)
values = {
'name': "",
'partner_id': partner_address.partner_id and partner_address.partner_id.id or False,
'partner_address_id': partner_address.id,
'partner_phone': partner_address.phone,
'partner_contact': partner_address.name,
'partner_mobile': partner_address.mobile,
'user_id': uid,
'categ_id': categ_ids and categ_ids[0] or False,
'section_id': case_seccion_ids and case_seccion_ids[0] or False,
}
crm_phonecall_id = crm_phonecall_obj.create(cr, uid, values, context)
return crm_phonecall_id
res_partner_address()

41
asterisk_click2dial_crm/res_users_view.xml

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2012 Akretion (http://www.akretion.com/)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<!-- Add option on user form view -->
<record id="asterisk_crm_option_view" model="ir.ui.view">
<field name="name">asterisk.crm.option.view</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="asterisk_click2dial.asterisk_res_users_internal_number"/>
<field name="arch" type="xml">
<field name="asterisk_server_id" position="after">
<field name="context_propose_creation_crm_call"/>
</field>
</field>
</record>
<record id="asterisk_crm_preferences_option_view" model="ir.ui.view">
<field name="name">asterisk.crm.preferences.option.view</field>
<field name="model">res.users</field>
<field name="inherit_id" ref="base.view_users_form_simple_modif" />
<field name="arch" type="xml">
<field name="signature" position="after">
<group colspan="4" col="2" >
<!-- I create a group to avoid that the long "string" of the
field context_propose_creation_crm_call pushes all other fields
to the right -->
<separator string="Telephony preferences" colspan="2"/>
<field name="context_propose_creation_crm_call" readonly="0"/>
</group>
</field>
</field>
</record>
</data>
</openerp>

29
asterisk_click2dial_crm/__openerp__.py → asterisk_click2dial_crm/wizard/__init__.py

@ -1,10 +1,9 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2011 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
# Jesús Martín <jmartin@zikzakmedia.com>
# $Id$
# Asterisk click2dial CRM module for OpenERP
# Copyright (c) 2012 Akretion (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
@ -21,24 +20,4 @@
#
##############################################################################
{
'name': 'Asterisk Click2dial CRM',
"version": "0.1",
"author": "Zikzakmedia SL",
"website": "http://www.zikzakmedia.com",
"license" : "AGPL-3",
'category': 'Generic Modules/Others',
"description": """
Create a outbound phone call when the user makes a call phone by clicking
the click2dial button of the partner address view, and opens it in a new tab.
""",
"depends": [
'asterisk_click2dial',
'crm',
],
"init_xml" : [ ],
"demo_xml" : [ ],
"update_xml" : [
],
"installable": True,
}
import create_crm_phonecall

78
asterisk_click2dial_crm/wizard/create_crm_phonecall.py

@ -0,0 +1,78 @@
# -*- encoding: utf-8 -*-
##############################################################################
#
# Asterisk click2dial CRM module for OpenERP
# Copyright (c) 2011 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
# Copyright (c) 2012 Akretion (http://www.akretion.com)
# @author: Jesús Martín <jmartin@zikzakmedia.com>
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
##############################################################################
from osv import osv, fields
# Lib to translate error messages
from tools.translate import _
class wizard_create_crm_phonecall(osv.osv_memory):
_name = "wizard.create.crm.phonecall"
def button_create_outgoing_phonecall(self, cr, uid, ids, context=None):
partner_address = self.pool.get('res.partner.address').browse(cr, uid, context.get('partner_address_id'), context=context)
return self._create_open_crm_phonecall(cr, uid, partner_address, crm_categ='Outbound', context=context)
def _create_open_crm_phonecall(self, cr, uid, partner_address, crm_categ, context=None):
if context is None:
context = {}
crm_phonecall_obj = self.pool.get('crm.phonecall')
categ_ids = self.pool.get('crm.case.categ').search(cr, uid, [('name','=',crm_categ)], context={'lang': 'en_US'})
case_section_ids = self.pool.get('crm.case.section').search(cr, uid, [('member_ids', 'in', uid)], context=context)
context.update({
'default_partner_id': partner_address.partner_id and partner_address.partner_id.id or False,
'default_partner_address_id': partner_address.id,
'default_partner_contact': partner_address.name,
'default_partner_phone': partner_address.phone,
'default_partner_mobile': partner_address.mobile,
'default_categ_id': categ_ids and categ_ids[0] or False,
'default_section_id': case_section_ids and case_section_ids[0] or False,
})
return {
'name': partner_address.name,
'domain': [('partner_id', '=', partner_address.partner_id.id)],
'res_model': 'crm.phonecall',
'view_type': 'form',
'view_mode': 'form,tree',
'type': 'ir.actions.act_window',
'nodestroy': False, # close the pop-up wizard after action
'target': 'current',
'context': context,
}
wizard_create_crm_phonecall()
class wizard_open_calling_partner(osv.osv_memory):
_inherit = "wizard.open.calling.partner"
def create_incoming_phonecall(self, cr, uid, ids, crm_categ, context=None):
'''Started by button on 'open calling partner wizard'''
partner_address = self.browse(cr, uid, ids[0], context=context).partner_address_id
action = self.pool.get('wizard.create.crm.phonecall')._create_open_crm_phonecall(cr, uid, partner_address, crm_categ='Inbound', context=context)
return action
wizard_open_calling_partner()

37
asterisk_click2dial_crm/wizard/create_crm_phonecall_view.xml

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2012 Akretion (http://www.akretion.com)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<!-- Add button on the "Get partner from incoming phone call view" -->
<record id="create_crm_phonecall_view" model="ir.ui.view">
<field name="name">create_crm_phonecall.view</field>
<field name="model">wizard.create.crm.phonecall</field>
<field name="type">form</field>
<field name="arch" type="xml">
<form string="CRM phone call">
<label string="Create a phone call in the CRM ?" colspan="2"/>
<newline />
<button name="button_create_outgoing_phonecall" icon="gtk-new" string="Yes" type="object"/>
<button special="cancel" icon="gtk-cancel" string="No" />
</form>
</field>
</record>
<record id="action_create_crm_phonecall" model="ir.actions.act_window">
<field name="name">Create CRM phonecall</field>
<field name="res_model">wizard.create.crm.phonecall</field>
<field name="view_type">form</field>
<field name="view_mode">form</field>
<field name="target">new</field>
</record>
</data>
</openerp>

30
asterisk_click2dial_crm/wizard/open_calling_partner_view.xml

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2012 Akretion (http://www.akretion.com)
@author: Alexis de Lattre <alexis.delattre@akretion.com>
The licence is in the file __openerp__.py
-->
<openerp>
<data>
<!-- Add button on the "Get partner from incoming phone call view" -->
<record id="asterisk_click2dial_crm_open_calling_partner_view" model="ir.ui.view">
<field name="name">asterisk_click2dial_crm.open_calling_partner.view</field>
<field name="model">wizard.open.calling.partner</field>
<field name="inherit_id" ref="asterisk_click2dial.view_open_calling_partner"/>
<field name="type">form</field>
<field name="arch" type="xml">
<button name="open_invoices" position="after">
<button name="create_incoming_phonecall" icon="gtk-new" string="Create call in CRM" type="object" />
</button>
<!-- We enlarge the small original 'Cancel' button -->
<xpath expr="/form/group/button[@name='open_partner']/../button[@special='cancel']" position="attributes">
<attribute name="colspan">4</attribute>
</xpath>
</field>
</record>
</data>
</openerp>
Loading…
Cancel
Save