İçereği Atla
Menü
Bu soru işaretlendi
1 Cevapla
4383 Görünümler

I like to replace either the Create button or modify the method when pressed. This is in the tree or list view  of my custom module that inherits productd.template . All the examples I tried through either the template xml . But can't seem to replace these - not sure the syntax either for xpath cause string no longer works in 12 right? and what would be the name of that button ? PLEASE HELP! 

Thanks in Advance 

R

Avatar
Vazgeç
En İyi Yanıt

Hi,

Instead of replacing the function, inheriting the function is a good method follow the below example of inheriting an existing function

class Product(models.Model):
_inherit = 'product.template'

def create(self):
res = super(Product, self).create()
# do the necessary operations here
return res

Regards

Avatar
Vazgeç
İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Mar 23
10044
2
Mar 23
2451
2
May 22
4423
0
Mar 22
1595
1
Eyl 20
3564