[ADD] Inventory: add stock valuation cheat sheet

An adaptation of the venerable business memento from 8.0 to the new
inventory valuation mechanics of Odoo 19.0 by scavenging and cobbling
together of the scripts `entries.js` and `coa-valuation.js`. The shared
data is kept in a separate file.

Additionally, we remove the old inventory valuation documentation.

Task ID: 5107300

closes odoo/documentation#14906

Signed-off-by: Felicia Kuan (feku) <feku@odoo.com>
This commit is contained in:
Lulu Grimalkin (lugr)
2025-10-06 11:20:16 +02:00
committed by “Dallas”
parent c97a8e6bad
commit 912dde6d26
63 changed files with 2387 additions and 773 deletions

View File

@@ -106,13 +106,6 @@ label:hover,
font-style: normal;
}
.values-table tr > * {
text-align: right;
}
.values-table tr > :first-child {
text-align: left;
}
/* 3-column (thing, debit, credit) tables */
/* 2nd and 3rd th & td of each row right-aligned and 1/4th width */
.d-c-table tr > :nth-child(2),
@@ -139,21 +132,7 @@ label:hover,
background-color: #eee !important;
color: #7A436B !important;
}
.chart-of-accounts .highlight-op,
.valuation-chart .highlight-op {
background-color: #030035;
border-bottom: 1px solid #000000 !important;
}
.chart-of-accounts .highlight-op,
.valuation-chart-continental .highlight-op {
background-color: #030035;
border-bottom: 1px solid #000000 !important;
}
.chart-of-accounts .highlight-op,
.valuation-chart-anglo-saxon .highlight-op {
.chart-of-accounts .highlight-op {
background-color: #030035;
border-bottom: 1px solid #000000 !important;
}
@@ -217,17 +196,3 @@ blockquote.highlights, blockquote.highlights p{
margin-bottom: 1rem;
text-align: center;
}
/*
lists of alternatives
*/
.alternatives-controls label {
display: block;
}
dl.alternatives > dt,
dl.alternatives > dd {
display: none;
}
dl.alternatives > dd {
margin-left: 0;
}

128
static/css/valuation.css Normal file
View File

@@ -0,0 +1,128 @@
/* Used in valuation cheat_sheet.rst */
/* Prevent titles from wrapping upwards */
h3 { clear: both !important; }
.full-width { width: 100% !important; }
.accounting-entries, .journal-entries, .values-table {
border: 1px solid #d5d5d5;
background-color: #f8f8f8;
margin: 0px auto;
}
/* Costing methods table - see misc.js */
.alternatives-controls {
padding-bottom: 24px;
label {
display: block;
}
}
dl.alternatives > dt {
display: none;
}
dl.alternatives > dd {
display: none;
margin-left: 0;
}
.values-table {
text-align: right;
tr > th:first-of-type {
text-align: left;
}
}
/* Accounting methods table - see valuation-accounting.js */
.accounting-entries {
th, td {
padding-top: 0px !important;
padding-bottom: 0px !important;
}
thead th, tr > td {
padding-left: 48px;
}
tbody th {
font-weight: normal;
}
.parent-line { background-color: #fafafa; }
.child-line { background-color: #f0f0f0; }
}
.entries-listing {
padding: .5rem;
}
#accounting-entries-controls label,
#journaling-entries-controls label {
display: block;
}
/* Highlighting of selected options - see misc.js */
label:hover, .highlighter-list li:hover {
background-color: hsl(0, 0%, 94%);
cursor: pointer;
}
.related {
background-color: hsl(317deg 16% 90%) !important;
border: 1px solid #000000 !important;
transition: .3s;
}
.secondary {
background-color: hsl(180deg 67% 94%) !important;
transition: .3s;
}
.highlight-op {
background-color: hsl(317deg 16% 90%) !important;
transition: .3s;
}
.highlighter-target {
th {
font-weight: 400;
}
.related {
/*background-color: #eee !important;*/
color: #7A436B !important;
}
.secondary {
background-color: #eee !important;
color: #7A436B !important;
}
}
/* Static tables */
.feature-table, .config-table {
table {
/* width: unset; */
margin: auto;
white-space: nowrap;
text-align: center;
}
tbody td:first-child {
text-align: left;
}
}
.config-table {
font-size: 90%;
}
.accounting-app-paragraph:hover ~ .feature-table tr > td:first-child:has(+ td .good),
.inventory-app-paragraph:hover ~ .feature-table tr > td:first-child:has(+ td + td .good)
{ font-weight: bold; }
.feature-table {
td { width: 32px; }
td:has(.good) { background-color: #d9ead3 !important; }
td:has(.meh) { background-color: #fce5cd !important; }
td:has(.bad) { background-color: #f4cccc !important; }
}
.config-table {
th, td {
padding-top: 0px !important;
padding-bottom: 0px !important;
}
td:has(.washed) { color: var(--bs-gray); }
}
.yellow, td:has(.yellow), th:has(.yellow) { background-color: #fff2cc !important; }
.green, td:has(.green), th:has(.green) { background-color: #d9ead3 !important; }
.blue, td:has(.blue), th:has(.blue) { background-color: #cfe2f3 !important; }
.darkblue, td:has(.darkblue), th:has(.darkblue) { background-color: #6d9eeb !important; }
.purple, td:has(.purple), th:has(.purple) { background-color: #d9d2e9 !important; }