Hello, I try ti add a sale state to sale order but I can not do it.
Here is my models.py :
from odoo import fields, models, apiclass SaleOrder(models.Model):_inherit = 'sale.order'state = fields.Selection(selection_add([('FichierOk', 'Fichier Ok')])@api.multidef action_fichierOk(self):self.state = 'fichierOk'
Then My Xml :
I can see my new Button but I don't see the Satus 'FichierOk' in status bar and the button give me an error :
AttributeError: type object 'sale.order' has no attribute 'action_fichierOk'
Can you help me ?