Mobile NFC

Adds functionality for NFC (Near Field Communication) user cards.

class nfc_models.nh_eobs_mobile_nfc(pool, cr)[source]

Extend users with a card’s PIN field for NFC authentication.

card_pin

Basic string field, can be length-limited, usually displayed as a single-line string in clients

Parameters:
  • size (int) – the maximum size of values stored for that field
  • translate (bool) – whether the values of this field can be translated
get_user_id_from_card_pin(*args, **kwargs)[source]

Gets the user's user_id of the card’s card_pin. Raises an exception if there’s more than one user related to the card.

Parameters:card_pin (int) – pin of the card belonging to a user
Raises:osv.except_osv
Returns:user_id
Return type:int
get_user_login_from_user_id(*args, **kwargs)[source]

Gets the user's login from the records user_id. Raises an exception if there’s more than one user related to the user_id.

Parameters:card_pin (int) – pin of the card belonging to a user
Raises:osv.except_osv
Returns:login of user
Return type:int