You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
3.2 KiB

  1. # -*- encoding: utf-8 -*-
  2. ##############################################################################
  3. #
  4. # Base Phone module for OpenERP
  5. # Copyright (C) 2014 Alexis de Lattre <alexis@via.ecp.fr>
  6. #
  7. # This program is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU Affero General Public License as
  9. # published by the Free Software Foundation, either version 3 of the
  10. # License, or (at your option) any later version.
  11. #
  12. # This program is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. # GNU Affero General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU Affero General Public License
  18. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  19. #
  20. ##############################################################################
  21. {
  22. 'name': 'Base Phone',
  23. 'version': '0.1',
  24. 'category': 'Phone',
  25. 'license': 'AGPL-3',
  26. 'summary': 'Validate phone numbers',
  27. 'description': """
  28. Base Phone
  29. ==========
  30. This module validate phone numbers using the *phonenumbers* Python library, which is a port of the library used in Android smartphones. For example, if your user is linked to a French company and you update the form view of a partner with a badly written French phone number such as '01-55-42-12-42', Odoo will automatically update the phone number to E.164 format '+33155421242' and display in the form view of the partner the readable equivalent '+33 1 55 42 12 42'.
  31. This module also adds *tel:* links on phone numbers and *fax:* links on fax numbers. If you have a softphone or a client software on your PC that is associated with *tel:* links, the softphone should propose you to dial the phone number when you click on such a link.
  32. This module also updates the format() function for reports and adds 2 arguments :
  33. * *phone* : should be True for a phone number, False (default) otherwize.
  34. * *phone_format* : it can have 3 possible values :
  35. * *international* (default) : the report will display '+33 1 55 42 12 42'
  36. * *national* : the report will display '01 55 42 12 42'
  37. * *e164* : the report will display '+33155421242'
  38. For example, in the Sale Order report, to display the phone number of the Salesman, you can write : o.user_id and o.user_id.phone and format(o.user_id.phone, phone=True, phone_format='national') or ''
  39. This module is independant from the Asterisk connector.
  40. Please contact Alexis de Lattre from Akretion <alexis.delattre@akretion.com> for any help or question about this module.
  41. """,
  42. 'author': 'Akretion',
  43. 'website': 'http://www.akretion.com/',
  44. 'depends': ['base', 'web'],
  45. 'external_dependencies': {'python': ['phonenumbers']},
  46. 'data': [
  47. 'security/phone_security.xml',
  48. 'security/ir.model.access.csv',
  49. 'res_partner_view.xml',
  50. 'res_company_view.xml',
  51. 'res_users_view.xml',
  52. 'wizard/reformat_all_phonenumbers_view.xml',
  53. 'wizard/number_not_found_view.xml',
  54. 'web_phone.xml',
  55. ],
  56. 'qweb': ['static/src/xml/*.xml'],
  57. 'demo': ['base_phone_demo.xml'],
  58. 'images': [],
  59. 'installable': True,
  60. }