ERP: unique index item_code, dokumentasi README, migration script update

This commit is contained in:
2026-09-07 15:47:23 +07:00
parent 83af01630c
commit fff2274ce1
2 changed files with 23 additions and 2 deletions

View File

@@ -73,7 +73,22 @@ Addon kustom dalam folder `./addons/kosbar_erp_ext/` menyediakan:
---
## 4. Struktur Database Utama (PostgreSQL)
## 4. Product Category Code & Item Code
### Field Baru (Auto-generated):
* **Category Code** (`product.category.code`)
- 2 digit berdasarkan ID kategori
- Contoh: ID=1 → `01`, ID=7 → `07`, ID=10 → `10`
* **Item Code** (`product.template.item_code`)
- Kombinasi: `parent_kode` (2 digit) + `kategori_kode` (2 digit) + `id_produk` (4 digit) + `nama_slug` (lowercase, tanpa spasi)
- Contoh: Kategori `05` (anak dari `01`), Produk ID=1, nama="Laptop ASUS"
- → `item_code = 01050001laptopasus`
- *Item Code otomatis diisi saat produk dibuat/diupdate.*
---
## 5. Struktur Database Utama (PostgreSQL)
Tabel inti Odoo 19 yang digunakan dalam alur di atas:
@@ -99,7 +114,7 @@ Tabel inti Odoo 19 yang digunakan dalam alur di atas:
---
## 5. Perintah Manajemen Docker
## 6. Perintah Manajemen Docker
* **Menjalankan stack:**
```bash