Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
此帖文有活动时,接收通知
Hello there, it's possible to make a many2many field required ?
Thanks you !
The only thing I see for my problem is :
Redefine create and write et add constrains. It's the only thing I can do ?
Hello, it doesn't work for me, it's that for this reason I have created this request. :'(
Thanks anyway.
try fields_to_use = fields.Many2many('model.model', 'field_names_model', required=True)
You Can Use len() function in pythin,
Eg:
if len(self.Many2mnay_filed) == 0: raise UserError(_('Please Add Many2many Field'))
立即创建账户,享受专属功能,与我们的精彩社区互动!
1. Use the live chat to ask your questions. 2. The operator answers within a few minutes.
The only thing I see for my problem is :
Redefine create and write et add constrains. It's the only thing I can do ?
Hello, it doesn't work for me, it's that for this reason I have created this request. :'(
Thanks anyway.