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

I have been trying to override a method on wizard in order to add a new parameter, I have created a module that has the same method's name as the one on the module I want to modify, but It is not taking the changes, Do you know how to override only one method on the class that executes the wizard on submit? :

class AccountConsolidationCustom(): 

def get_account_balance(self, account, partner=False, newParam=False):

get_account_balance is the method name inside the wizard script

形象
丢弃

Inheritance in odoo: https://goo.gl/4Zyc9d

最佳答案

Hi,

You can change an existing method like this,

class ChangeProductionQty(models.TransientModel):
_inherit = 'change.production.qty'

@api.model
def get_account_balance(self, account, partner=False, newParam=False):
# do xyz


Make sure that you have inherited the corresponding class itself .

Thanks

形象
丢弃
相关帖文 回复 查看 活动
1
8月 23
3109
2
10月 21
3087
1
6月 21
8731
3
7月 19
3249
1
4月 21
4374