Bỏ qua để đến Nội dung
Soul of NOTE
  • Khóa học
  • Check-in
    • NOTE
    • Headspace Vietnam
    • Fosllea
  • Diễn đàn
  • Company
    • Blog
    • Success Stories
  • 0
  • 0
  • Đăng nhập
Soul of NOTE
  • 0
  • 0
    • Khóa học
    • Check-in
      • NOTE
      • Headspace Vietnam
      • Fosllea
    • Diễn đàn
    • Company
      • Blog
      • Success Stories
  • Đăng nhập

[T03] T03 — Odoo 19 Leave Management: field names thay đổi so với docs

  • Tất cả blog
  • Knowledge Base
  • [T03] T03 — Odoo 19 Leave Management: field names thay đổi so với docs
  • 15 tháng 3, 2026 bởi
    [T03] T03 — Odoo 19 Leave Management: field names thay đổi so với docs
    Viet Nguyen
    ⚠️ HIGH  |  Category: Odoo Tips  |  ID: T03  |  Owner: CEO

    T03 — Odoo 19 Leave Management: field names thay đổi so với docs

    Vấn đề

    Tài liệu Odoo (cả official docs lẫn community) liệt kê nhiều field names không tồn tại trong Odoo 19 SaaS. Nếu dùng trong script XML-RPC sẽ gặp ValueError: Invalid field.

    Chi tiết

    hr.leave.type

    | Field theo docs/cũ | Thực tế Odoo 19 | Ghi chú | |---|---|---| | allocation_type (selection) | requires_allocation (boolean) | True = cần allocation; False = no limit | | work_entry_type_id | KHÔNG CÓ | WET gán tự động theo unpaid flag | | time_type | Vẫn có | 'leave' = absence, 'other' = worked time |

    hr.version (= hr.contract trong Odoo cũ)

    | Field theo docs | Thực tế | Ghi chú | |---|---|---| | employment_type_id | contract_type_id | many2one → ET đã tạo (id 14-20) | | is_current | Có nhưng computed, không filterable | Filter trong Python, không domain |

    hr.work.entry.type

    | Field theo docs | Thực tế | Ghi chú | |---|---|---| | time_type | KHÔNG CÓ | Dùng is_leave, is_work (boolean) |

    hr.leave.allocation

    | Method | Thực tế | Ghi chú | |---|---|---| | action_validate | action_approve | Approve allocation | | allocation_type | 'regular' hoặc 'accrual' | Selection trên allocation, không trên leave type |

    Accrual carryover

  • Carryover hết Q1 (31/03): carryover_date='other', carryover_day='1', carryover_month='4'
  • Giới hạn carry: level carryover_options='limited' + postpone_max_days=2
  • Áp dụng khi

  • Viết script tạo leave types, allocations, accrual plans qua XML-RPC
  • Debug lỗi Invalid field trên models hr_holidays
  • Migration từ Odoo 17/18 sang Odoo 19
  • Ref

  • Script: /root/odoo_daily_operation/HR/scripts/08_setup_leave_management.py
  • Guide: /root/odoo_daily_operation/HR/guides/04_time_off.md

  • 📚 Published from Company Knowledge Base — T03
    Last updated: 2026-03-11
    Review by: 2026-06-09

    trong Knowledge Base
    # Odoo Tips
    [T02] T02 — POS amount_total vs amount_paid



    Bản quyền thuộc CÔNG TY TNHH NOTE
    Cung cấp bởi Odoo - Một nền tảng thương mại điện tử mã nguồn mở hàng đầu