Viindoo AI - Workflow & Heartbeat Routines (P-OPS-3, base)
The Community-functional base of the P-OPS-3 operating-layer adapter. It ships
the recurring heartbeat routines that let the AI operate a controlled cadence
("AI điều hành doanh nghiệp, không chỉ chat") instead of only reacting to chat.
Key model
- AI Work Routine (viin.ai.work.routine) - the heartbeat carrier. One
record per built-in routine. Each routine scans a target model with a
safe_eval domain on a cadence, runs an analytical agent, and (where a
side-effect is warranted) creates a governed viin.ai.action.proposal.
Shipped routines (config data, noupdate="1")
- ar_overdue_review_daily - overdue unpaid customer invoices (daily).
- stock_anomaly_daily - negative on-hand quantity at internal locations (daily).
- cashflow_summary_weekly - net in/out window digest (weekly, digest-only).
- dunning_weekly - overdue AR, side-effecting: drafts a governed proposal
routed through approval (weekly, generic - VN-specific wording is a future
localization concern).
Scheduled Agent UI (Phase 7.2)
- Prompt template (messages_template) - an admin-authored prompt
rendered via the sandboxed mail.render.mixin inline_template engine
(never raw Jinja/eval); empty is byte-identical to the hard-coded default.
- Cron-builder UX - a read-only next_run_preview and a generic
"Run Now" button (action_run_now) over the single shared heartbeat
cron - no per-routine ir.cron is ever created.
- Cost-cap gate - a scheduled run never bypasses the run principal's
daily cost cap; over-cap is a graceful skip, not a failure.
- Failure alerting - consecutive_failure_count / last_error and a
throttled bus.bus alert to base.group_system once
viin_ai_workflow.routine_failure_alert_threshold consecutive failures
are reached.
- Generic proposal mode (proposal_mode) - a data-driven, per-routine
switch between digest-only and side-effecting (drafts a governed proposal),
with zero per-routine Python override required.
Routine runner discipline
The routine ir.cron relies on the ir.cron row lock for non-concurrency
(NO manual cr.commit); each routine runs inside its own cr.savepoint()
so one routine's failure never poisons the others. Each routine runs
with_company(routine.company_id) so company-scoped provider / BYOK key
resolution is correct in a multi-company database.
Supported Editions
- Community Edition
- Enterprise Edition
Phần mềm này và các tệp liên kết ("Phần mềm")
được sử dụng (chạy, tuỳ biến, chạy sau khi được tuỳ biến)
chỉ khi bạn mua được giấy phép có hiệu lực từ tác giả,
điển hình như qua các Ứng dụng Odoo, hoặc trong trường hợp
bạn nhận được thoả thuận bằng văn bản từ tác giả của Phần mềm (chi tiết tại tệp COPYRIGHT).
Bạn có thể phát triển các phân hệ Odoo có sử dụng Phần mềm như một Thư viện (thường là phụ thuộc vào, nhập vào và sử dụng nguồn của nó)
nhưng không sao chéo bất kỳ mã nguồn hay tài liệu nào thuộc Phần mềm. Bạn có thể phân phối những phân hệ này theo giấy phép
mà bạn lựa chọn, miễn sao nội dung giấy phép đó tương tích với điều khoản của Giấy phép Phần mềm Độc quyền Odoo
(ví dụ: LGPL, MIT hay bất kỳ loại giấy phép phần mềm độc quyền nào tương tự vậy).
Nghiêm cấm phát hành, phân phối, cấp phép lại hoặc bán bản sao của Phần mềm hoặc
bản sao
Phần mềm đã được sửa đổi.
Thông báo bản quyền và chấp thuận nêu trên buộc phải được bao gồm trong tất cả các bản sao hoặc các phần quan trọng của Phần mềm.
PHẦN MỀM ĐƯỢC CUNG CẤP "NGUYÊN TRẠNG", KHÔNG BẢO ĐẢM DƯỚI BẤT KỲ HÌNH THỨC NÀO, ĐƯỢC THỂ HIỆN RÕ RÀNG HOẶC NGỤ Ý, KHÔNG GIỚI HẠN
ĐẢM BẢO VỀ CÁC BẢO ĐẢM NGỤ Ý VỀ KHẢ NĂNG THƯƠNG MẠI, PHÙ HỢP VỚI MỤC ĐÍCH CỤ THỂ VÀ KHÔNG VI PHẠM.
TRONG MỌI TRƯỜNG HỢP SẼ KHÔNG CÓ TÁC GIẢ HOẶC CHỦ SỞ HỮU BẢN QUYỀN NÀO CHỊU TRÁCH NHIỆM VỀ BẤT KỲ KHIẾU NẠI,
THIỆT HẠI HOẶC TRÁCH NHIỆM PHÁP LÝ KHÁC NÀO TRONG PHẠM VI HỢP ĐỒNG, CÁC THIỆT HẠI HOẶC CÁCH KHÁC, PHÁT SINH TỪ, NGOÀI HOẶC
CÓ LIÊN KẾT VỚI PHẦN MỀM HOẶC VIỆC SỬ DỤNG HOẶC KINH DOANH KHÁC TẠI PHẦN MỀM.