unclecatvn/agent-skills

dtg-base

Complete reference for DTG Base module utilities and helpers. DTGBase is an abstract model providing common utility methods for date/time handling, barcode generation, timezone conversion, file operations, and more.

First seen Feb 6, 2026

Installation

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

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from unclecatvn/agent-skills · top by installs.

npx skills add unclecatvn/agent-skills

Browse all from unclecatvn/agent-skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 130
License LICENSE
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

Version1.0.0
LicenseMIT

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,620 B
  • docs SUMMARY.md 231 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 307 installs

SKILL.md

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](#date--period-utilities) Find first/last date of period, period iteration
[Timezone](#timezone-conversion) Convert local to UTC, UTC to local
[Barcode](#barcode-utilities) Check barcode exists, generate EAN13
[Batch Processing](#batch-processing) Split large recordsets into batches
[aftercommit](#aftercommit-decorator) Execute code after transaction commit
[Vietnamese Text](#string--text-utilities) Strip accents, convert to non-accent
[File Utilities](#file-utilities) Zip directories, get file size
[Number Utilities](#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: addonscustoms/erp/dtgbase/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

  • findfirstdateofperiod(date, period_type) - Get first date of period
  • findlastdateofperiod(date, period_type) - Get last date of period
  • perioditer(startdate, enddate, periodtype) - Iterate over periods

Timezone Conversion

  • convertlocaltoutc(localdt, tz=None) - Convert local datetime to UTC
  • convertutctolocal(utcdt, tz=None) - Convert UTC datetime to local

Barcode Utilities

  • barcodeexists(barcode, excludeid=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
  • noaccent_vietnamese(text) - Convert Vietnamese text

File Utilities

  • zipdir(sourcedir, output_file) - Zip a directory
  • zipdirs(dirs, outputfile) - Zip multiple directories
  • getfilesize(filepath) - Get human-readable file size

Number Utilities

  • rounddecimal(value, decimalplaces) - Round to specific decimal places

For detailed documentation, see [odoo-18-dtg-base-guide.md](./odoo-18-dtg-base-guide.md)