Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
請問在表單輸入數字時 如何設定限制由系統運算出來的最大值
@samchou 可以在程序中设置constraint,在代码中搜索api.constrains学习对字段设置约束逻辑, 或者利用_sql_constraints参数设置数据库级别的约束。
api.constrains
_sql_constraints
这个回答同样适用于你另外一个对时间字段的约束条件
你好 我是想在XML內設置限制最大值 <field name="wk_qty" attrs="{'invisible': [('note', 'in', ('today','makeup'))]}" widget="numeric_step" options="{'step': 1, 'min': 0, 'max': 100}" / > 但是現行僅能使用固定值 例如:100 如何能'max': max_value ? 動態設定最大值
@samchou 为什么一定要在xml里设置?
那請問要如何限制在畫面輸入的最大值?
@samchou 我回答过你了呀, https://www.odoo.com/documentation/15.0/developer/howtos/rdtraining/11_constraints.html?highlight=constraint
你好!看起来您对这段对话很感兴趣,但您还没有一个账号。
厌倦了每次访问都刷到同样的帖子?您注册账号后,您每次返回时都能精准定位到您上次浏览的位置,并可选择接收新回复通知(通过邮件或推送通知)。您还能收藏书签、为帖子顶,向社区成员表达您的欣赏。
有了你的建议,这篇帖子会更精彩哦 💗