Use case : I need to display an information on an invoice that is linked to the originating sale order.
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ờ
Create an automated action :
Model : Journal entries = invoices
Field : Select the field on the invoice you want to update
Evaluation type : Python
Value :
Reproduce the grey part of the expression and adapt the yellow one : pick the technical name of the field on the SO you'd like to link to your new field on the invoice. If it's a many2one, add .id after the name of the field :
Save.
Another way to do so is to create a text field and add the same expression in the field "related field".
Model = account.move = journal entries = invoice
!You need to activate the debug mode!
1) Add the text field in the form view
2) Click on "More" button
3) In the "related field" field add the following expression
"invoice_line_ids.sale_line_ids.order_id."
4) Add the name of the field, from the Sale Order model, you want to link with your invoice after the last dot.
For example: "invoice_line_ids.sale_line_ids.order_id.PRICELIST_ID"
Save
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 5 24
|
5706 | ||
|
2
thg 12 24
|
4181 | ||
|
2
thg 5 25
|
6524 | ||
|
1
thg 3 23
|
3158 | ||
|
0
thg 7 21
|
444 |