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.

17 lines
671 B

  1. Configure all ID types you need in Contacts > Configuration > Partner ID Categories.
  2. For example, we create a category 'Driver License':
  3. Name:
  4. Name of this ID type. For example, 'Driver License'
  5. Code:
  6. Code, abbreviation or acronym of this ID type. For example, 'driver_license'
  7. Python validation code:
  8. Optional python code called to validate ID numbers of this ID type. This functionality can be
  9. overridden by setting ``id_no_validate`` to ``True`` in the context, such as:
  10. .. code-block:: python
  11. partner.with_context(id_no_validate=True).write({
  12. 'name': 'Bad Value',
  13. 'category_id': self.env.ref('id_category_only_numerics').id,
  14. })