Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有人可以解释如何使字段具有唯一值吗?就像发票号、订单号……每个值都必须是唯一的。
我也需要产品 internal_reference 和联系参考。我一直在通过 Odoo Studio 应用程序检查这些字段的参数,但我没有看到任何使它们独一无二的方法。
谢谢
_sql_constraints = [ ('Any_name', 'unique (your_field_name)','Your message!')]