Compare commits
2
Commits
c816ea3ac9
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e8e52e0875 | ||
|
|
d7c55d444b |
No files matched your search
@@ -0,0 +1,5 @@
|
|||||||
|
// Folder-specific settings
|
||||||
|
//
|
||||||
|
// For a full list of overridable settings, and general information on folder-specific settings,
|
||||||
|
// see the documentation: https://zed.dev/docs/configuring-zed#settings-files
|
||||||
|
{}
|
||||||
@@ -66,9 +66,14 @@ No bundler — keep everything in global scope as the file already does.
|
|||||||
`query` selects the dataset. The datasets are large, so **exactly one dataset is
|
`query` selects the dataset. The datasets are large, so **exactly one dataset is
|
||||||
requested per call**, for the dashboard currently shown (no prefetching).
|
requested per call**, for the dashboard currently shown (no prefetching).
|
||||||
- Query keys: `"Summe je Abgangsland"` (Umsatz je Abgangsland), `"VAT Summary"`,
|
- Query keys: `"Summe je Abgangsland"` (Umsatz je Abgangsland), `"VAT Summary"`,
|
||||||
`"ODOO Rechnungen pro Monat"`, `"Alle Rechnungen pro Monat"` and `"Quartal Schweiz"`.
|
`"ODOO Rechnungen pro Monat"`, `"Alle Rechnungen pro Monat"`, `"Quartal Schweiz"`,
|
||||||
Each view's `query` lives in the `VIEWS` map, which maps the active dashboard to its
|
`"FIFO Lager Bewertung"` and `"Produkt Materialkosten"`. Each view's `query` lives in
|
||||||
`normalize` function; `quarter: true` marks the dashboards that use a quarter period.
|
the `VIEWS` map, which maps the active dashboard to its `normalize` function;
|
||||||
|
`quarter: true` marks the dashboards that use a quarter period. The FIFO and
|
||||||
|
Produkt-Materialkosten responses are `[{ id, query, row_count, data: [...] }]`
|
||||||
|
(unwrapped in `normalizeFifo` / `normalizeMaterialkosten`). In *Produkt Materialkosten*,
|
||||||
|
`remaining_qty` is the remaining quantity of that cost bracket (the last cost bracket, not FIFO),
|
||||||
|
not the product total.
|
||||||
- `extractArray` accepts the dataset either as a bare array or wrapped under the
|
- `extractArray` accepts the dataset either as a bare array or wrapped under the
|
||||||
query key (case-insensitive). If the shape changes upstream, adjust the normalizers.
|
query key (case-insensitive). If the shape changes upstream, adjust the normalizers.
|
||||||
- The webhook returns **German-formatted strings**, e.g. `"90.717,93 €"` and
|
- The webhook returns **German-formatted strings**, e.g. `"90.717,93 €"` and
|
||||||
|
|||||||
@@ -30,7 +30,13 @@ The left sidebar groups reports by topic:
|
|||||||
|
|
||||||
- **Amazon** → *Umsatz je Abgangsland* (Brutto inkl. USt je Abgangsland)
|
- **Amazon** → *Umsatz je Abgangsland* (Brutto inkl. USt je Abgangsland)
|
||||||
- **Amazon** → *VAT Summary* (USt-Übersicht je Land)
|
- **Amazon** → *VAT Summary* (USt-Übersicht je Land)
|
||||||
|
- **Amazon** → *Cross Boarder Inv. Movement* (In Bearbeitung)
|
||||||
|
- **Amazon** → *Auswertung Buchhaltung* (In Bearbeitung)
|
||||||
|
- **Amazon** → *ESL/ZM-Check* (In Bearbeitung)
|
||||||
|
- **Amazon** → *Inventory Summary* (In Bearbeitung)
|
||||||
- **ODOO** → *Rechnungen pro Monat* (Pivot über Odoo-Rechnungen)
|
- **ODOO** → *Rechnungen pro Monat* (Pivot über Odoo-Rechnungen)
|
||||||
|
- **ODOO** → *FIFO Lager Bewertung* (Lagerwert FIFO)
|
||||||
|
- **ODOO** → *Produkt Materialkosten* (Materialkosten je Produkt)
|
||||||
- **Gesamt** → *Alle Rechnungen pro Monat* (PivotTable.js-Experiment)
|
- **Gesamt** → *Alle Rechnungen pro Monat* (PivotTable.js-Experiment)
|
||||||
- **Gesamt** → *Quartal Schweiz* (AMAZON + ODOO, Lieferung in die Schweiz)
|
- **Gesamt** → *Quartal Schweiz* (AMAZON + ODOO, Lieferung in die Schweiz)
|
||||||
|
|
||||||
@@ -60,6 +66,8 @@ Gesamt row:
|
|||||||
- *Rechnungen pro Monat* → `odoo-rechnungen_YYYY-MMM.csv`
|
- *Rechnungen pro Monat* → `odoo-rechnungen_YYYY-MMM.csv`
|
||||||
- *Alle Rechnungen pro Monat* → `gesamt-rechnungen-pivot_YYYY-MMM.csv`
|
- *Alle Rechnungen pro Monat* → `gesamt-rechnungen-pivot_YYYY-MMM.csv`
|
||||||
- *Quartal Schweiz* → `schweiz-quartal_YYYY-QN.csv`
|
- *Quartal Schweiz* → `schweiz-quartal_YYYY-QN.csv`
|
||||||
|
- *FIFO Lager Bewertung* → `fifo-lager_YYYY-MMM.csv`
|
||||||
|
- *Produkt Materialkosten* → `materialkosten_YYYY-MMM.csv`
|
||||||
|
|
||||||
The button is disabled while no dataset is loaded for the current dashboard.
|
The button is disabled while no dataset is loaded for the current dashboard.
|
||||||
|
|
||||||
@@ -81,6 +89,7 @@ Rechnungen pro Monat* filters by **Tag**, **Bestellnummer**, **Lieferland** and
|
|||||||
For *Quartal Schweiz* the shared **Zeitraum** control shows a **quarter**
|
For *Quartal Schweiz* the shared **Zeitraum** control shows a **quarter**
|
||||||
selector (Q1–Q4) instead of the month selector; the year selector is shared.
|
selector (Q1–Q4) instead of the month selector; the year selector is shared.
|
||||||
|
|
||||||
|
|
||||||
## Pivot (Experiment)
|
## Pivot (Experiment)
|
||||||
|
|
||||||
The three invoice dashboards (*ODOO Rechnungen pro Monat*, *Alle Rechnungen pro
|
The three invoice dashboards (*ODOO Rechnungen pro Monat*, *Alle Rechnungen pro
|
||||||
@@ -118,6 +127,8 @@ selected with the `query` field:
|
|||||||
- *Rechnungen pro Monat* → `query: "ODOO Rechnungen pro Monat"`
|
- *Rechnungen pro Monat* → `query: "ODOO Rechnungen pro Monat"`
|
||||||
- *Alle Rechnungen pro Monat* → `query: "Alle Rechnungen pro Monat"`
|
- *Alle Rechnungen pro Monat* → `query: "Alle Rechnungen pro Monat"`
|
||||||
- *Quartal Schweiz* → `query: "Quartal Schweiz"` (sends `quarter` instead of `month`)
|
- *Quartal Schweiz* → `query: "Quartal Schweiz"` (sends `quarter` instead of `month`)
|
||||||
|
- *FIFO Lager Bewertung* → `query: "FIFO Lager Bewertung"` (response is `[{ id, query, row_count, data: [...] }]`)
|
||||||
|
- *Produkt Materialkosten* → `query: "Produkt Materialkosten"` (one row per product; `remaining_qty` = remaining of that cost bracket, not the product total)
|
||||||
|
|
||||||
## Files
|
## Files
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,15 @@ const els = {
|
|||||||
chFilterLieferland: document.getElementById("ch-filter-lieferland"),
|
chFilterLieferland: document.getElementById("ch-filter-lieferland"),
|
||||||
chFilterNummer: document.getElementById("ch-filter-rechnungsnummer"),
|
chFilterNummer: document.getElementById("ch-filter-rechnungsnummer"),
|
||||||
chFilterQuelle: document.getElementById("ch-filter-quelle"),
|
chFilterQuelle: document.getElementById("ch-filter-quelle"),
|
||||||
|
// ODOO · FIFO Lager Bewertung
|
||||||
|
fifoKpis: document.getElementById("fifo-kpis"),
|
||||||
|
fifoTable: document.querySelector("#fifo-table tbody"),
|
||||||
|
fifoInfo: document.getElementById("fifo-info"),
|
||||||
|
fifoState: document.getElementById("fifo-state"),
|
||||||
|
// ODOO · Produkt Materialkosten
|
||||||
|
mkTable: document.querySelector("#mk-table tbody"),
|
||||||
|
mkInfo: document.getElementById("mk-info"),
|
||||||
|
mkState: document.getElementById("mk-state"),
|
||||||
// Auth
|
// Auth
|
||||||
authOverlay: document.getElementById("auth-overlay"),
|
authOverlay: document.getElementById("auth-overlay"),
|
||||||
authForm: document.getElementById("auth-form"),
|
authForm: document.getElementById("auth-form"),
|
||||||
@@ -195,6 +204,10 @@ function formatQuantity(value) {
|
|||||||
return value.toLocaleString("de-DE");
|
return value.toLocaleString("de-DE");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function formatDate(value) {
|
||||||
|
return value ? String(value).slice(0, 10) : "";
|
||||||
|
}
|
||||||
|
|
||||||
/* ---------- Data ---------- */
|
/* ---------- Data ---------- */
|
||||||
|
|
||||||
function extractArray(payload, key) {
|
function extractArray(payload, key) {
|
||||||
@@ -313,6 +326,89 @@ function normalizeRechnungen(rows) {
|
|||||||
return { invoices, totals: computeRechnungenTotals(invoices) };
|
return { invoices, totals: computeRechnungenTotals(invoices) };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function pickLocalized(value) {
|
||||||
|
if (value == null) return "";
|
||||||
|
if (typeof value !== "object") return String(value);
|
||||||
|
return value.de_DE ?? value.de_CH ?? value.en_US ?? Object.values(value)[0] ?? "";
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalizeFifo(rows) {
|
||||||
|
// The webhook returns [{ id, query, row_count, data: [...] }].
|
||||||
|
let items = Array.isArray(rows) ? rows : [];
|
||||||
|
if (items.length && items[0] && Array.isArray(items[0].data)) {
|
||||||
|
items = items.flatMap((r) => (Array.isArray(r.data) ? r.data : []));
|
||||||
|
}
|
||||||
|
|
||||||
|
const products = items.map((row) => {
|
||||||
|
const unitCost = parseAmount(row.unit_cost);
|
||||||
|
const qty = parseAmount(row.remaining_qty);
|
||||||
|
return {
|
||||||
|
productId: row.product_id,
|
||||||
|
code: row.default_code ?? "",
|
||||||
|
name: pickLocalized(row.product_name),
|
||||||
|
categId: row.categ_id,
|
||||||
|
unitCost,
|
||||||
|
qty,
|
||||||
|
value: unitCost * qty,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
const totals = products.reduce(
|
||||||
|
(acc, p) => {
|
||||||
|
acc.value += p.value;
|
||||||
|
acc.qty += p.qty;
|
||||||
|
return acc;
|
||||||
|
},
|
||||||
|
{ value: 0, qty: 0 }
|
||||||
|
);
|
||||||
|
|
||||||
|
return { products, totals, productCount: new Set(products.map((p) => p.productId)).size };
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalizeMaterialkosten(rows) {
|
||||||
|
// Response: [{ id, query, row_count, data: [...] }], one row per product.
|
||||||
|
// remaining_qty = remaining quantity of that cost bracket, NOT the total.
|
||||||
|
let items = Array.isArray(rows) ? rows : [];
|
||||||
|
if (items.length && items[0] && Array.isArray(items[0].data)) {
|
||||||
|
items = items.flatMap((r) => (Array.isArray(r.data) ? r.data : []));
|
||||||
|
}
|
||||||
|
|
||||||
|
const products = items.map((row) => {
|
||||||
|
const unitCost = parseAmount(row.unit_cost);
|
||||||
|
const qty = parseAmount(row.remaining_qty);
|
||||||
|
return {
|
||||||
|
productId: row.product_id,
|
||||||
|
code: row.default_code ?? "",
|
||||||
|
name: pickLocalized(row.product_name),
|
||||||
|
categId: row.categ_id,
|
||||||
|
unitCost,
|
||||||
|
qty,
|
||||||
|
value: unitCost * qty,
|
||||||
|
createDate: formatDate(row.create_date),
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
// Sort by category, then product name.
|
||||||
|
products.sort((a, b) => {
|
||||||
|
const ca = Number(a.categId) || 0;
|
||||||
|
const cb = Number(b.categId) || 0;
|
||||||
|
if (ca !== cb) return ca - cb;
|
||||||
|
return String(a.name).localeCompare(String(b.name), "de");
|
||||||
|
});
|
||||||
|
|
||||||
|
const totals = products.reduce(
|
||||||
|
(acc, p) => {
|
||||||
|
acc.value += p.value;
|
||||||
|
acc.qty += p.qty;
|
||||||
|
return acc;
|
||||||
|
},
|
||||||
|
{ value: 0, qty: 0 }
|
||||||
|
);
|
||||||
|
|
||||||
|
return { products, totals, productCount: new Set(products.map((p) => p.productId)).size };
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ---------- ODOO Rechnungen pro Monat: filters ---------- */
|
/* ---------- ODOO Rechnungen pro Monat: filters ---------- */
|
||||||
|
|
||||||
let rechnungenFilter = { tag: "", bestellnummer: "", lieferland: "", nummer: "", quelle: "" };
|
let rechnungenFilter = { tag: "", bestellnummer: "", lieferland: "", nummer: "", quelle: "" };
|
||||||
@@ -646,6 +742,90 @@ function renderRechnungenKpis(data) {
|
|||||||
</div>`;
|
</div>`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function renderFifo(data) {
|
||||||
|
const v = viewEls();
|
||||||
|
if (!v) return;
|
||||||
|
const { products, totals, productCount } = data;
|
||||||
|
|
||||||
|
v.kpis.innerHTML = `
|
||||||
|
<div class="kpi primary">
|
||||||
|
<div class="kpi-label">Lagerwert (FIFO)</div>
|
||||||
|
<div class="kpi-value">${formatEuro(totals.value)}</div>
|
||||||
|
<div class="kpi-sub">Summe Stückkosten × Restmenge</div>
|
||||||
|
</div>
|
||||||
|
<div class="kpi">
|
||||||
|
<div class="kpi-label">Produkte</div>
|
||||||
|
<div class="kpi-value">${productCount}</div>
|
||||||
|
<div class="kpi-sub">verschiedene Artikel</div>
|
||||||
|
</div>
|
||||||
|
<div class="kpi">
|
||||||
|
<div class="kpi-label">Menge</div>
|
||||||
|
<div class="kpi-value">${formatQuantity(totals.qty)}</div>
|
||||||
|
<div class="kpi-sub">Restmenge gesamt</div>
|
||||||
|
</div>
|
||||||
|
<div class="kpi">
|
||||||
|
<div class="kpi-label">Positionen</div>
|
||||||
|
<div class="kpi-value">${products.length}</div>
|
||||||
|
<div class="kpi-sub">FIFO-Schichten</div>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
if (els.fifoInfo) els.fifoInfo.textContent = `${products.length} Positionen`;
|
||||||
|
|
||||||
|
v.table.innerHTML = "";
|
||||||
|
products.forEach((p) => {
|
||||||
|
const tr = document.createElement("tr");
|
||||||
|
tr.innerHTML = `
|
||||||
|
<td>${p.name}</td>
|
||||||
|
<td>${p.code}</td>
|
||||||
|
<td class="num">${p.categId ?? ""}</td>
|
||||||
|
<td class="num">${formatEuro(p.unitCost)}</td>
|
||||||
|
<td class="num">${formatQuantity(p.qty)}</td>
|
||||||
|
<td class="num">${formatEuro(p.value)}</td>`;
|
||||||
|
v.table.appendChild(tr);
|
||||||
|
});
|
||||||
|
|
||||||
|
const tr = document.createElement("tr");
|
||||||
|
tr.className = "total";
|
||||||
|
tr.innerHTML = `
|
||||||
|
<td>Gesamt</td>
|
||||||
|
<td></td>
|
||||||
|
<td class="num"></td>
|
||||||
|
<td class="num"></td>
|
||||||
|
<td class="num">${formatQuantity(totals.qty)}</td>
|
||||||
|
<td class="num">${formatEuro(totals.value)}</td>`;
|
||||||
|
v.table.appendChild(tr);
|
||||||
|
}
|
||||||
|
|
||||||
|
function renderMaterialkosten(data) {
|
||||||
|
const v = viewEls();
|
||||||
|
if (!v) return;
|
||||||
|
const { products, totals } = data;
|
||||||
|
|
||||||
|
if (els.mkInfo) els.mkInfo.textContent = `${products.length} Positionen`;
|
||||||
|
|
||||||
|
v.table.innerHTML = "";
|
||||||
|
products.forEach((p) => {
|
||||||
|
const tr = document.createElement("tr");
|
||||||
|
tr.innerHTML = `
|
||||||
|
<td>${p.name}</td>
|
||||||
|
<td class="num">${p.categId ?? ""}</td>
|
||||||
|
<td>${p.createDate}</td>
|
||||||
|
<td class="num">${formatEuro(p.unitCost)}</td>
|
||||||
|
<td class="num">${formatQuantity(p.qty)}</td>`;
|
||||||
|
v.table.appendChild(tr);
|
||||||
|
});
|
||||||
|
|
||||||
|
const tr = document.createElement("tr");
|
||||||
|
tr.className = "total";
|
||||||
|
tr.innerHTML = `
|
||||||
|
<td>Gesamt</td>
|
||||||
|
<td class="num"></td>
|
||||||
|
<td></td>
|
||||||
|
<td class="num"></td>
|
||||||
|
<td class="num">${formatQuantity(totals.qty)}</td>`;
|
||||||
|
v.table.appendChild(tr);
|
||||||
|
}
|
||||||
|
|
||||||
function renderRechnungenChart(data) {
|
function renderRechnungenChart(data) {
|
||||||
const v = viewEls();
|
const v = viewEls();
|
||||||
if (!v || !v.chart) return;
|
if (!v || !v.chart) return;
|
||||||
@@ -792,6 +972,12 @@ function viewEls() {
|
|||||||
if (currentView === "odoo-rechnungen") {
|
if (currentView === "odoo-rechnungen") {
|
||||||
return { kpis: els.odooKpis, chart: els.odooChart, legend: els.odooLegend, state: els.odooState, pivot: document.getElementById("odoo-pivot") };
|
return { kpis: els.odooKpis, chart: els.odooChart, legend: els.odooLegend, state: els.odooState, pivot: document.getElementById("odoo-pivot") };
|
||||||
}
|
}
|
||||||
|
if (currentView === "fifo-lager") {
|
||||||
|
return { kpis: els.fifoKpis, table: els.fifoTable, state: els.fifoState };
|
||||||
|
}
|
||||||
|
if (currentView === "materialkosten") {
|
||||||
|
return { table: els.mkTable, state: els.mkState };
|
||||||
|
}
|
||||||
if (currentView === "gesamt-rechnungen-pivot") {
|
if (currentView === "gesamt-rechnungen-pivot") {
|
||||||
return { kpis: els.pivotKpis, state: els.pivotState, pivot: document.getElementById("pivot") };
|
return { kpis: els.pivotKpis, state: els.pivotState, pivot: document.getElementById("pivot") };
|
||||||
}
|
}
|
||||||
@@ -809,6 +995,10 @@ function renderActiveView() {
|
|||||||
renderVat(lastData.data);
|
renderVat(lastData.data);
|
||||||
} else if (currentView === "odoo-rechnungen" || currentView === "gesamt-rechnungen-pivot" || currentView === "schweiz-quartal") {
|
} else if (currentView === "odoo-rechnungen" || currentView === "gesamt-rechnungen-pivot" || currentView === "schweiz-quartal") {
|
||||||
renderRechnungenPivot(applyRechnungenFilters(lastData.data));
|
renderRechnungenPivot(applyRechnungenFilters(lastData.data));
|
||||||
|
} else if (currentView === "fifo-lager") {
|
||||||
|
renderFifo(lastData.data);
|
||||||
|
} else if (currentView === "materialkosten") {
|
||||||
|
renderMaterialkosten(lastData.data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -828,7 +1018,7 @@ function showSkeleton() {
|
|||||||
const v = viewEls();
|
const v = viewEls();
|
||||||
if (!v) return;
|
if (!v) return;
|
||||||
v.state.classList.add("hidden");
|
v.state.classList.add("hidden");
|
||||||
v.kpis.innerHTML = skeletonKpis();
|
if (v.kpis) v.kpis.innerHTML = skeletonKpis();
|
||||||
if (v.chart) v.chart.innerHTML = skeletonBars();
|
if (v.chart) v.chart.innerHTML = skeletonBars();
|
||||||
if (v.legend) v.legend.innerHTML = "";
|
if (v.legend) v.legend.innerHTML = "";
|
||||||
if (v.table) v.table.innerHTML = "";
|
if (v.table) v.table.innerHTML = "";
|
||||||
@@ -845,7 +1035,7 @@ function showError(message) {
|
|||||||
function clearViews() {
|
function clearViews() {
|
||||||
const v = viewEls();
|
const v = viewEls();
|
||||||
if (!v) return;
|
if (!v) return;
|
||||||
v.kpis.innerHTML = "";
|
if (v.kpis) v.kpis.innerHTML = "";
|
||||||
if (v.chart) v.chart.innerHTML = "";
|
if (v.chart) v.chart.innerHTML = "";
|
||||||
if (v.legend) v.legend.innerHTML = "";
|
if (v.legend) v.legend.innerHTML = "";
|
||||||
if (v.table) v.table.innerHTML = "";
|
if (v.table) v.table.innerHTML = "";
|
||||||
@@ -1009,6 +1199,34 @@ function buildRechnungenCsv(data) {
|
|||||||
return lines.join("\r\n");
|
return lines.join("\r\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function buildFifoCsv(data) {
|
||||||
|
const header = ["Produkt", "Code", "Kategorie", "Stückkosten", "Menge", "Wert"];
|
||||||
|
const lines = [header.map(csvEscape).join(";")];
|
||||||
|
data.products.forEach((p) => {
|
||||||
|
lines.push([
|
||||||
|
p.name, p.code, p.categId ?? "", formatEuro(p.unitCost), formatQuantity(p.qty), formatEuro(p.value),
|
||||||
|
].map(csvEscape).join(";"));
|
||||||
|
});
|
||||||
|
lines.push([
|
||||||
|
"Gesamt", "", "", "", formatQuantity(data.totals.qty), formatEuro(data.totals.value),
|
||||||
|
].map(csvEscape).join(";"));
|
||||||
|
return lines.join("\r\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildMaterialkostenCsv(data) {
|
||||||
|
const header = ["Produkt", "Kategorie", "Einlagerungsdatum", "Stückkosten", "Restmenge (Staffel)"];
|
||||||
|
const lines = [header.map(csvEscape).join(";")];
|
||||||
|
data.products.forEach((p) => {
|
||||||
|
lines.push([
|
||||||
|
p.name, p.categId ?? "", p.createDate, formatEuro(p.unitCost), formatQuantity(p.qty),
|
||||||
|
].map(csvEscape).join(";"));
|
||||||
|
});
|
||||||
|
lines.push([
|
||||||
|
"Gesamt", "", "", "", formatQuantity(data.totals.qty),
|
||||||
|
].map(csvEscape).join(";"));
|
||||||
|
return lines.join("\r\n");
|
||||||
|
}
|
||||||
|
|
||||||
function downloadCsv() {
|
function downloadCsv() {
|
||||||
if (!lastData || lastData.view !== currentView) return;
|
if (!lastData || lastData.view !== currentView) return;
|
||||||
|
|
||||||
@@ -1022,6 +1240,12 @@ function downloadCsv() {
|
|||||||
} else if (currentView === "amazon-vat-summary") {
|
} else if (currentView === "amazon-vat-summary") {
|
||||||
csv = buildVatCsv(lastData.data);
|
csv = buildVatCsv(lastData.data);
|
||||||
filename = `vat-summary_${period}.csv`;
|
filename = `vat-summary_${period}.csv`;
|
||||||
|
} else if (currentView === "materialkosten") {
|
||||||
|
csv = buildMaterialkostenCsv(lastData.data);
|
||||||
|
filename = `materialkosten_${period}.csv`;
|
||||||
|
} else if (currentView === "fifo-lager") {
|
||||||
|
csv = buildFifoCsv(lastData.data);
|
||||||
|
filename = `fifo-lager_${period}.csv`;
|
||||||
} else if (currentView === "odoo-rechnungen" || currentView === "gesamt-rechnungen-pivot" || currentView === "schweiz-quartal") {
|
} else if (currentView === "odoo-rechnungen" || currentView === "gesamt-rechnungen-pivot" || currentView === "schweiz-quartal") {
|
||||||
csv = buildRechnungenCsv(applyRechnungenFilters(lastData.data));
|
csv = buildRechnungenCsv(applyRechnungenFilters(lastData.data));
|
||||||
filename = `${currentView}_${period}.csv`;
|
filename = `${currentView}_${period}.csv`;
|
||||||
@@ -1048,7 +1272,9 @@ function updateDownloadState() {
|
|||||||
currentView === "amazon-vat-summary" ||
|
currentView === "amazon-vat-summary" ||
|
||||||
currentView === "odoo-rechnungen" ||
|
currentView === "odoo-rechnungen" ||
|
||||||
currentView === "gesamt-rechnungen-pivot" ||
|
currentView === "gesamt-rechnungen-pivot" ||
|
||||||
currentView === "schweiz-quartal";
|
currentView === "schweiz-quartal" ||
|
||||||
|
currentView === "fifo-lager" ||
|
||||||
|
currentView === "materialkosten";
|
||||||
els.download.disabled = !(lastData && lastData.view === currentView && supported);
|
els.download.disabled = !(lastData && lastData.view === currentView && supported);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1068,12 +1294,40 @@ const VIEWS = {
|
|||||||
query: "VAT Summary",
|
query: "VAT Summary",
|
||||||
normalize: normalizeVat,
|
normalize: normalizeVat,
|
||||||
},
|
},
|
||||||
|
"amazon-cross-border": {
|
||||||
|
title: "Cross Boarder Inv. Movement",
|
||||||
|
subtitle: "Amazon · In Bearbeitung",
|
||||||
|
},
|
||||||
|
"amazon-buchhaltung": {
|
||||||
|
title: "Auswertung Buchhaltung",
|
||||||
|
subtitle: "Amazon · In Bearbeitung",
|
||||||
|
},
|
||||||
|
"amazon-esl-zm": {
|
||||||
|
title: "ESL/ZM-Check",
|
||||||
|
subtitle: "Amazon · In Bearbeitung",
|
||||||
|
},
|
||||||
|
"amazon-inventory-summary": {
|
||||||
|
title: "Inventory Summary",
|
||||||
|
subtitle: "Amazon · In Bearbeitung",
|
||||||
|
},
|
||||||
"odoo-rechnungen": {
|
"odoo-rechnungen": {
|
||||||
title: "ODOO Rechnungen pro Monat",
|
title: "ODOO Rechnungen pro Monat",
|
||||||
subtitle: "ODOO · Rechnungen je Monat",
|
subtitle: "ODOO · Rechnungen je Monat",
|
||||||
query: "ODOO Rechnungen pro Monat",
|
query: "ODOO Rechnungen pro Monat",
|
||||||
normalize: normalizeRechnungen,
|
normalize: normalizeRechnungen,
|
||||||
},
|
},
|
||||||
|
"fifo-lager": {
|
||||||
|
title: "FIFO Lager Bewertung",
|
||||||
|
subtitle: "ODOO · Lagerwert (FIFO)",
|
||||||
|
query: "FIFO Lager Bewertung",
|
||||||
|
normalize: normalizeFifo,
|
||||||
|
},
|
||||||
|
"materialkosten": {
|
||||||
|
title: "Produkt Materialkosten",
|
||||||
|
subtitle: "ODOO · Materialkosten je Produkt (Kostenstaffel)",
|
||||||
|
query: "Produkt Materialkosten",
|
||||||
|
normalize: normalizeMaterialkosten,
|
||||||
|
},
|
||||||
"gesamt-rechnungen-pivot": {
|
"gesamt-rechnungen-pivot": {
|
||||||
title: "Alle Rechnungen pro Monat",
|
title: "Alle Rechnungen pro Monat",
|
||||||
subtitle: "Gesamt · Pivot",
|
subtitle: "Gesamt · Pivot",
|
||||||
|
|||||||
+108
@@ -48,6 +48,18 @@
|
|||||||
<a class="submenu-item" href="#" data-view="amazon-vat-summary">
|
<a class="submenu-item" href="#" data-view="amazon-vat-summary">
|
||||||
VAT Summary
|
VAT Summary
|
||||||
</a>
|
</a>
|
||||||
|
<a class="submenu-item" href="#" data-view="amazon-cross-border">
|
||||||
|
Cross Boarder Inv. Movement (In Bearbeitung)
|
||||||
|
</a>
|
||||||
|
<a class="submenu-item" href="#" data-view="amazon-buchhaltung">
|
||||||
|
Auswertung Buchhaltung (In Bearbeitung)
|
||||||
|
</a>
|
||||||
|
<a class="submenu-item" href="#" data-view="amazon-esl-zm">
|
||||||
|
ESL/ZM-Check (In Bearbeitung)
|
||||||
|
</a>
|
||||||
|
<a class="submenu-item" href="#" data-view="amazon-inventory-summary">
|
||||||
|
Inventory Summary (In Bearbeitung)
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -71,6 +83,12 @@
|
|||||||
<a class="submenu-item" href="#" data-view="odoo-rechnungen">
|
<a class="submenu-item" href="#" data-view="odoo-rechnungen">
|
||||||
ODOO Rechnungen pro Monat
|
ODOO Rechnungen pro Monat
|
||||||
</a>
|
</a>
|
||||||
|
<a class="submenu-item" href="#" data-view="fifo-lager">
|
||||||
|
FIFO Lager Bewertung
|
||||||
|
</a>
|
||||||
|
<a class="submenu-item" href="#" data-view="materialkosten">
|
||||||
|
Produkt Materialkosten
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -227,6 +245,38 @@
|
|||||||
<div class="state" id="vat-state"></div>
|
<div class="state" id="vat-state"></div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
<!-- View: Amazon · Cross Boarder Inv. Movement (In Bearbeitung) -->
|
||||||
|
<main id="view-amazon-cross-border" class="view hidden">
|
||||||
|
<section class="panel placeholder">
|
||||||
|
<h2>Cross Boarder Inv. Movement</h2>
|
||||||
|
<p class="muted">In Bearbeitung – dieses Dashboard folgt in Kürze.</p>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- View: Amazon · Auswertung Buchhaltung (In Bearbeitung) -->
|
||||||
|
<main id="view-amazon-buchhaltung" class="view hidden">
|
||||||
|
<section class="panel placeholder">
|
||||||
|
<h2>Auswertung Buchhaltung</h2>
|
||||||
|
<p class="muted">In Bearbeitung – dieses Dashboard folgt in Kürze.</p>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- View: Amazon · ESL/ZM-Check (In Bearbeitung) -->
|
||||||
|
<main id="view-amazon-esl-zm" class="view hidden">
|
||||||
|
<section class="panel placeholder">
|
||||||
|
<h2>ESL/ZM-Check</h2>
|
||||||
|
<p class="muted">In Bearbeitung – dieses Dashboard folgt in Kürze.</p>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- View: Amazon · Inventory Summary (In Bearbeitung) -->
|
||||||
|
<main id="view-amazon-inventory-summary" class="view hidden">
|
||||||
|
<section class="panel placeholder">
|
||||||
|
<h2>Inventory Summary</h2>
|
||||||
|
<p class="muted">In Bearbeitung – dieses Dashboard folgt in Kürze.</p>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
|
|
||||||
<!-- View: ODOO · Rechnungen pro Monat -->
|
<!-- View: ODOO · Rechnungen pro Monat -->
|
||||||
<main id="view-odoo-rechnungen" class="view hidden">
|
<main id="view-odoo-rechnungen" class="view hidden">
|
||||||
<section class="kpis" id="odoo-kpis"></section>
|
<section class="kpis" id="odoo-kpis"></section>
|
||||||
@@ -277,6 +327,64 @@
|
|||||||
<div class="state" id="odoo-state"></div>
|
<div class="state" id="odoo-state"></div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
|
<!-- View: ODOO · FIFO Lager Bewertung -->
|
||||||
|
<main id="view-fifo-lager" class="view hidden">
|
||||||
|
<section class="kpis" id="fifo-kpis"></section>
|
||||||
|
|
||||||
|
<section class="panel">
|
||||||
|
<div class="panel-head">
|
||||||
|
<h2>FIFO Lager Bewertung</h2>
|
||||||
|
<span class="muted" id="fifo-info"></span>
|
||||||
|
</div>
|
||||||
|
<div class="table-wrap">
|
||||||
|
<table id="fifo-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Produkt</th>
|
||||||
|
<th>Code</th>
|
||||||
|
<th class="num">Kategorie</th>
|
||||||
|
<th class="num">Stückkosten</th>
|
||||||
|
<th class="num">Menge</th>
|
||||||
|
<th class="num">Wert</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody></tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="state" id="fifo-state"></div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<!-- View: ODOO · Produkt Materialkosten -->
|
||||||
|
<main id="view-materialkosten" class="view hidden">
|
||||||
|
<section class="panel">
|
||||||
|
<div class="panel-head">
|
||||||
|
<h2>Produkt Materialkosten</h2>
|
||||||
|
<span class="muted" id="mk-info"></span>
|
||||||
|
</div>
|
||||||
|
<p class="muted panel-note" id="mk-note">
|
||||||
|
Restmenge = verbleibende Menge der jeweiligen Kostenstaffel – nicht der Gesamtbestand des Produkts. Letzte Kostenstaffel, nicht FIFO.
|
||||||
|
</p>
|
||||||
|
<div class="table-wrap">
|
||||||
|
<table id="mk-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Produkt</th>
|
||||||
|
<th class="num">Kategorie</th>
|
||||||
|
<th>Einlagerungsdatum</th>
|
||||||
|
<th class="num">Stückkosten</th>
|
||||||
|
<th class="num" title="Verbleibende Menge der jeweiligen Kostenstaffel – nicht der Gesamtbestand des Produkts. Letzte Kostenstaffel, nicht FIFO.">Restmenge (Staffel)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody></tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<div class="state" id="mk-state"></div>
|
||||||
|
</main>
|
||||||
|
|
||||||
<!-- View: Gesamt · Alle Rechnungen pro Monat -->
|
<!-- View: Gesamt · Alle Rechnungen pro Monat -->
|
||||||
<main id="view-gesamt-rechnungen-pivot" class="view hidden">
|
<main id="view-gesamt-rechnungen-pivot" class="view hidden">
|
||||||
<section class="kpis" id="pivot-kpis"></section>
|
<section class="kpis" id="pivot-kpis"></section>
|
||||||
|
|||||||
@@ -0,0 +1,111 @@
|
|||||||
|
# Table: `brandize_datacenter_amazon_inventory_detailed`
|
||||||
|
|
||||||
|
**Model:** `brandize.datacenter.amazon.inventory.detailed`
|
||||||
|
**App:** `brandize_datacenter`
|
||||||
|
**Description:** Amazon Inventory Ledger Detailed - Detailed inventory ledger entries
|
||||||
|
**Type:** Basisobjekt (Base object)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
This table stores detailed inventory ledger entries for Amazon FBA (Fulfillment by Amazon). Each record represents a specific inventory event or transaction, providing a granular view of inventory movements including receipts, shipments, adjustments, and reconciliations.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
### Core Identifier Fields
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `id` | `id` | Ganzzahl (Integer) | Primary key / Record ID |
|
||||||
|
| `display_name` | `display_name` | Zeichen (Char) | Display name of the record |
|
||||||
|
|
||||||
|
### Activity Tracking
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `create_date` | `create_date` | Datum/Zeit (Datetime) | Created on - Timestamp when record was created |
|
||||||
|
| `create_uid` | `create_uid` | Many2One | Created by - Reference to user who created the record |
|
||||||
|
| `write_date` | `write_date` | Datum/Zeit (Datetime) | Last Updated on - Timestamp of last modification |
|
||||||
|
| `write_uid` | `write_uid` | Many2One | Last Updated by - Reference to user who last modified the record |
|
||||||
|
|
||||||
|
### Inventory Identification
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `asin` | `asin` | Zeichen (Char) | Amazon Standard Identification Number |
|
||||||
|
| `fnsku` | `fnsku` | Zeichen (Char) | Amazon FNSKU (Fulfillment Network Stock Keeping Unit) |
|
||||||
|
| `msku` | `msku` | Zeichen (Char) | Merchant SKU (Seller's internal SKU) |
|
||||||
|
| `title` | `title` | Zeichen (Char) | Product title |
|
||||||
|
|
||||||
|
### Event Details
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `date` | `date` | Datum (Date) | Date of the inventory event |
|
||||||
|
| `date_time` | `date_time` | Datum/Zeit (Datetime) | Date and time of the inventory event |
|
||||||
|
| `event_type` | `event_type` | Zeichen (Char) | Type of inventory event (e.g., receipt, shipment, adjustment) |
|
||||||
|
| `reason` | `reason` | Zeichen (Char) | Reason for the event |
|
||||||
|
| `reference_id` | `reference_id` | Zeichen (Char) | Reference ID (e.g., order number, shipment ID) |
|
||||||
|
|
||||||
|
### Location
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `country` | `country` | Zeichen (Char) | Country |
|
||||||
|
| `fulfillment_center` | `fulfillment_center` | Zeichen (Char) | Fulfillment center location |
|
||||||
|
| `disposition` | `disposition` | Zeichen (Char) | Inventory disposition/condition status |
|
||||||
|
|
||||||
|
### Quantity Fields
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `quantity` | `quantity` | Ganzzahl (Integer) | Quantity of items in this event |
|
||||||
|
| `reconciled_quantity` | `reconciled_quantity` | Ganzzahl (Integer) | Reconciled quantity (verified count) |
|
||||||
|
| `unreconciled_quantity` | `unreconciled_quantity` | Ganzzahl (Integer) | Unreconciled quantity (pending verification) |
|
||||||
|
|
||||||
|
### Financial Fields
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `inventory_position_value` | `inventory_position_value` | Gleitkommazahl (Float) | Inventory position value |
|
||||||
|
| `helper_cogs` | `helper_cogs` | Gleitkommazahl (Float) | Helper Column: COGS (Cost of Goods Sold) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Database Indexes
|
||||||
|
|
||||||
|
The table likely has indexes on:
|
||||||
|
- `id` (Primary Key)
|
||||||
|
- `create_date` / `write_date` (for audit tracking)
|
||||||
|
- `date` / `date_time` (for date-based filtering)
|
||||||
|
- `asin` (for product lookups)
|
||||||
|
- `fnsku` / `msku` (for SKU lookups)
|
||||||
|
- `fulfillment_center` (for warehouse-specific queries)
|
||||||
|
- `event_type` (for event type filtering)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Usage in BI Dashboard
|
||||||
|
|
||||||
|
This table can be used for:
|
||||||
|
|
||||||
|
- **Detailed inventory movement analysis** - Tracking each inventory event with full details
|
||||||
|
- **Reconciliation reporting** - Comparing reconciled vs unreconciled quantities
|
||||||
|
- **COGS tracking** - Monitoring cost of goods sold at the event level via `helper_cogs`
|
||||||
|
- **Inventory valuation** - Using `inventory_position_value` for position-based valuation
|
||||||
|
- **Fulfillment center analysis** - Tracking inventory by specific fulfillment centers
|
||||||
|
- **Event type reporting** - Analyzing different types of inventory events
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- This table provides more granular detail than the summary table (`brandize_datacenter_amazon_inventory_summary`)
|
||||||
|
- The `date` field is stored as a proper DATE type (unlike the summary table where it's a character string)
|
||||||
|
- `date_time` provides timestamp precision for event ordering
|
||||||
|
- `reconciled_quantity` vs `unreconciled_quantity` allows tracking inventory verification status
|
||||||
|
- `helper_cogs` provides calculated COGS at the event level for detailed cost tracking
|
||||||
|
- Multiple events for the same product can be tracked with different dates, reasons, and fulfillment centers
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
# Table: `brandize_datacenter_amazon_inventory_summary`
|
||||||
|
|
||||||
|
**Model:** `brandize.datacenter.amazon.inventory.summary`
|
||||||
|
**App:** `brandize_datacenter`
|
||||||
|
**Description:** Amazon Inventory Ledger Summary - Inventory ledger and stock level tracking
|
||||||
|
**Type:** Basisobjekt (Base object)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
This table stores Amazon inventory ledger data, tracking inventory movements including shipments, returns, damages, and warehouse transfers. It provides visibility into inventory levels, movements, and valuation.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
### Core Identifier Fields
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `id` | `id` | Ganzzahl (Integer) | Primary key / Record ID |
|
||||||
|
| `display_name` | `display_name` | Zeichen (Char) | Display name of the record |
|
||||||
|
|
||||||
|
### Activity Tracking
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `create_date` | `create_date` | Datum/Zeit (Datetime) | Created on - Timestamp when record was created |
|
||||||
|
| `create_uid` | `create_uid` | Many2One | Created by - Reference to user who created the record |
|
||||||
|
| `write_date` | `write_date` | Datum/Zeit (Datetime) | Last Updated on - Timestamp of last modification |
|
||||||
|
| `write_uid` | `write_uid` | Many2One | Last Updated by - Reference to user who last modified the record |
|
||||||
|
|
||||||
|
### Inventory Identification
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `asin` | `asin` | Zeichen (Char) | Amazon Standard Identification Number |
|
||||||
|
| `fnsku` | `fnsku` | Zeichen (Char) | Amazon FNSKU (Fulfillment Network Stock Keeping Unit) |
|
||||||
|
| `msku` | `msku` | Zeichen (Char) | Merchant SKU (Seller's internal SKU) |
|
||||||
|
| `title` | `title` | Zeichen (Char) | Product title |
|
||||||
|
| `date` | `date` | Zeichen (Char) | Date of the inventory record |
|
||||||
|
|
||||||
|
### Inventory Balances
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `starting_warehouse_balance` | `starting_warehouse_balance` | Ganzzahl (Integer) | Starting warehouse balance (beginning inventory) |
|
||||||
|
| `ending_warehouse_balance` | `ending_warehouse_balance` | Ganzzahl (Integer) | Ending warehouse balance (final inventory) |
|
||||||
|
|
||||||
|
### Inventory Movements
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `customer_shipments` | `customer_shipments` | Ganzzahl (Integer) | Number of customer shipments (sales) |
|
||||||
|
| `receipts` | `receipts` | Ganzzahl (Integer) | Number of receipts (incoming stock) |
|
||||||
|
| `customer_returns` | `customer_returns` | Ganzzahl (Integer) | Number of customer returns |
|
||||||
|
| `vendor_returns` | `vendor_returns` | Ganzzahl (Integer) | Number of vendor returns |
|
||||||
|
| `warehouse_transfer_in_out` | `warehouse_transfer_in_out` | Ganzzahl (Integer) | Warehouse transfer in/out |
|
||||||
|
|
||||||
|
### Inventory Condition Tracking
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `damaged` | `damaged` | Ganzzahl (Integer) | Number of damaged items |
|
||||||
|
| `disposed` | `disposed` | Ganzzahl (Integer) | Number of disposed items |
|
||||||
|
| `lost` | `lost` | Ganzzahl (Integer) | Number of lost items |
|
||||||
|
| `found` | `found` | Ganzzahl (Integer) | Number of found items |
|
||||||
|
|
||||||
|
### Other Events
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `in_transit_between_warehouses` | `in_transit_between_warehouses` | Ganzzahl (Integer) | Items in transit between warehouses |
|
||||||
|
| `other_events` | `other_events` | Ganzzahl (Integer) | Other inventory events |
|
||||||
|
| `unknown_events` | `unknown_events` | Ganzzahl (Integer) | Unknown/uncategorized events |
|
||||||
|
|
||||||
|
### Location
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `location` | `location` | Zeichen (Char) | Warehouse location |
|
||||||
|
| `disposition` | `disposition` | Zeichen (Char) | Inventory disposition/condition status |
|
||||||
|
|
||||||
|
### Helper Fields (Valuation)
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `helper_cogs` | `helper_cogs` | Gleitkommazahl (Float) | Helper Column: COGS (Cost of Goods Sold) |
|
||||||
|
| `helper_starting_inventory_value` | `helper_starting_inventory_value` | Gleitkommazahl (Float) | Helper Column: Starting Inventory Value |
|
||||||
|
| `helper_ending_inventory_value` | `helper_ending_inventory_value` | Gleitkommazahl (Float) | Helper Column: Ending Inventory Value |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Database Indexes
|
||||||
|
|
||||||
|
The table likely has indexes on:
|
||||||
|
- `id` (Primary Key)
|
||||||
|
- `create_date` / `write_date` (for audit tracking)
|
||||||
|
- `asin` (for product lookups)
|
||||||
|
- `fnsku` / `msku` (for SKU lookups)
|
||||||
|
- `date` (for date-based filtering)
|
||||||
|
- `location` (for warehouse-specific queries)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Usage in BI Dashboard
|
||||||
|
|
||||||
|
This table can be used for:
|
||||||
|
|
||||||
|
- **Inventory valuation reports** - Using helper fields for starting/ending inventory values
|
||||||
|
- **COGS tracking** - Monitoring cost of goods sold via `helper_cogs`
|
||||||
|
- **Inventory movement analysis** - Tracking shipments, returns, and transfers
|
||||||
|
- **Damage/loss reporting** - Monitoring damaged, lost, or disposed items
|
||||||
|
- **Warehouse balance reporting** - Starting and ending inventory levels per location
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- The `date` field is stored as a character string (not a proper DATE type) - may require casting in queries
|
||||||
|
- Helper columns (`helper_cogs`, `helper_starting_inventory_value`, `helper_ending_inventory_value`) appear to be calculated values for inventory valuation
|
||||||
|
- The `disposition` field likely indicates inventory condition status (e.g., sellable, unsellable, damaged)
|
||||||
|
- Inventory movements are tracked as discrete counts rather than running balances
|
||||||
@@ -0,0 +1,285 @@
|
|||||||
|
# Table: `brandize_datacenter_amazon_vat_transaction`
|
||||||
|
|
||||||
|
**Model:** `brandize.datacenter.amazon.vat.transaction`
|
||||||
|
**App:** `brandize_datacenter`
|
||||||
|
**Description:** Auftrag (Order/Transaction) - Primary table for Amazon VAT transaction data
|
||||||
|
**Type:** Basisobjekt (Base object)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
This table stores all Amazon VAT transaction data for the Brandize data center. It contains comprehensive information about orders including shipping details, tax calculations, buyer/seller information, and financial data.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
### Core Identifier Fields
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `id` | `id` | Ganzzahl (Integer) | Primary key / Record ID |
|
||||||
|
| `display_name` | `display_name` | Zeichen (Char) | Display name of the record |
|
||||||
|
|
||||||
|
### Activity Tracking
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `create_date` | `create_date` | Datum/Zeit (Datetime) | Created on - Timestamp when record was created |
|
||||||
|
| `create_uid` | `create_uid` | Many2One | Created by - Reference to user who created the record |
|
||||||
|
| `write_date` | `write_date` | Datum/Zeit (Datetime) | Last Updated on - Timestamp of last modification |
|
||||||
|
| `write_uid` | `write_uid` | Many2One | Last Updated by - Reference to user who last modified the record |
|
||||||
|
|
||||||
|
### Transaction Identification
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `transaction_event_id` | `transaction_event_id` | Zeichen (Char) | Unique transaction event identifier |
|
||||||
|
| `transaction_type` | `transaction_type` | Zeichen (Char) | Type of transaction |
|
||||||
|
| `transaction_currency_code` | `transaction_currency_code` | Zeichen (Char) | Currency code for the transaction |
|
||||||
|
| `unique_account_identifier` | `unique_account_identifier` | Zeichen (Char) | Unique identifier for the account |
|
||||||
|
|
||||||
|
### Date Fields
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `transaction_depart_date` | `transaction_depart_date` | Datum (Date) | Date of departure |
|
||||||
|
| `transaction_arrival_date` | `transaction_arrival_date` | Datum (Date) | Date of arrival |
|
||||||
|
| `transaction_complete_date` | `transaction_complete_date` | Datum (Date) | Date when transaction was completed |
|
||||||
|
| `tax_calculation_date` | `tax_calculation_date` | Datum (Date) | Date when tax was calculated |
|
||||||
|
| `vat_inv_exchange_rate_date` | `vat_inv_exchange_rate_date` | Datum (Date) | Exchange rate date for VAT invoice |
|
||||||
|
|
||||||
|
### Geographic Information - Departure
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `departure_country` | `departure_country` | Zeichen (Char) | Country of departure |
|
||||||
|
| `departure_city` | `departure_city` | Zeichen (Char) | City of departure |
|
||||||
|
| `departure_post_code` | `departure_post_code` | Zeichen (Char) | Post code of departure |
|
||||||
|
| `sale_depart_country` | `sale_depart_country` | Zeichen (Char) | Sale departure country |
|
||||||
|
| `seller_depart_country_vat_number` | `seller_depart_country_vat_number` | Zeichen (Char) | Seller's VAT number in departure country |
|
||||||
|
| `seller_depart_vat_number_country` | `seller_depart_vat_number_country` | Zeichen (Char) | Country of seller's VAT number in departure |
|
||||||
|
|
||||||
|
### Geographic Information - Arrival
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `arrival_country` | `arrival_country` | Zeichen (Char) | Country of arrival |
|
||||||
|
| `arrival_city` | `arrival_city` | Zeichen (Char) | City of arrival |
|
||||||
|
| `arrival_post_code` | `arrival_post_code` | Zeichen (Char) | Post code of arrival |
|
||||||
|
| `arrival_address` | `arrival_address` | Text | Full arrival address |
|
||||||
|
| `sale_arrival_country` | `sale_arrival_country` | Zeichen (Char) | Sale arrival country |
|
||||||
|
| `seller_arrival_country_vat_number` | `seller_arrival_country_vat_number` | Zeichen (Char) | Seller's VAT number in arrival country |
|
||||||
|
| `seller_arrival_vat_number_country` | `seller_arrival_vat_number_country` | Zeichen (Char) | Country of seller's VAT number in arrival |
|
||||||
|
|
||||||
|
### Geographic Information - Statistical Codes
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `statistical_code_depart` | `statistical_code_depart` | Zeichen (Char) | Statistical code for departure |
|
||||||
|
| `statistical_code_arrival` | `statistical_code_arrival` | Zeichen (Char) | Statistical code for arrival |
|
||||||
|
|
||||||
|
### Buyer Information
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `buyer_name` | `buyer_name` | Zeichen (Char) | Name of the buyer |
|
||||||
|
| `buyer_vat_number` | `buyer_vat_number` | Zeichen (Char) | VAT number of the buyer |
|
||||||
|
| `buyer_vat_number_country` | `buyer_vat_number_country` | Zeichen (Char) | Country of buyer's VAT number |
|
||||||
|
|
||||||
|
### Seller Information
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `seller_sku` | `seller_sku` | Zeichen (Char) | Seller's SKU (Stock Keeping Unit) |
|
||||||
|
| `supplier_name` | `supplier_name` | Zeichen (Char) | Name of the supplier |
|
||||||
|
| `supplier_vat_number` | `supplier_vat_number` | Zeichen (Char) | VAT number of the supplier |
|
||||||
|
|
||||||
|
### Product Information
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `asin` | `asin` | Zeichen (Char) | Amazon Standard Identification Number |
|
||||||
|
| `item_description` | `item_description` | Text | Description of the item |
|
||||||
|
| `item_manufacture_country` | `item_manufacture_country` | Zeichen (Char) | Country of manufacture |
|
||||||
|
| `commodity_code` | `commodity_code` | Zeichen (Char) | Commodity code for customs |
|
||||||
|
| `commodity_code_supplementary_unit` | `commodity_code_supplementary_unit` | Zeichen (Char) | Supplementary unit for commodity code |
|
||||||
|
|
||||||
|
### Quantity and Weight
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `qty` | `qty` | Ganzzahl (Integer) | Quantity of items |
|
||||||
|
| `item_qty_supplementary_unit` | `item_qty_supplementary_unit` | Ganzzahl (Integer) | Quantity in supplementary unit |
|
||||||
|
| `item_weight` | `item_weight` | Gleitkommazahl (Float) | Weight of a single item |
|
||||||
|
| `total_activity_weight` | `total_activity_weight` | Gleitkommazahl (Float) | Total weight of the activity |
|
||||||
|
| `total_activity_supplementary_unit` | `total_activity_supplementary_unit` | Ganzzahl (Integer) | Total quantity in supplementary unit |
|
||||||
|
|
||||||
|
### Financial Fields - Price of Items
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `price_of_items_amt_vat_excl` | `price_of_items_amt_vat_excl` | Gleitkommazahl (Float) | Price of items amount excluding VAT |
|
||||||
|
| `price_of_items_amt_vat_incl` | `price_of_items_amt_vat_incl` | Gleitkommazahl (Float) | Price of items amount including VAT |
|
||||||
|
| `price_of_items_vat_amt` | `price_of_items_vat_amt` | Gleitkommazahl (Float) | VAT amount for price of items |
|
||||||
|
| `price_of_items_vat_rate_percent` | `price_of_items_vat_rate_percent` | Gleitkommazahl (Float) | VAT rate percentage for price of items |
|
||||||
|
|
||||||
|
### Financial Fields - Promotional Price
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `promo_price_of_items_amt_vat_excl` | `promo_price_of_items_amt_vat_excl` | Gleitkommazahl (Float) | Promotional price excluding VAT |
|
||||||
|
| `promo_price_of_items_amt_vat_incl` | `promo_price_of_items_amt_vat_incl` | Gleitkommazahl (Float) | Promotional price including VAT |
|
||||||
|
| `promo_price_of_items_vat_amt` | `promo_price_of_items_vat_amt` | Gleitkommazahl (Float) | VAT amount for promotional price |
|
||||||
|
|
||||||
|
### Financial Fields - Shipping Charges
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `ship_charge_amt_vat_excl` | `ship_charge_amt_vat_excl` | Gleitkommazahl (Float) | Shipping charge amount excluding VAT |
|
||||||
|
| `ship_charge_amt_vat_incl` | `ship_charge_amt_vat_incl` | Gleitkommazahl (Float) | Shipping charge amount including VAT |
|
||||||
|
| `ship_charge_vat_amt` | `ship_charge_vat_amt` | Gleitkommazahl (Float) | VAT amount for shipping charges |
|
||||||
|
| `ship_charge_vat_rate_percent` | `ship_charge_vat_rate_percent` | Gleitkommazahl (Float) | VAT rate percentage for shipping |
|
||||||
|
|
||||||
|
### Financial Fields - Promotional Shipping
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `promo_ship_charge_amt_vat_excl` | `promo_ship_charge_amt_vat_excl` | Gleitkommazahl (Float) | Promotional shipping excluding VAT |
|
||||||
|
| `promo_ship_charge_amt_vat_incl` | `promo_ship_charge_amt_vat_incl` | Gleitkommazahl (Float) | Promotional shipping including VAT |
|
||||||
|
| `promo_ship_charge_vat_amt` | `promo_ship_charge_vat_amt` | Gleitkommazahl (Float) | VAT amount for promotional shipping |
|
||||||
|
|
||||||
|
### Financial Fields - Gift Wrap
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `gift_wrap_amt_vat_excl` | `gift_wrap_amt_vat_excl` | Gleitkommazahl (Float) | Gift wrap amount excluding VAT |
|
||||||
|
| `gift_wrap_amt_vat_incl` | `gift_wrap_amt_vat_incl` | Gleitkommazahl (Float) | Gift wrap amount including VAT |
|
||||||
|
| `gift_wrap_vat_amt` | `gift_wrap_vat_amt` | Gleitkommazahl (Float) | VAT amount for gift wrap |
|
||||||
|
| `gift_wrap_vat_rate_percent` | `gift_wrap_vat_rate_percent` | Gleitkommazahl (Float) | VAT rate percentage for gift wrap |
|
||||||
|
|
||||||
|
### Financial Fields - Promotional Gift Wrap
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `promo_gift_wrap_amt_vat_excl` | `promo_gift_wrap_amt_vat_excl` | Gleitkommazahl (Float) | Promotional gift wrap excluding VAT |
|
||||||
|
| `promo_gift_wrap_amt_vat_incl` | `promo_gift_wrap_amt_vat_incl` | Gleitkommazahl (Float) | Promotional gift wrap including VAT |
|
||||||
|
| `promo_gift_wrap_vat_amt` | `promo_gift_wrap_vat_amt` | Gleitkommazahl (Float) | VAT amount for promotional gift wrap |
|
||||||
|
|
||||||
|
### Financial Fields - Total Activity
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `total_price_of_items_amt_vat_excl` | `total_price_of_items_amt_vat_excl` | Gleitkommazahl (Float) | Total price of items excluding VAT |
|
||||||
|
| `total_price_of_items_amt_vat_incl` | `total_price_of_items_amt_vat_incl` | Gleitkommazahl (Float) | Total price of items including VAT |
|
||||||
|
| `total_price_of_items_vat_amt` | `total_price_of_items_vat_amt` | Gleitkommazahl (Float) | Total VAT amount for price of items |
|
||||||
|
| `total_ship_charge_amt_vat_excl` | `total_ship_charge_amt_vat_excl` | Gleitkommazahl (Float) | Total shipping charge excluding VAT |
|
||||||
|
| `total_ship_charge_amt_vat_incl` | `total_ship_charge_amt_vat_incl` | Gleitkommazahl (Float) | Total shipping charge including VAT |
|
||||||
|
| `total_ship_charge_vat_amt` | `total_ship_charge_vat_amt` | Gleitkommazahl (Float) | Total VAT amount for shipping |
|
||||||
|
| `total_gift_wrap_amt_vat_excl` | `total_gift_wrap_amt_vat_excl` | Gleitkommazahl (Float) | Total gift wrap excluding VAT |
|
||||||
|
| `total_gift_wrap_amt_vat_incl` | `total_gift_wrap_amt_vat_incl` | Gleitkommazahl (Float) | Total gift wrap including VAT |
|
||||||
|
| `total_gift_wrap_vat_amt` | `total_gift_wrap_vat_amt` | Gleitkommazahl (Float) | Total VAT amount for gift wrap |
|
||||||
|
| `total_activity_value_amt_vat_excl` | `total_activity_value_amt_vat_excl` | Gleitkommazahl (Float) | Total activity value excluding VAT |
|
||||||
|
| `total_activity_value_amt_vat_incl` | `total_activity_value_amt_vat_incl` | Gleitkommazahl (Float) | Total activity value including VAT |
|
||||||
|
| `total_activity_value_vat_amt` | `total_activity_value_vat_amt` | Gleitkommazahl (Float) | Total VAT amount for activity value |
|
||||||
|
|
||||||
|
### Cost and Helper Fields
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `cost_price_of_items` | `cost_price_of_items` | Gleitkommazahl (Float) | Cost price of items |
|
||||||
|
| `helper_cogs_value` | `helper_cogs_value` | Gleitkommazahl (Float) | Helper Column: COGS Value |
|
||||||
|
| `helper_column_1` | `helper_column_1` | Ganzzahl (Integer) | Spalte CA: BUYER_VAT_NUMBER = leer -> 1 |
|
||||||
|
|
||||||
|
### Tax and Compliance Fields
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `product_tax_code` | `product_tax_code` | Zeichen (Char) | Product tax code |
|
||||||
|
| `tax_reporting_scheme` | `tax_reporting_scheme` | Zeichen (Char) | Tax reporting scheme |
|
||||||
|
| `taxable_jurisdiction` | `taxable_jurisdiction` | Zeichen (Char) | Taxable jurisdiction |
|
||||||
|
| `taxable_jurisdiction_level` | `taxable_jurisdiction_level` | Zeichen (Char) | Taxable jurisdiction level |
|
||||||
|
| `vat_calculation_imputation_country` | `vat_calculation_imputation_country` | Zeichen (Char) | Country for VAT calculation imputation |
|
||||||
|
| `tax_collection_responsibility` | `tax_collection_responsibility` | Zeichen (Char) | Tax collection responsibility |
|
||||||
|
|
||||||
|
### Export Fields
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `export_outside_eu` | `export_outside_eu` | Zeichen (Char) | Export outside EU flag |
|
||||||
|
|
||||||
|
### Activity Fields
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `activity_period` | `activity_period` | Zeichen (Char) | Activity period identifier |
|
||||||
|
| `activity_transaction_id` | `activity_transaction_id` | Zeichen (Char) | Activity transaction ID |
|
||||||
|
|
||||||
|
### Invoice Fields
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `invoice_url` | `invoice_url` | Text | URL to the invoice |
|
||||||
|
| `vat_inv_number` | `vat_inv_number` | Zeichen (Char) | VAT invoice number |
|
||||||
|
| `vat_inv_converted_amt` | `vat_inv_converted_amt` | Gleitkommazahl (Float) | VAT invoice converted amount |
|
||||||
|
| `vat_inv_currency_code` | `vat_inv_currency_code` | Zeichen (Char) | VAT invoice currency code |
|
||||||
|
| `vat_inv_exchange_rate` | `vat_inv_exchange_rate` | Gleitkommazahl (Float) | VAT invoice exchange rate |
|
||||||
|
|
||||||
|
### Marketplace and Sales Fields
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `marketplace` | `marketplace` | Zeichen (Char) | Marketplace where transaction occurred |
|
||||||
|
| `sales_channel` | `sales_channel` | Zeichen (Char) | Sales channel |
|
||||||
|
| `program_type` | `program_type` | Zeichen (Char) | Program type |
|
||||||
|
|
||||||
|
### Delivery and Transport Fields
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `delivery_conditions` | `delivery_conditions` | Zeichen (Char) | Delivery conditions |
|
||||||
|
| `transportation_mode` | `transportation_mode` | Zeichen (Char) | Transportation mode |
|
||||||
|
|
||||||
|
### VAT Transaction Fields
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `transaction_seller_vat_number` | `transaction_seller_vat_number` | Zeichen (Char) | Seller's VAT number for this transaction |
|
||||||
|
| `transaction_seller_vat_number_country` | `transaction_seller_vat_number_country` | Zeichen (Char) | Country of seller's VAT number for this transaction |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Database Indexes
|
||||||
|
|
||||||
|
The table likely has indexes on:
|
||||||
|
- `id` (Primary Key)
|
||||||
|
- `create_date` / `write_date` (for audit tracking)
|
||||||
|
- `departure_country` / `arrival_country` (for geographic filtering)
|
||||||
|
- `transaction_type` (for transaction type filtering)
|
||||||
|
- `transaction_event_id` (for unique transaction lookup)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Usage in BI Dashboard
|
||||||
|
|
||||||
|
This table is queried by the following SQL scripts:
|
||||||
|
- `Summe_je_Abgangsland.sql` - Revenue per departure country
|
||||||
|
- `VAT_Summary.sql` - VAT summary report
|
||||||
|
- `Alle_Rechnungen.sql` - All invoices report (combined with account.move)
|
||||||
|
- `Rechnungsexport.sql` - Invoice export
|
||||||
|
- `Quartal_Schweiz.sql` - Switzerland quarterly report (combined with account.move)
|
||||||
|
- `Delete_Activity_Period.sql` - Activity period cleanup
|
||||||
|
|
||||||
|
**Combined Reports:**
|
||||||
|
- `Alle_Rechnungen.sql` and `Quartal_Schweiz.sql` union Amazon transaction data with Odoo invoice data from `account.move` table
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- All monetary amounts are stored as floating-point numbers
|
||||||
|
- Date fields use PostgreSQL `DATE` or `TIMESTAMP` types
|
||||||
|
- Text fields use PostgreSQL `TEXT` type for longer content
|
||||||
|
- Char fields use PostgreSQL `VARCHAR` with appropriate length
|
||||||
|
- Many2One fields reference Odoo's `res_users` table for create/write user tracking
|
||||||
@@ -0,0 +1,147 @@
|
|||||||
|
# Odoo PostgreSQL Table Overview
|
||||||
|
|
||||||
|
This document provides an overview of the important Odoo tables used in the Brandize BI Dashboard.
|
||||||
|
|
||||||
|
## Main Transaction Tables
|
||||||
|
|
||||||
|
### `brandize_datacenter_amazon_vat_transaction`
|
||||||
|
|
||||||
|
**Model:** `brandize.datacenter.amazon.vat.transaction`
|
||||||
|
**App:** `brandize_datacenter`
|
||||||
|
**Description:** Auftrag (Order/Transaction) - Primary table for Amazon VAT transaction data
|
||||||
|
|
||||||
|
This is the main transaction table containing all VAT-related transaction data from Amazon. It serves as the foundation for all BI reports including:
|
||||||
|
|
||||||
|
- Revenue per departure country (`Summe_je_Abgangsland.sql`)
|
||||||
|
- VAT summary (`VAT_Summary.sql`)
|
||||||
|
- Invoice reports (`Alle_Rechnungen.sql`, `Rechnungsexport.sql`, `Quartal_Schweiz.sql`)
|
||||||
|
- Activity period management (`Delete_Activity_Period.sql`)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### `brandize_datacenter_amazon_inventory_summary`
|
||||||
|
|
||||||
|
**Model:** `brandize.datacenter.amazon.inventory.summary`
|
||||||
|
**App:** `brandize_datacenter`
|
||||||
|
**Description:** Amazon Inventory Ledger Summary - Inventory ledger and stock level tracking
|
||||||
|
|
||||||
|
This table stores Amazon inventory ledger data, tracking inventory movements including shipments, returns, damages, and warehouse transfers. It provides visibility into inventory levels, movements, and valuation.
|
||||||
|
|
||||||
|
**Key Characteristics:**
|
||||||
|
- **Type:** Basisobjekt (Base object)
|
||||||
|
- **Has Email Thread:** No
|
||||||
|
- **Has Email Activity:** No
|
||||||
|
- **Has Email Blacklist:** No
|
||||||
|
- **Transition Model:** No
|
||||||
|
|
||||||
|
**Related Documentation:**
|
||||||
|
- [Full field description](brandize_datacenter_amazon_inventory_summary.md)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### `brandize_datacenter_amazon_inventory_detailed`
|
||||||
|
|
||||||
|
**Model:** `brandize.datacenter.amazon.inventory.detailed`
|
||||||
|
**App:** `brandize_datacenter`
|
||||||
|
**Description:** Amazon Inventory Ledger Detailed - Detailed inventory ledger entries
|
||||||
|
|
||||||
|
This table stores detailed inventory ledger entries for Amazon FBA. Each record represents a specific inventory event or transaction, providing a granular view of inventory movements.
|
||||||
|
|
||||||
|
**Key Characteristics:**
|
||||||
|
- **Type:** Basisobjekt (Base object)
|
||||||
|
- **Has Email Thread:** No
|
||||||
|
- **Has Email Activity:** No
|
||||||
|
- **Has Email Blacklist:** No
|
||||||
|
- **Transition Model:** No
|
||||||
|
|
||||||
|
**Related Documentation:**
|
||||||
|
- [Full field description](brandize_datacenter_amazon_inventory_detailed.md)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### `product_product`
|
||||||
|
|
||||||
|
**Model:** `product.product`
|
||||||
|
**App:** `product` (with many integrations)
|
||||||
|
**Description:** Produktvariante (Product Variant) - Odoo's core product/product variant management
|
||||||
|
|
||||||
|
This is Odoo's standard product variant table, storing detailed product information including variants, pricing, inventory settings, and descriptions. It serves as the central product catalog for all Odoo modules.
|
||||||
|
|
||||||
|
**Important:** The `default_code` field is used as the SKU (Stock Keeping Unit) throughout the system, including in Amazon integration and inventory tracking.
|
||||||
|
|
||||||
|
**Key Characteristics:**
|
||||||
|
- **Type:** Basisobjekt (Base object)
|
||||||
|
- **Has Email Thread:** Yes
|
||||||
|
- **Has Email Activity:** Yes
|
||||||
|
- **Has Email Blacklist:** Yes
|
||||||
|
- **Transition Model:** No
|
||||||
|
|
||||||
|
**Related Documentation:**
|
||||||
|
- [Full field description](product_product.md)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Reference Tables
|
||||||
|
|
||||||
|
### `res_country`
|
||||||
|
|
||||||
|
**Model:** `res.country`
|
||||||
|
**App:** `base`
|
||||||
|
**Description:** Country master data table
|
||||||
|
|
||||||
|
Used for country code lookups and translated country names in reports.
|
||||||
|
|
||||||
|
**Key Fields:**
|
||||||
|
- `id` - Primary key
|
||||||
|
- `code` - ISO country code (e.g., 'DE', 'AT', 'CH')
|
||||||
|
- `name` - Country name (multi-language support via JSONB)
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
- Joined in `VAT_Summary.sql` to display country names in the report
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### `account_move`
|
||||||
|
|
||||||
|
**Model:** `account.move`
|
||||||
|
**App:** `account`
|
||||||
|
**Description:** Kundenrechnungen / Gutschriften (Customer invoices / credit notes)
|
||||||
|
|
||||||
|
Odoo's standard accounting module table for managing invoices and credit notes.
|
||||||
|
|
||||||
|
**Key Fields:**
|
||||||
|
- `id` - Primary key
|
||||||
|
- `name` - Invoice number
|
||||||
|
- `move_type` - Invoice type (out_invoice, out_refund, etc.)
|
||||||
|
- `date` - Invoice date
|
||||||
|
- `partner_id` - Customer reference
|
||||||
|
- `amount_total` - Total amount
|
||||||
|
- `state` - Status (posted, draft, cancel)
|
||||||
|
|
||||||
|
**Usage:**
|
||||||
|
- Queried in `Alle_Rechnungen.sql` and `Quartal_Schweiz.sql` for ODOO invoice data
|
||||||
|
- Combined with Amazon transaction data via UNION ALL
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Table Structure Summary
|
||||||
|
|
||||||
|
| Table | Model | Description | Key Fields |
|
||||||
|
|-------|-------|-------------|------------|
|
||||||
|
| `brandize_datacenter_amazon_vat_transaction` | `brandize.datacenter.amazon.vat.transaction` | Amazon VAT transaction records | ID, transaction_type, departure_country, arrival_country, amount fields |
|
||||||
|
| `brandize_datacenter_amazon_inventory_summary` | `brandize.datacenter.amazon.inventory.summary` | Amazon inventory ledger summary | ID, asin, fnsku, customer_shipments, receipts, damaged, disposed |
|
||||||
|
| `brandize_datacenter_amazon_inventory_detailed` | `brandize.datacenter.amazon.inventory.detailed` | Amazon inventory ledger detailed | ID, asin, fnsku, event_type, quantity, reconciled_quantity, fulfillment_center |
|
||||||
|
| `product_product` | `product.product` | Product variants | id, default_code (SKU), categ_id, list_price, cost_method |
|
||||||
|
| `res_country` | `res.country` | Country master data | id, code, name |
|
||||||
|
| `account_move` | `account.move` | Customer invoices / credit notes | id, name, move_type, date, partner_id, amount_total, state |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- All monetary values in the database are stored in the company's currency
|
||||||
|
- Date fields track creation (`create_date`), updates (`write_date`), and transaction-specific dates
|
||||||
|
- The table supports multi-currency transactions with exchange rate tracking
|
||||||
|
- Tax reporting includes multiple jurisdiction levels for VAT calculation
|
||||||
|
- Country names in reports use multi-language support (de_DE, en_US) from `res_country.name` JSONB field
|
||||||
|
- The BI dashboard queries Amazon transaction data (`brandize_datacenter_amazon_vat_transaction`), inventory data (`brandize_datacenter_amazon_inventory_summary`, `brandize_datacenter_amazon_inventory_detailed`), product data (`product_product`), and Odoo invoice data (`account.move`) for comprehensive reporting
|
||||||
@@ -0,0 +1,458 @@
|
|||||||
|
# Table: `product_product`
|
||||||
|
|
||||||
|
**Model:** `product.product`
|
||||||
|
**App:** `product` (with many integrations)
|
||||||
|
**Description:** Produktvariante (Product Variant) - Odoo's core product/product variant management
|
||||||
|
**Type:** Basisobjekt (Base object)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
This is Odoo's standard product variant table, storing detailed product information including variants, pricing, inventory settings, and descriptions. It serves as the central product catalog for all Odoo modules including sales, purchase, inventory, accounting, and manufacturing.
|
||||||
|
|
||||||
|
**Important:** The `default_code` field is used as the SKU (Stock Keeping Unit) throughout the system, including in Amazon integration and inventory tracking.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Fields
|
||||||
|
|
||||||
|
### Core Identifier Fields
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `id` | `id` | Ganzzahl (Integer) | Primary key / Record ID |
|
||||||
|
| `display_name` | `display_name` | Zeichen (Char) | Display name of the record |
|
||||||
|
| `name` | `name` | Zeichen (Char) | Product name |
|
||||||
|
|
||||||
|
### Activity Tracking
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `create_date` | `create_date` | Datum/Zeit (Datetime) | Created on - Timestamp when record was created |
|
||||||
|
| `create_uid` | `create_uid` | Many2One | Created by - Reference to user who created the record |
|
||||||
|
| `write_date` | `write_date` | Datum/Zeit (Datetime) | Last Updated on - Timestamp of last modification |
|
||||||
|
| `write_uid` | `write_uid` | Many2One | Last Updated by - Reference to user who last modified the record |
|
||||||
|
|
||||||
|
### Product Identification
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `default_code` | `default_code` | Zeichen (Char) | **Internal Reference / SKU** - Primary SKU identifier used throughout the system |
|
||||||
|
| `code` | `code` | Zeichen (Char) | Reference |
|
||||||
|
| `barcode` | `barcode` | Zeichen (Char) | Barcode / EAN / UPC |
|
||||||
|
| `unumber` | `unumber` | Zeichen (Char) | uNumber |
|
||||||
|
| `x_studio_char_field_5ro_1j8nka2bt` | `x_studio_char_field_5ro_1j8nka2bt` | Zeichen (Char) | Custom text field |
|
||||||
|
|
||||||
|
### Product Categorization
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `categ_id` | `categ_id` | Many2One | Product category |
|
||||||
|
| `product_tag_ids` | `product_tag_ids` | Many2many | Product template tags |
|
||||||
|
| `all_product_tag_ids` | `all_product_tag_ids` | Many2many | All product tags |
|
||||||
|
| `account_tag_ids` | `account_tag_ids` | Many2many | Accounting tags |
|
||||||
|
| `additional_product_tag_ids` | `additional_product_tag_ids` | Many2many | Additional product tags |
|
||||||
|
|
||||||
|
### Product Attributes
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `attribute_line_ids` | `attribute_line_ids` | one2many | Product attributes (lines) |
|
||||||
|
| `combination_indices` | `combination_indices` | Zeichen (Char) | Combination indices for variant matching |
|
||||||
|
| `has_configurable_attributes` | `has_configurable_attributes` | Boolesch (Boolean) | Is a configurable product |
|
||||||
|
| `product_template_attribute_value_ids` | `product_template_attribute_value_ids` | Many2many | Attribute values |
|
||||||
|
| `product_template_variant_value_ids` | `product_template_variant_value_ids` | Many2many | Variant values |
|
||||||
|
| `valid_product_template_attribute_line_ids` | `valid_product_template_attribute_line_ids` | Many2many | Valid product attribute lines |
|
||||||
|
|
||||||
|
### Product Template Links
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `product_tmpl_id` | `product_tmpl_id` | Many2One | Product template |
|
||||||
|
| `product_variant_id` | `product_variant_id` | Many2One | Product |
|
||||||
|
| `product_variant_ids` | `product_variant_ids` | one2many | Products |
|
||||||
|
| `product_variant_count` | `product_variant_count` | Ganzzahl (Integer) | # Product variants |
|
||||||
|
|
||||||
|
### Pricing
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `list_price` | `list_price` | Gleitkommazahl (Float) | Sales price (catalog price) |
|
||||||
|
| `lst_price` | `lst_price` | Gleitkommazahl (Float) | Sales price (list price) |
|
||||||
|
| `standard_price` | `standard_price` | Gleitkommazahl (Float) | Cost (standard price) |
|
||||||
|
| `price_extra` | `price_extra` | Gleitkommazahl (Float) | Price extra for variant |
|
||||||
|
| `cost_method` | `cost_method` | Auswahl (Selection) | Costing method (Standard, FIFO, Average) |
|
||||||
|
| `avg_cost` | `avg_cost` | monetär (Monetary) | Average cost |
|
||||||
|
| `cost_currency_id` | `cost_currency_id` | Many2One | Cost currency |
|
||||||
|
| `company_currency_id` | `company_currency_id` | Many2One | Company currency for valuation |
|
||||||
|
|
||||||
|
### Company and Currency
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `company_id` | `company_id` | Many2One | Company |
|
||||||
|
| `currency_id` | `currency_id` | Many2One | Currency |
|
||||||
|
| `country_of_origin` | `country_of_origin` | Many2One | Country of origin |
|
||||||
|
|
||||||
|
### Inventory Settings
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `detailed_type` | `detailed_type` | Auswahl (Selection) | Product type (Product, Service, Kit) |
|
||||||
|
| `free_qty` | `free_qty` | Gleitkommazahl (Float) | Available quantity (free to sell) |
|
||||||
|
| `incoming_qty` | `incoming_qty` | Gleitkommazahl (Float) | Incoming quantity |
|
||||||
|
| `outgoing_qty` | `outgoing_qty` | Gleitkommazahl (Float) | Outgoing quantity |
|
||||||
|
| `location_id` | `location_id` | Many2One | Default inventory location |
|
||||||
|
| `warehouse_id` | `warehouse_id` | Many2One | Warehouse |
|
||||||
|
| `property_stock_inventory` | `property_stock_inventory` | Many2One | Inventory location |
|
||||||
|
| `property_stock_production` | `property_stock_production` | Many2One | Production location |
|
||||||
|
| `property_account_creditor_price_difference` | `property_account_creditor_price_difference` | Many2One | Price difference account |
|
||||||
|
| `property_account_expense_id` | `property_account_expense_id` | Many2One | Expense account |
|
||||||
|
| `property_account_income_id` | `property_account_income_id` | Many2One | Income account |
|
||||||
|
|
||||||
|
### Quantity and Stock
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `bom_count` | `bom_count` | Ganzzahl (Integer) | Number of bills of material |
|
||||||
|
| `bom_ids` | `bom_ids` | one2many | Bills of material |
|
||||||
|
| `bom_line_ids` | `bom_line_ids` | one2many | Bill of material lines |
|
||||||
|
| `variant_bom_ids` | `variant_bom_ids` | one2many | Bill of material product variants |
|
||||||
|
| `mrp_product_qty` | `mrp_product_qty` | Gleitkommazahl (Float) | Manufactured quantity |
|
||||||
|
| `used_in_bom_count` | `used_in_bom_count` | Ganzzahl (Integer) | # Bills of material where used |
|
||||||
|
| `qty_available` | `qty_available` | Gleitkommazahl (Float) | Quantity on hand |
|
||||||
|
| `virtual_available` | `virtual_available` | Gleitkommazahl (Float) | Forecasted quantity |
|
||||||
|
| `nbr_moves_in` | `nbr_moves_in` | Ganzzahl (Integer) | Number of incoming moves |
|
||||||
|
| `nbr_moves_out` | `nbr_moves_out` | Ganzzahl (Integer) | Number of outgoing moves |
|
||||||
|
| `stock_move_ids` | `stock_move_ids` | one2many | Stock moves |
|
||||||
|
| `stock_quant_ids` | `stock_quant_ids` | one2many | Stock quants |
|
||||||
|
| `stock_valuation_layer_ids` | `stock_valuation_layer_ids` | one2many | Stock valuation layers |
|
||||||
|
|
||||||
|
### Country and Compliance
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `hs_code` | `hs_code` | Zeichen (Char) | HS Code (Harmonized System code for customs) |
|
||||||
|
| `fiscal_country_codes` | `fiscal_country_codes` | Zeichen (Char) | Fiscal country codes |
|
||||||
|
| `origin_area` | `origin_area` | Zeichen (Char) | Origin Area |
|
||||||
|
| `valid_ean` | `valid_ean` | Boolesch (Boolean) | Barcode is a valid EAN |
|
||||||
|
|
||||||
|
### Expiration and Quality
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `alert_time` | `alert_time` | Ganzzahl (Integer) | Alert time (expiration warning) |
|
||||||
|
| `expiration_time` | `expiration_time` | Ganzzahl (Integer) | Expiration time |
|
||||||
|
| `use_expiration_date` | `use_expiration_date` | Boolesch (Boolean) | Use expiration date |
|
||||||
|
| `use_time` | `use_time` | Ganzzahl (Integer) | Minimum shelf life |
|
||||||
|
| `removal_time` | `removal_time` | Ganzzahl (Integer) | Removal date |
|
||||||
|
| `product_expiry` | (module) | - | Product expiration tracking |
|
||||||
|
| `quality_control_point_qty` | `quality_control_point_qty` | Ganzzahl (Integer) | Number of quality control points |
|
||||||
|
| `quality_fail_qty` | `quality_fail_qty` | Ganzzahl (Integer) | Estimated failed quality controls |
|
||||||
|
| `quality_pass_qty` | `quality_pass_qty` | Ganzzahl (Integer) | Estimated passed quality controls |
|
||||||
|
|
||||||
|
### Descriptions
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `description` | `description` | HTML | General description |
|
||||||
|
| `description_picking` | `description_picking` | Text | Description for picking operations |
|
||||||
|
| `description_pickingin` | `description_pickingin` | Text | Description for receipt operations |
|
||||||
|
| `description_pickingout` | `description_pickingout` | Text | Description for delivery operations |
|
||||||
|
| `description_purchase` | `description_purchase` | Text | Purchase description |
|
||||||
|
| `description_sale` | `description_sale` | Text | Sales description |
|
||||||
|
|
||||||
|
### Status and Flags
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `active` | `active` | Boolesch (Boolean) | Is active |
|
||||||
|
| `is_product_variant` | `is_product_variant` | Boolesch (Boolean) | Is a product variant |
|
||||||
|
| `is_kits` | `is_kits` | Boolesch (Boolean) | Is a kit/assembly |
|
||||||
|
| `landed_cost_ok` | `landed_cost_ok` | Boolesch (Boolean) | Is a landed cost product |
|
||||||
|
| `sale_ok` | `sale_ok` | Boolesch (Boolean) | Can be sold |
|
||||||
|
| `purchase_ok` | `purchase_ok` | Boolesch (Boolean) | Can be purchased |
|
||||||
|
| `service_to_purchase` | `service_to_purchase` | Boolesch (Boolean) | Subcontractor service |
|
||||||
|
| `exporto_sync` | `exporto_sync` | Boolesch (Boolean) | Exporto sync flag |
|
||||||
|
| `exporto_synced_product` | `exporto_synced_product` | Boolesch (Boolean) | Exporto synced product flag |
|
||||||
|
| `of_is_shopify_linked` | `of_is_shopify_linked` | Boolesch (Boolean) | Is Shopify product? |
|
||||||
|
| `visible_expense_policy` | `visible_expense_policy` | Boolesch (Boolean) | Expense policy visible |
|
||||||
|
|
||||||
|
### Image Fields
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `image_1920` | `image_1920` | binär (Binary) | Product image (1920px) |
|
||||||
|
| `image_1024` | `image_1024` | binär (Binary) | Product image (1024px) |
|
||||||
|
| `image_512` | `image_512` | binär (Binary) | Product image (512px) |
|
||||||
|
| `image_256` | `image_256` | binär (Binary) | Product image (256px) |
|
||||||
|
| `image_128` | `image_128` | binär (Binary) | Product image (128px) |
|
||||||
|
| `image_variant_1920` | `image_variant_1920` | binär (Binary) | Variant image (1920px) |
|
||||||
|
| `image_variant_1024` | `image_variant_1024` | binär (Binary) | Variant image (1024px) |
|
||||||
|
| `image_variant_512` | `image_variant_512` | binär (Binary) | Variant image (512px) |
|
||||||
|
| `image_variant_256` | `image_variant_256` | binär (Binary) | Variant image (256px) |
|
||||||
|
| `image_variant_128` | `image_variant_128` | binär (Binary) | Variant image (128px) |
|
||||||
|
| `can_image_1024_be_zoomed` | `can_image_1024_be_zoomed` | Boolesch (Boolean) | Can zoom 1024 image |
|
||||||
|
| `can_image_variant_1024_be_zoomed` | `can_image_variant_1024_be_zoomed` | Boolesch (Boolean) | Can zoom variant 1024 image |
|
||||||
|
|
||||||
|
### Color
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `color` | `color` | Ganzzahl (Integer) | Color picker value |
|
||||||
|
|
||||||
|
### INCI (Cosmetics)
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `inci_ids` | `inci_ids` | Many2many | INCI (International Nomenclature of Cosmetic Ingredients) |
|
||||||
|
| `x_studio_inci` | `x_studio_inci` | Zeichen (Char) | INCI (custom field) |
|
||||||
|
|
||||||
|
### Product Packaging
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `packaging_ids` | `packaging_ids` | one2many | Product packaging |
|
||||||
|
| `uom_id` | `uom_id` | Many2One | Unit of measure |
|
||||||
|
| `uom_name` | `uom_name` | Zeichen (Char) | Unit of measure name |
|
||||||
|
| `uom_po_id` | `uom_po_id` | Many2One | Purchase unit of measure |
|
||||||
|
|
||||||
|
### Product Properties
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `product_properties` | `product_properties` | properties | Properties |
|
||||||
|
| `lot_properties_definition` | `lot_properties_definition` | properties_definition | Lot properties definition |
|
||||||
|
|
||||||
|
### Pricing and Accounting
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `pricelist_item_count` | `pricelist_item_count` | Ganzzahl (Integer) | Number of price rules |
|
||||||
|
| `offer_count` | `offer_count` | Ganzzahl (Integer) | Number of offers |
|
||||||
|
| `price_extra` | `price_extra` | Gleitkommazahl (Float) | Price extra for variant |
|
||||||
|
|
||||||
|
### Product Catalog
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `product_catalog_product_is_in_sale_order` | `product_catalog_product_is_in_sale_order` | Boolesch (Boolean) | Product catalog product is in sale order |
|
||||||
|
| `product_document_count` | `product_document_count` | Ganzzahl (Integer) | Number of documents |
|
||||||
|
| `product_document_ids` | `product_document_ids` | one2many | Documents |
|
||||||
|
|
||||||
|
### Routing and Route
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `route_ids` | `route_ids` | Many2many | Routes |
|
||||||
|
| `route_from_categ_ids` | `route_from_categ_ids` | Many2many | Route category |
|
||||||
|
|
||||||
|
### Reordering Rules
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `orderpoint_ids` | `orderpoint_ids` | one2many | Reordering rules |
|
||||||
|
| `nbr_reordering_rules` | `nbr_reordering_rules` | Ganzzahl (Integer) | Number of reordering rules |
|
||||||
|
| `reordering_min_qty` | `reordering_min_qty` | Gleitkommazahl (Float) | Minimum reordering quantity |
|
||||||
|
| `reordering_max_qty` | `reordering_max_qty` | Gleitkommazahl (Float) | Maximum reordering quantity |
|
||||||
|
|
||||||
|
### Supplier and Purchase
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `seller_ids` | `seller_ids` | one2many | Suppliers |
|
||||||
|
| `variant_seller_ids` | `variant_seller_ids` | one2many | Variant suppliers |
|
||||||
|
| `purchase_line_warn` | `purchase_line_warn` | Auswahl (Selection) | Purchase line warning |
|
||||||
|
| `purchase_line_warn_msg` | `purchase_line_warn_msg` | Text | Purchase line warning message |
|
||||||
|
| `purchase_method` | `purchase_method` | Auswahl (Selection) | Control policy |
|
||||||
|
| `purchase_order_line_ids` | `purchase_order_line_ids` | one2many | Purchase order lines |
|
||||||
|
| `purchased_product_qty` | `purchased_product_qty` | Gleitkommazahl (Float) | Purchased quantity |
|
||||||
|
|
||||||
|
### Sales
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `sale_line_warn` | `sale_line_warn` | Auswahl (Selection) | Sale order line warning |
|
||||||
|
| `sale_line_warn_msg` | `sale_line_warn_msg` | Text | Sale order line warning message |
|
||||||
|
| `sale_delay` | `sale_delay` | Ganzzahl (Integer) | Customer lead time |
|
||||||
|
| `sales_count` | `sales_count` | Gleitkommazahl (Float) | Sold quantity |
|
||||||
|
| `optional_product_ids` | `optional_product_ids` | Many2many | Optional products |
|
||||||
|
|
||||||
|
### Inventory Valuation
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `quantity_svl` | `quantity_svl` | Gleitkommazahl (Float) | BBE quantity (Batch/Batch Entry) |
|
||||||
|
| `value_svl` | `value_svl` | Gleitkommazahl (Float) | BBE value |
|
||||||
|
| `total_value` | `total_value` | monetär (Monetary) | Total value |
|
||||||
|
| `valuation` | `valuation` | Auswahl (Selection) | Stock valuation |
|
||||||
|
|
||||||
|
### Weight and Volume
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `weight` | `weight` | Gleitkommazahl (Float) | Weight |
|
||||||
|
| `weight_uom_name` | `weight_uom_name` | Zeichen (Char) | Weight unit of measure name |
|
||||||
|
| `volume` | `volume` | Gleitkommazahl (Float) | Volume |
|
||||||
|
| `volume_uom_name` | `volume_uom_name` | Zeichen (Char) | Volume unit of measure name |
|
||||||
|
| `specific_weight` | `specific_weight` | Gleitkommazahl (Float) | Specific Weight (g/ml) |
|
||||||
|
|
||||||
|
### Tax
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `taxes_id` | `taxes_id` | Many2many | Customer taxes |
|
||||||
|
| `supplier_taxes_id` | `supplier_taxes_id` | Many2many | Supplier taxes |
|
||||||
|
| `tax_string` | `tax_string` | Zeichen (Char) | Tax string |
|
||||||
|
|
||||||
|
### Tracking
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `tracking` | `tracking` | Auswahl (Selection) | Tracking |
|
||||||
|
|
||||||
|
### Type
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `type` | `type` | Auswahl (Selection) | Type |
|
||||||
|
| `service_type` | `service_type` | Auswahl (Selection) | Track service |
|
||||||
|
|
||||||
|
### Priority and Display
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `priority` | `priority` | Auswahl (Selection) | Favorite |
|
||||||
|
| `sequence` | `sequence` | Ganzzahl (Integer) | Sequence |
|
||||||
|
| `product_tooltip` | `product_tooltip` | Zeichen (Char) | Product tooltip |
|
||||||
|
|
||||||
|
### Shopify Integration
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `of_shopify_bind_ids` | `of_shopify_bind_ids` | one2many | Shopify bindings |
|
||||||
|
| `shopify_variant_id` | `shopify_variant_id` | Zeichen (Char) | Shopify variant ID |
|
||||||
|
|
||||||
|
### Stock and Moves
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `schedule_count` | `schedule_count` | Ganzzahl (Integer) | Schedules |
|
||||||
|
| `split_method_landed_cost` | `split_method_landed_cost` | Auswahl (Selection) | Standard split method for landed cost |
|
||||||
|
|
||||||
|
### Putaway Rules
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `putaway_rule_ids` | `putaway_rule_ids` | one2many | Putaway rules |
|
||||||
|
| `storage_category_capacity_ids` | `storage_category_capacity_ids` | one2many | Storage category capacity |
|
||||||
|
|
||||||
|
### Website
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `website_message_ids` | `website_message_ids` | one2many | Website messages |
|
||||||
|
|
||||||
|
### Responsible
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `responsible_id` | `responsible_id` | Many2One | Responsible |
|
||||||
|
|
||||||
|
### Partner
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `partner_ref` | `partner_ref` | Zeichen (Char) | Customer reference |
|
||||||
|
|
||||||
|
### Activity and Messaging
|
||||||
|
|
||||||
|
| Field Name | Database Column | Type | Description |
|
||||||
|
|------------|-----------------|------|-------------|
|
||||||
|
| `activity_ids` | `activity_ids` | one2many | Activities |
|
||||||
|
| `activity_type_id` | `activity_type_id` | Many2One | Next activity type |
|
||||||
|
| `activity_state` | `activity_state` | Auswahl (Selection) | Activity status |
|
||||||
|
| `activity_user_id` | `activity_user_id` | Many2One | Responsible user |
|
||||||
|
| `activity_date_deadline` | `activity_date_deadline` | Datum (Date) | Next activity deadline |
|
||||||
|
| `activity_summary` | `activity_summary` | Zeichen (Char) | Next activity summary |
|
||||||
|
| `activity_exception_icon` | `activity_exception_icon` | Zeichen (Char) | Exception icon |
|
||||||
|
| `activity_exception_decoration` | `activity_exception_decoration` | Auswahl (Selection) | Exception decoration |
|
||||||
|
| `activity_type_icon` | `activity_type_icon` | Zeichen (Char) | Activity type icon |
|
||||||
|
| `my_activity_date_deadline` | `my_activity_date_deadline` | Datum (Date) | Deadline for my activities |
|
||||||
|
| `message_ids` | `message_ids` | one2many | Messages |
|
||||||
|
| `message_follower_ids` | `message_follower_ids` | one2many | Followers |
|
||||||
|
| `message_has_error` | `message_has_error` | Boolesch (Boolean) | Message delivery error |
|
||||||
|
| `message_has_error_counter` | `message_has_error_counter` | Ganzzahl (Integer) | Number of errors |
|
||||||
|
| `message_has_sms_error` | `message_has_sms_error` | Boolesch (Boolean) | SMS delivery error |
|
||||||
|
| `message_attachment_count` | `message_attachment_count` | Ganzzahl (Integer) | Number of attachments |
|
||||||
|
| `message_is_follower` | `message_is_follower` | Boolesch (Boolean) | Is follower |
|
||||||
|
| `message_needaction` | `message_needaction` | Boolesch (Boolean) | Action needed |
|
||||||
|
| `message_needaction_counter` | `message_needaction_counter` | Ganzzahl (Integer) | Number of actions |
|
||||||
|
| `message_partner_ids` | `message_partner_ids` | Many2many | Followers (partners) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Related Odoo Models
|
||||||
|
|
||||||
|
| Model | Description |
|
||||||
|
|-------|-------------|
|
||||||
|
| `product.template` | Product template (parent of product.product) |
|
||||||
|
| `product.category` | Product category |
|
||||||
|
| `product.tag` | Product tag |
|
||||||
|
| `uom.uom` | Unit of measure |
|
||||||
|
| `stock.location` | Stock location |
|
||||||
|
| `res.country` | Country |
|
||||||
|
| `account.account` | Accounting account |
|
||||||
|
| `mrp.bom` | Bill of material |
|
||||||
|
| `purchase.order.line` | Purchase order line |
|
||||||
|
| `sale.order.line` | Sale order line |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Database Indexes
|
||||||
|
|
||||||
|
The table likely has indexes on:
|
||||||
|
- `id` (Primary Key)
|
||||||
|
- `create_date` / `write_date` (for audit tracking)
|
||||||
|
- `default_code` (for SKU lookups - **critical index**)
|
||||||
|
- `barcode` (for barcode scanning)
|
||||||
|
- `categ_id` (for category filtering)
|
||||||
|
- `company_id` (for multi-company support)
|
||||||
|
- `active` (for filtering inactive products)
|
||||||
|
- `detailed_type` (for product type filtering)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Usage in BI Dashboard
|
||||||
|
|
||||||
|
This table can be used for:
|
||||||
|
|
||||||
|
- **Product catalog reporting** - Full product information including descriptions, pricing, categories
|
||||||
|
- **SKU tracking** - Using `default_code` as the primary SKU identifier
|
||||||
|
- **Inventory valuation** - Using `avg_cost`, `standard_price`, `cost_method`, and currency fields
|
||||||
|
- **Product variant analysis** - Tracking different variants of the same product template
|
||||||
|
- **Barcode integration** - Using `barcode` field for scanning and tracking
|
||||||
|
- **Country of origin reporting** - Using `country_of_origin` and `hs_code` for customs
|
||||||
|
- **Expiration tracking** - Using `alert_time`, `expiration_time`, and `use_expiration_date` for perishable goods
|
||||||
|
- **Kit/assembly tracking** - Using `is_kits` flag for bundle products
|
||||||
|
- **Shopify integration** - Using `of_is_shopify_linked` and `shopify_variant_id` fields
|
||||||
|
- **Inventory moves** - Using `nbr_moves_in`, `nbr_moves_out`, and `stock_move_ids` for movement analysis
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- `default_code` is the primary SKU identifier used throughout Odoo and in integrations (including Amazon)
|
||||||
|
- This table represents individual product variants; product templates (`product.template`) define the base product
|
||||||
|
- Multiple integrations use this table: `account`, `sale`, `purchase`, `stock`, `mrp`, `quality_control`, `sale_amazon`, etc.
|
||||||
|
- The `detailed_type` field distinguishes between Product (physical), Service, and Kit/Assembly
|
||||||
|
- `free_qty` represents available quantity excluding reserved stock
|
||||||
|
- `virtual_available` is the forecasted quantity (available - incoming + outgoing)
|
||||||
|
- Product images are stored in multiple sizes for different display contexts
|
||||||
|
- The table supports complex costing methods: Standard, FIFO, and Average (via `cost_method`)
|
||||||
|
- INCI fields are for cosmetics industry compliance
|
||||||
|
- Exporto integration fields track synchronization status with external systems
|
||||||
|
- Shopify integration fields track product bindings to Shopify
|
||||||
|
- Stock valuation is tracked via `stock_valuation_layer_ids` and `quantity_svl`/`value_svl`
|
||||||
|
- Tax configuration uses both customer (`taxes_id`) and supplier (`supplier_taxes_id`) tax fields
|
||||||
@@ -285,6 +285,7 @@ select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px
|
|||||||
}
|
}
|
||||||
.panel-head h2 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
|
.panel-head h2 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
|
||||||
.muted { color: var(--muted); font-size: 13px; }
|
.muted { color: var(--muted); font-size: 13px; }
|
||||||
|
.panel-note { margin: 0 0 14px; }
|
||||||
|
|
||||||
.legend { display: flex; gap: 14px; flex-wrap: wrap; }
|
.legend { display: flex; gap: 14px; flex-wrap: wrap; }
|
||||||
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
|
.legend-item { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
|
||||||
|
|||||||
Reference in new issue
Block a user