I would like to put a non mandatory field in the repair module. explain the Product to repair field
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
Hi,
Please deploy the following code to remove required condition for Product to Repair in Repair module.<field name='product_id' position='attributes'>
<attribute name="required">0</attribute>
</field
make this change in py file
class RepairOrder(models.Model):
_inherit = 'repair.order'
product_id = fields.Many2one(
'product.product', string='Product to Repair',
domain="[('type', 'in', ['product', 'consu']), '|', ('company_id', '=', company_id), ('company_id', '=', False)]",
readonly=True, required=False, states={'draft': [('readonly', False)]}, check_company=True)
thank you for your help but here is the message which lives, t after the execution of the code
"The operation cannot be completed:
- Create/Update: A required field is not defined.
- Delete: another model requires deleting the record. If possible, archive it.
Model: Repair Order (repair.order), Field: Product to Repair (product_id)"
i have odoo 15 online
please tell me yes find inherit
the code does not work, can you help me with studio I have odoo 15 online.
in the repair module I want to make the "Item to repair" field non-compulsory and as well as create the article, to allow me to just fill in "Repair Description" in case this article is not part of my articles and do the repair.
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
|
1
thg 11 24
|
4539 | ||
|
1
thg 9 24
|
1340 | ||
|
1
thg 9 24
|
1191 | ||
|
2
thg 9 24
|
1657 | ||
|
0
thg 7 24
|
859 |
Please provide more details to get a help.