Skip to content

Example Plugin Module: nuidoai_sales

The nuidoai_sales module serves as a reference implementation for extending Nuido AI with custom functionality. It demonstrates how developers can create plugin modules that integrate external business logic and data sources—specifically, how to expose Odoo Sales data to the AI layer.

This module is designed to enable AI-driven insights and responses based on real-time or historical sales performance, making it a valuable example for those looking to build domain-specific integrations.

Features

The module exposes several utility functions that allow Nuido AI to query and interpret sales data from the Odoo ERP system:

  • get_sales(start_date, end_date) Returns all sales data within the specified date range. This is useful for generating reports, comparing time periods, or answering user questions about performance over custom intervals.
  • get_current_week_sales() Retrieves the total or itemized sales figures for the current calendar week. This can help the AI summarize weekly performance or answer queries like “How are sales this week?”
  • get_current_month_sales() Provides a summary of sales for the current month, allowing Nuido AI to contextualize ongoing trends or respond to questions like “What’s our monthly revenue so far?”

Use Case

By integrating this plugin, Nuido AI gains the ability to interact with business-critical sales data, enabling a range of conversational use cases, such as:

  • Answering sales-related questions in real-time
  • Generating sales summaries and trends
  • Assisting with performance reviews or forecasting

This plugin can serve as a starting point for building more complex integrations, such as filtering by salesperson or product, incorporating other Odoo modules (like CRM or inventory).

Availability

The source code for nuidoai_sales can be accessed at the Exploring Odoo github repository.

CAUTION

nuidoai_sales is experimental.
It is not recommended for use in production environments.