How to load fields in odoo 16 point of sale. In odoo 14 I use load_fields. But with Odoo 16 I get an error. << load_fields is not defined >>
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,
To load fields in the Odoo 16 Point of Sale (POS) module, you can use the 'fields_get' method of the 'models' class. This method returns a dictionary containing information about all the fields of a model, including their type, string label, and whether or not they are required.
Here is an example of how you can use the 'fields_get' method to load fields in the POS module:
from odoo import models
class PosSession(models.Model):
_inherit = 'pos.session'
fields_get(self, allfields=None, attributes=None):
fields = super().fields_get(allfields=allfields, attributes=attributes)
# add additional fields here
return fields
Regards
I am a beginner and have used odoo from front end only. I could do this in Odoo 15 by modifying the code as mentioned at https://www.odoo.com/forum/help-1/add-custom-field-in-pos-customer-search-207560
how to do in odoo 16. Where should i write the above code?
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 | |
|---|---|---|---|---|
|
|
5
thg 9 25
|
23315 | ||
|
|
3
thg 8 25
|
3493 | ||
|
|
1
thg 5 25
|
3371 | ||
|
|
1
thg 4 25
|
4276 | ||
|
|
1
thg 4 25
|
5082 |