Skip to main content

Posts

Showing posts with the label custom field

ADD CUSTOM FIELD IN SALE ORDER LINE ODOO

Mục tiêu là thêm custom field "Bảo hành" trong sale order 1. Vào Technical , chọn Models , tìm " sale.order.line " (sale.order.line là khu vực add các dòng product khi lập sale order), chọn Edit rồi add thêm 1 line (field) mới 2. Mặc định custom field sẽ có chữ "x" đầu, mình đặt tên filed là "x_sale_warranty" để dễ phân biệt,     - Field name: x_sale_warranty     - Field type: selection     - Field label: Warranty     - Required: chọn     - Select Option: thêm các lựa chọn cho phù hợp (1 tháng, 2 tháng...) 3. Sửa View: mở 1 cái Sale Order, chọn " Edit View: Form" từ biểu tượng debug,      - T ìm đến mục "<tree string="Sales Order Lines" editable="bottom">     - Thêm  <field name="x_sale_warranty" /> vào sau "product_template_id" Video tham khảo thêm: