#601

Global Rank · of 601 Skills

dtg-base AI Agent Skill

View Source: unclecatvn/agent-skills

Safe

Installation

npx skills add unclecatvn/agent-skills --skill dtg-base

87

Installs

DTG Base Skill

Complete reference for DTG Base module utilities and helpers in Odoo 18.

What is DTG Base?

DTG Base is a custom abstract model (dtg_base.DTGBase) that provides common utility methods for Odoo development. It's designed to be inherited by other models to gain access to helpful utilities.

Quick Reference

Utility Description
Date & Period Find first/last date of period, period iteration
Timezone Convert local to UTC, UTC to local
Barcode Check barcode exists, generate EAN13
Batch Processing Split large recordsets into batches
after_commit Execute code after transaction commit
Vietnamese Text Strip accents, convert to non-accent
File Utilities Zip directories, get file size
Number Utilities Round to decimal places

Main Guide

File: odoo-18-dtg-base-guide.md

When to use this skill

  • Working with DTG Odoo codebase
  • Need date/period calculations
  • Timezone conversions
  • Barcode validation
  • Batch processing large recordsets
  • Vietnamese text processing
  • File zipping utilities

DTGBase Abstract Model

Inherit from DTGBase

Location: addons_customs/erp/dtg_base/models/dtg_base.py

from odoo import models

class MyModel(models.Model):
    _name = 'my.model'
    _inherit = ['dtg_base.dtg_base']

    def my_method(self):
        # Now you have access to all DTGBase utilities
        first_date = self.find_first_date_of_period('2024-01-15', 'month')
        utc_date = self.convert_local_to_utc('2024-01-15 10:00:00')

File Structure

agent-skills/skills/dtg-base/
├── SKILL.md                       # This file - master index
├── odoo-18-dtg-base-guide.md      # Complete DTG Base utilities reference
└── README.md                      # Skill overview

Utilities Overview

Date & Period Utilities

  • find_first_date_of_period(date, period_type) - Get first date of period
  • find_last_date_of_period(date, period_type) - Get last date of period
  • period_iter(start_date, end_date, period_type) - Iterate over periods

Timezone Conversion

  • convert_local_to_utc(local_dt, tz=None) - Convert local datetime to UTC
  • convert_utc_to_local(utc_dt, tz=None) - Convert UTC datetime to local

Barcode Utilities

  • barcode_exists(barcode, exclude_id=0) - Check if barcode already exists
  • get_ean13 barcode) - Generate/check EAN13 barcode

Batch Processing

  • splittor(limit=None) - Split recordset into batches for processing

String & Text Utilities

  • strip_accents(text) - Remove Vietnamese accents
  • _no_accent_vietnamese(text) - Convert Vietnamese text

File Utilities

  • zip_dir(source_dir, output_file) - Zip a directory
  • zip_dirs(dirs, output_file) - Zip multiple directories
  • _get_file_size(file_path) - Get human-readable file size

Number Utilities

  • round_decimal(value, decimal_places) - Round to specific decimal places

For detailed documentation, see odoo-18-dtg-base-guide.md

Installs

Installs 87
Global Rank #601 of 601

Security Audit

ath Safe
socket Safe
Alerts: 0 Score: 90
snyk Low
EU EU-Hosted Inference API

Power your AI Agents with the best open-source models.

Drop-in OpenAI-compatible API. No data leaves Europe.

Explore Inference API

GLM

GLM 5

$1.00 / $3.20

per M tokens

Kimi

Kimi K2.5

$0.60 / $2.80

per M tokens

MiniMax

MiniMax M2.5

$0.30 / $1.20

per M tokens

Qwen

Qwen3.5 122B

$0.40 / $3.00

per M tokens

How to use this skill

1

Install dtg-base by running npx skills add unclecatvn/agent-skills --skill dtg-base in your project directory. Run the install command above in your project directory. The skill file will be downloaded from GitHub and placed in your project.

2

No configuration needed. Your AI agent (Claude Code, Cursor, Windsurf, etc.) automatically detects installed skills and uses them as context when generating code.

3

The skill enhances your agent's understanding of dtg-base, helping it follow established patterns, avoid common mistakes, and produce production-ready output.

What you get

Skills are plain-text instruction files — not executable code. They encode expert knowledge about frameworks, languages, or tools that your AI agent reads to improve its output. This means zero runtime overhead, no dependency conflicts, and full transparency: you can read and review every instruction before installing.

Compatibility

This skill works with any AI coding agent that supports the skills.sh format, including Claude Code (Anthropic), Cursor, Windsurf, Cline, Aider, and other tools that read project-level context files. Skills are framework-agnostic at the transport level — the content inside determines which language or framework it applies to.

Data sourced from the skills.sh registry and GitHub. Install counts and security audits are updated regularly.

EU Made in Europe

Chat with 100+ AI Models in one App.

Use Claude, ChatGPT, Gemini alongside with EU-Hosted Models like Deepseek, GLM-5, Kimi K2.5 and many more.

Customer Support