Zum Inhalt springen
Menü
Sie müssen registriert sein, um mit der Community zu interagieren.
Diese Frage wurde gekennzeichnet
2 Antworten
4192 Ansichten

I  define function 'write' as below in .py file:

@api.multi
def write(self, cr, uid, ids, vals, context=None):
    raise Warning('his ds sf')
    res = super(Checks, self).write(cr, uid, ids, vals, context=context) #res stores the result of the write function
    return res

I hope when click 'edit' button, a raise box would pop out; but in fact nothing happen when I  click the 'edit' button.

shall I  get some advice for this?


Avatar
Verwerfen

write is triggered after clicking on SAVE.

Autor

so which function is triggered after clicking on EDIT?

Beste Antwort

The write method triggered only if you edit an existing record after you click on Save button not Edit button.

Avatar
Verwerfen
Autor

what shall I do if I want to run some code when I click the "edit " button.

Edit is a Framework button defined in web app defined in base.xml file in \web\static\src\xml and there is no python method link to it and it's controlled by javascript and I don't have more info about.

Autor

thanks a lot!

Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Aug. 19
5999
1
März 15
5246
1
März 15
4422
0
Dez. 23
1268
3
Feb. 24
4773