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.

28 lines
1.2 KiB

  1. # -*- coding: utf-8 -*-
  2. # © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
  3. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
  4. from openerp import models, fields
  5. class ResCompany(models.Model):
  6. _inherit = 'res.company'
  7. number_of_digits_to_match_from_end = fields.Integer(
  8. string='Number of Digits To Match From End',
  9. default=8,
  10. help="In several situations, OpenERP will have to find a "
  11. "Partner/Lead/Employee/... from a phone number presented by the "
  12. "calling party. As the phone numbers presented by your phone "
  13. "operator may not always be displayed in a standard format, "
  14. "the best method to find the related Partner/Lead/Employee/... "
  15. "in OpenERP is to try to match the end of the phone number in "
  16. "OpenERP with the N last digits of the phone number presented "
  17. "by the calling party. N is the value you should enter in this "
  18. "field.")
  19. _sql_constraints = [(
  20. 'number_of_digits_to_match_from_end_positive',
  21. 'CHECK (number_of_digits_to_match_from_end > 0)',
  22. "The value of the field 'Number of Digits To Match From End' must "
  23. "be positive.")]