Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
6128 มุมมอง

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Odoo 12: manage booking accounts แก้ไขแล้ว
1
ส.ค. 23
3197
2
ต.ค. 21
3217
Analytic Account Defaults แก้ไขแล้ว
1
มิ.ย. 21
8895
3
ก.ค. 19
3351
1
เม.ย. 21
4544