我尝试从模型中扩展方法product\u id\u changeaccount.invoice.line行地址:
分类科目发票行(模型。模型)地址:
\u继承='account.invoice.line行'
@api.multi
def product_id_change(self, product, uom_id, qty=0, name='', type_x='out_invoice',
partner_id=False, fposition_id=False, price_unit=False, currency_id=False,
company_id=None):
res = super(account_invoice_line, self).product_id_change(self,product, uom_id, qty, name, type_x, partner_id, fposition_id, price_unit, currency_id, company_id)
return res.
但是当我用super:TypeError:product\u id\u change()调用product\u id\u change()时,我有一个错误:最多使用11个参数(给定12个)。你知道吗
你有主意吗?你知道吗
从超级方法调用行中删除self。你知道吗
无需将self显式传递给任何方法,自动调用此参数中的对象集。你知道吗
相关问题 更多 >
编程相关推荐