Skip to main content

Posts

Showing posts with the label odoo

EDIT DELIVERY REPORT (PDF)

  Technical - Views Tìm report_deliver_document Chèn thêm vào cuối xml:                <div class="text-left"> -P. Kinh doanh-   </div>             <div class="offset-8"> <center>-KH Xác nhận-</center>    </div>                 <br/>                 <br/>                 "ĐÃ KÝ (e-signed)"                 <br/>                 <br/>                  <div>Tên nhân viên</div>                 <div class="offset-8"> <center>Họ và tên:..................................</center>             ...

CẤU HÌNH BẬT SSL VÀ REDIRECT HTTPS ODOO BẰNG IIS

CẤU HÌNH BẬT SSL VÀ REDIRECT HTTPS ODOO BẰNG IIS Source:  https://shyju.wordpress.com/2019/04/10/enable-iis-redirect-and-https-for-odoo-on-windows-server/ https://www.ssl.com/how-to/redirect-http-to-https-with-windows-iis-10/ 1. DOWNLOAD VÀ CÀI ĐẶT: Microsoft Application Request Routing 3.0 (x64) URL Rewrite 2. CẤU HÌNH PROXY Enable Proxy Open IIS Management console >> application request routing Open proxy settings Enable Proxy 3. CẤU HÌNH REVERSE PROXY RULE Lưu ý: khi tạo xong rule nhờ " move up " redirect rule lên trên reverse proxy rule nhé Setup a Reverse Proxy rule using the Wizard. Open the IIS Manager Console and click on the Default Web Site from the tree view on the left. Select the URL Rewrite Icon from the middle pane, and then double click it to load the URL Rewrite interface. Chose the ‘Add Rule’ action from the right pane of the management console, and the select the ‘Reverse Proxy Rule’ from the ‘Inbound and Outbound Rules’ category. Now we can proceed t...

SHOW CUSTOM FIELD ON PDF REPORT ODOO

 Mục tiêu là hiển thị cột "Bảo hành" trên file PDF sale order      1. Sửa report template : vào Technical - Report , tìm cái Sale.Order , chọn QWeb views , chọn report_saleorder_document " Lưu ý, do mình chỉ hiệu chỉnh 1 chút nên làm edit trên cài template gốc này luôn. Nếu chỉnh sửa nhiều hơn thì mình nên "inherit" template gốc ra, rồi xài x-path như video hướng dẫn bên dưới để an toàn."      2. Khai báo thông tin cột : cụm table class là nơi khai báo tên và định dạng cột (canh lề trái phải, in đậm, nghiêng...)      <th name="th_warranty" class="text-right">Warranty</th>      3. Lôi field "x_sale_warranty" ra hiển thị : chỗ này mình khai báo thêm cả model truy vấn (sale.order.line) để lôi cái field "x_sale_warranty" ra hiển thị nên cấu hình như sau: "line.x_sale_warranty" <td name="td_warranty" class="text-right">         <span t-field="line.x_sale_warranty...

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:

How to add custom field on any object in OpenERP - Odoo

  How to add custom field on any object in OpenERP - Odoo Source: https://maheshwarimayur.blogspot.com/2013/02/how-to-add-new-field-on-any-object-in.html How to add  custom  field on any object in OpenERP (Odoo) without doing any hardcode!! Say for example we need a field “Weight” on Vehicle. Step 1: Activate Developers Mode. a) To do that click on user name at the right upper corner of your screen and select About OpenERP (Odoo) option. Activate Developer Mode   b) You will get window as shown in image below. Click on the link Activate the developer mode. Activate Developer Mode c) We will get a debug view From where we can edit all views of selected object. Debug View Step 2: Identify your object To do that just hover your mouse on any of the field. It will show you some information like field name, object, field type etc. Field information As we know now that our object name is 'fleet.vehicle' and we have to add a new field to this object say for example 'wei...