I am inheriting sale.order, in this model I have added a field called "comments" in text type, what I want to do is that I want to pass that field to a tree view of the same model through a button, and I want the When the user clicks the comments button, it shows a pop-up window with all the information that the "comments" field has stored (it is a button in the tree view of the comments field, not a column). Any idea?
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 Adrian Porras,
Is the comments button, a common button for the entire tree view or is it individual for each record. If it is individual for each record, you can use the following code.
#in wizard.py file
comments = fields.Text(string="comments", default=_get_comment)
def _get_comment(self):
orders = self.env['sale.order'].browse(self.env.context.get('active_ids'))
self.comment = orders.comment #(comment field in wizard = comment field in sale order)
Make sure you define the method before the columns.
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 12 24
|
2469 | ||
|
1
thg 5 24
|
10829 | ||
|
0
thg 4 21
|
3145 | ||
|
0
thg 3 17
|
3238 | ||
|
2
thg 8 25
|
2402 |