AI Fields - Intelligent Data Automation

Create AI-powered fields that automatically populate based on record context. Save time, ensure consistency, and leverage OpenAI for your workflow.

Automation
OpenAI
Time-saving
Data Consistency

Overview

The AI Fields module allows you to create data fields that are automatically populated by artificial intelligence, helping to automatically generate content based on existing data, save manual data entry time, and ensure consistency throughout the system. If you need workflow-level automation rather than per-field generation, see AI Server Actions.

Key points

  • Automation: AI automatically fills field values based on detailed instructions

  • Flexibility: Supports multiple field types (text, numbers, dates, relations)

  • Intelligence: AI can search for information on the web when needed

  • Easy to use: Just click a button to have AI generate new values instantly


Key Terminology

Key points

  • AI Field: A data field automatically populated by AI based on instructions and context

  • AI Prompt: Detailed instructions guiding AI on how to generate field values

  • AI Refresh: Button allowing users to request AI to regenerate new values

  • Field Reference: Syntax {{field_name}} to reference data from other fields

  • Cron Job: Automated task that runs periodically to fill AI values for new records


Key Features

Key points

  • Automatically generate professional product descriptions from basic information

  • Create personalized customer follow-up emails automatically

  • Intelligent customer classification based on purchase history

  • Suggest reasonable delivery dates based on location and products

  • Standardize language and writing style across the system

  • Search for real-time information on the web when needed

  • Batch processing with automatic cron jobs

  • Manual refresh anytime with a single click


How to Create AI Fields

Steps

  • 1. Go to Settings → Technical → Database Structure → Models

  • 2. Select the model to add AI field (e.g., Sale Order, Product Template)

  • 3. Click the Fields tab and select Add a line

  • 4. Fill in information: Field Name (technical name), Field Label (display label), Field Type

  • 5. Click the AI tab and check ✓ AI field

  • 6. Enter detailed AI Prompt with {{field_name}} syntax to reference data

  • 7. Save the field and test by opening a record form

  • 8. Click the ✨ icon (AI refresh) to have AI generate values instantly


How to Use AI Fields

Automatic Fill (Cron): When creating new records, AI fields are automatically filled in the background via cron job. Cron runs daily, processing 10 records at a time. Processing time can range from a few minutes to several hours depending on the number of records.

Manual Refresh: Open record form → Click Edit → Find AI field → Click ✨ icon (AI refresh) → Wait a few seconds → New value is automatically filled. Note: Button only appears in edit mode.


Writing Effective AI Prompts

Example of Good Prompt: Create a professional product description based on: Product name {{name}}, Category {{categ_id.name}}, Price {{list_price}}. Description should be 2-3 sentences long, emphasize key benefits, match the product category, not use markdown or special formatting.

Key points

  • Provide specific context: Clearly describe the purpose and requirements of the field

  • Use field references: Use {{field_name}} syntax to get data from other fields

  • Reference relations: Use {{relation.field}} to access related data (e.g., {{partner_id.name}})

  • Specify format: Clearly state desired length, style, and structure

  • Provide examples: Supply sample expected results if possible

  • Avoid ambiguity: The more specific the instructions, the more accurate the results


Real-World Use Cases

Key points

  • Automatic Product Description Generation: Automatically generate compelling descriptions for thousands of products based on name, category, and price. AI creates consistent, professional, and SEO-optimized content (Model: product.template, Field Type: Text)

  • Delivery Date Suggestions: AI analyzes customer location, product type, and order date to suggest reasonable delivery dates, considering shipping time and geographic distance (Model: sale.order, Field Type: Date)

  • Smart Customer Classification: Automatically classify customers as VIP, Regular, or New based on total orders, revenue, and account creation time (Model: res.partner, Field Type: Selection)

  • Follow-up Email Generation: Generate personalized customer follow-up emails after sending quotations, including order information and invitation for further discussion (Model: sale.order, Field Type: Html)


Tips for Effective Use

Key points

  • Test before deployment: Try with 5-10 sample records in test environment before wide application

  • Monitor performance: Check cron execution history at Settings → Technical → Automation → Scheduled Actions

  • Optimize API costs: Only create AI fields for important data, write concise prompts, use domain to limit records

  • Handle errors: If AI cannot generate values, check if instructions are clear and ensure referenced fields have data

  • Use domain: Limit AI processing to the 50 most recent records when creating new fields to save resources


Common Troubleshooting

Key points

  • AI button not showing: Ensure the field is marked ✓ AI field in the AI tab of field configuration. Save and refresh the page.

  • AI returns error "I couldn't quite make sense of that": Check if AI prompt is clear, ensure referenced fields have data, try simplifying the instructions.

  • Field not automatically filled: Check cron at Settings → Technical → Scheduled Actions, find "AI Fields: Fill AI Fields" and run manually. Ensure OpenAI API key is valid.

  • Invalid API key: Go to Settings → General Settings → AI Configuration and enter a valid OpenAI API key.

  • AI values are inaccurate: Review AI prompt, add more specific context, check referenced field data, adjust instructions based on results.

  • Slow processing: Check number of records to process, use domain to limit, simplify AI prompt, run cron during off-peak hours.


System Requirements

Key points

  • AI module must be installed and activated

  • OpenAI API key must be configured in General Settings

  • Access to Settings → Technical → Database Structure → Models (for administrators)

  • Internal users can use the AI refresh button


Supported Field Types

Key points

  • Char: Names, titles, codes

  • Text: Descriptions, notes, summaries

  • Html: Emails, web content, templates

  • Integer: Quantities, orders, scores

  • Float: Values, ratios, percentages

  • Monetary: Prices, costs, revenue

  • Date: Delivery dates, deadlines, appointments

  • Datetime: Specific times, scheduled events

  • Boolean: Status flags, conditions

  • Selection: Classifications, statuses, levels

  • Many2one: Reference to another record

  • Many2many: Reference to multiple records