Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
4306 Vues

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
Ignorer
Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
2
mars 23
9978
2
mars 23
2413
2
mai 22
4349
0
mars 22
1566
1
sept. 20
3520