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

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

Avatar
Verwerfen

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

Beste Antwort

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

Avatar
Verwerfen
Verknüpfte Beiträge Antworten Ansichten Aktivität
1
Aug. 23
3176
2
Okt. 21
3154
1
Juni 21
8860
3
Juli 19
3329
1
Apr. 21
4459