Odoo 11.0使字段变得唯一 [英] Odoo 11.0 make field unique
本文介绍了Odoo 11.0使字段变得唯一的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有人可以解释如何使字段唯一值吗?像发票号,订单号...一样,每个值都必须是唯一的.
Can somebody explain how to make a field unique value? Like the invoice number, order number, ... each value must be unique.
我也需要产品内部参考和联系参考.我一直在通过Odoo Studio应用检查这些字段的参数,但没有看到如何使它们唯一的方法.
I need this for the product internal_reference and contact reference too. I've been checking the parameters for these fields via Odoo Studio app, but I don't see anything how to make them unique.
谢谢
推荐答案
_sql_constraints = [
('Any_name', 'unique (your_field_name)','Your message!')]
这篇关于Odoo 11.0使字段变得唯一的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文