Bonjour,

j'essaie de réaliser un module tout simple mais je en comprend l'utilisation de model, self, object, etc.

# Available locals:
# - time, datetime, dateutil: Python libraries
# - env: Odoo Environement
# - model: Model of the record on which the action is triggered
# - object: Record on which the action is triggered if there is one, otherwise None
# - workflow: Workflow engine
# - Warning: Warning Exception to use with raise
# To return an action, assign: action = {...}


J'ai créé et installé mon module
j'ai créé une action automatisé qui exécute un code python
ce code python est le suivant:
self.ma_fonction()

dans le code de ma_fonction, j'aimerais récupérer le Name (et tout autre champ) de l'object (Record on which the action is triggered if there is one, otherwise None)

Comment faire cela?
je pensais que object.name allait suffire mais non...

Je précise que l'appel de la fonction fonctionne très bien je passe dedans.
Ma fonction n'a rien à retourner ni a enregistrer ou stocker...
Juste print('Name: " + object.name) par exemple


Merci d'avance