docs: add README documentation for sign_image_field module

This commit is contained in:
Suherdy Yacob 2026-04-07 09:38:21 +07:00
parent 016a441d32
commit 38389b0fec

29
README.md Normal file
View File

@ -0,0 +1,29 @@
# Sign Image Field
Add an Image field type to Odoo Sign templates to allow users to securely attach/upload images into documents.
## Features
- **New Field Type**: Adds an "Image" field to the Sign template editor toolbar.
- **Image Upload Integration**: Allows signers to click the field and upload local images (JPEG, PNG, GIF) directly onto the document.
- **Dynamic Positioning**: Place the image field anywhere on your document just like any other sign field.
- **Data Extensibility**: Integrates securely with Odoo's core `sign.request.item.value` models to retrieve images directly inside signed PDFs.
## Usage
1. **Edit a Template**: Go to Sign -> Templates and open a template for editing.
2. **Drag & Drop**: Drag the "Image" field from the left toolbar onto your document.
3. **Configure**: Click on the image field to label it appropriately.
4. **Save**: Save the template and send the sign request.
5. **Sign**: The recipient can click on the image box to browse their system for an image to upload.
## Technical Details
- **Module Name**: `sign_image_field`
- **Dependency**: `sign` (Enterprise)
- **Odoo Version**: 19.0
- **Authors**: Suherdy Yacob
### Technical Notes & Bug Fixes
- **Trailing Whitespace Patch (`PDFIframe` crash)**: Custom template components injected into the Sign module canvas can sometimes incur trailing QWeb whitespace `Text` nodes. This causes Odoos native JS to crash on `target.lastChild` reference when opening documents. This module implements a frontend Javascript patch (`sign_image_upload.js`) wrapping Odoo's native `insertAdjacentHTML` method to instantly trim whitespace nodes upon injection. This ensures robust application stability without diverging core Odoo source code.