I'm trying to create a new model that inherits from res.partner, but I'm getting an error. Please give me an example of this case for my reference. Thanks a lot
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,
You can inherit res.partner using this code:
class ResPartner(models.Model):
_inherit = 'res.partner'
As well as check that you inherited the correct view.
You may check this video: https://www.youtube.com/watch?v=46yecsKX2tw
Thanks.
The below mentioned answer is correct. All you need to do is create a class and inherit res.partner model and Also check the view inheritance. if some other model has inherited the view of res.partner, you can check that by enabling debugging mode and click on debug menu and select edit view: form. There under the inherited views, you can see all the inherited views of res.partner. And another thing is sometimes when we create a field, it will not get loaded and shows field not found error when we try to upgrade from UI. To solve that you should upgrade from the configuration itself by passing parameter -u module name. Thank you.
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 | |
---|---|---|---|---|
|
2
thg 3 15
|
8765 | ||
|
4
thg 3 15
|
17764 | ||
|
4
thg 2 25
|
2565 | ||
|
1
thg 8 24
|
2144 | ||
|
2
thg 11 24
|
3301 |