---
name: kd-enterprise-python-plugin
description: Enterprise / Kingdee Cloud BOS Python plugin development with IronPython. Use only when the user explicitly asks for Python plugin, IronPython, or a BOS/Enterprise Python script.
---

# Enterprise Python Plugin

Use this skill only when the user explicitly requests an Enterprise Python plugin, IronPython, or a BOS/Enterprise Python script. Default Enterprise plugin work is C# and must not use this skill unless Python is explicit.

## Workflow

- Start from `kd_plan_status`.
- Keep the harness workflow: discuss -> spec -> plan -> execute -> verify.
- Do not write `.py` code before execute.
- In plan, inspect the current project and record the actual script/source path. Do not invent a demo path.

## Required Facts

Before coding, establish:

- Plugin type: form/bill, list, operation service, report service, report form, or convert plugin.
- Target FormId, bill/entity, field keys, entity keys, and operation code.
- Lifecycle event such as `AfterBindData`, `DataChanged`, `BeforeF7Select`, `BeforeDoOperation`, `BeginOperationTransaction`, or `EndOperationTransaction`.
- BOS registration location and test data center verification steps.

## Coding Rules

- Use IronPython syntax and .NET assembly references.
- Use `Kingdee.BOS.*` imports and helpers; do not use Cosmic Java `kd.bos.*` APIs.
- Form/list plugins may use `this.View`; operation service/report/convert plugins must not assume `this.View`.
- Use `this.View.ShowMessage` or warning/error variants for form/list UI messages.
- Use `raise Exception(...)` for service/report/convert blocking messages.
- Do not write sample/demo code. Adapt to actual FormId, field keys, entity keys, and existing project structure.
- Avoid independent saves inside transaction hooks unless explicitly planned.

## Verification

Record in `EXECUTION.md` and `VERIFY.md`:

- Changed `.py` file paths.
- BOS registration target.
- Confirmed FormId/field/entity/operation facts.
- Functional test steps and results.
