跳至内容
菜单
此问题已终结
1 回复
4279 查看

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

形象
丢弃
最佳答案

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

形象
丢弃
相关帖文 回复 查看 活动
2
3月 23
9895
2
3月 23
2337
2
5月 22
4325
0
3月 22
1553
1
9月 20
3504