odoo13版本,按钮隐藏功能函数赋值后没有隐藏效果?求解惑
-
self.update是什么个东东啊?订单上的invoice_count是一个计算字段啊,值是通过调用_get_invoice函数算出来的。在你的例子中,订单并没有生成invoice,所以invoice_count==0。
-
@digitalsatori 在 odoo13版本,按钮隐藏功能函数赋值后没有隐藏效果?求解惑 中说:
invoice_count
是的,没有生成invoice,就是想通过方法write({'invoice_count':1}),隐藏掉开形式发票的按钮!write()后有测试print(invoice_count)值为1,就是按钮没有隐藏!不知为啥?
-
@digitalsatori 在 odoo13版本,按钮隐藏功能函数赋值后没有隐藏效果?求解惑 中说:
invoice_count
是的,没有生成invoice,就是想通过方法write({'invoice_count':1}),隐藏掉开形式发票的按钮!write()后有测试print(invoice_count)值为1,就是按钮没有隐藏!不知为啥?
@小杜 在 odoo13版本,按钮隐藏功能函数赋值后没有隐藏效果?求解惑 中说:
@digitalsatori 在 odoo13版本,按钮隐藏功能函数赋值后没有隐藏效果?求解惑 中说:
invoice_count
是的,没有生成invoice,就是想通过方法write({'invoice_count':1}),隐藏掉开形式发票的按钮!write()后有测试print(invoice_count)值为1,就是按钮没有隐藏!不知为啥?
这是一个readonly的compute字段。可能你还不知道什么是compute字段,看这里:https://www.odoo.com/documentation/13.0/howtos/backend.html#computed-fields-and-default-values
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login
