Bonjour, J'ai le code ci-dessous, tous les boutons sont actifs sauf le bouton "Add" qui ne réagit pas. Ai-je omis quelque chose dans le Statetransition() ?
class OpenPlanterArbre(Wizard): u'Open Arbre à planter dans UG' __name__ = 'cg.planter_arbre.open' start = StateView( 'cg.planter_arbre.open.start', 'cg.planter_arbre_open_start_view_form', [Button('Cancel', 'end', 'tryton-cancel'), Button('New tree', 'newarbre', 'tryton-new', True), Button('Model tree', 'modelarbre', 'tryton-ok')] ) modelarbre = StateView( 'cg.planter_model_arbre.open.start', 'cg.planter_model_arbre_open_start_view_form', [Button('Cancel', 'end', 'tryton-cancel'), Button('Ok', 'check', 'tryton-ok')] ) newarbre = StateView( 'cg.arbre', 'cg.cg_planter_arbre_view_form_planter', [Button('Cancel', 'end', 'tryton-cancel'), Button('Add', 'add', 'tryton-ok', True)] ) add = StateTransition() check = StateTransition() def do_check(self, action): action['pyson_context'] = PYSONEncoder().encode({'arbre': self.modelarbre.arbre}) return action, {} def transition_add(self): UGs = Pool().get('cg.ug') ...... def transition_check(self): UGs = Pool().get('cg.ug') Emplacements = Pool().get('cg.emplacement') ......