Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
2253 Lượt xem

have an invoice and a list of orders associated with that invoice. I want checkbox at the beginning of each row for the products, and I need to interact with a large number of product rows. Is there any way to do this?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Yes, there are a couple of ways to add a checkbox to each product row in Odoo:


  1. Override the create invoice line function: This method involves modifying the function that creates invoice lines to only create an invoice for the checked lines.


  1. Create a new model: Another approach is to create a new model with the same fields as 'sale_order_line' and add your additional fields (including the checkbox) there. You can then add functionality so that if the checkbox is enabled, that line will automatically be added to 'sale_order_line'. If the checkbox is disabled, the line will be removed from 'sale_order_line'. This will require overriding the 'create', 'write', and 'unlink' functions of that model.
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
3
thg 4 25
4615
5
thg 11 23
42944
3
thg 9 23
9436
1
thg 9 22
3701
2
thg 7 22
3000