[FIX] account dashboard sample data

Before: in the accounting dashboard, the graph key was confusing for sample data in cash and bank journals

Now: if sample data is shown, the graph key is displayed as "Sample data"

Task-ID #327726333

X-original-commit: 7108277090fb7c7db788dfcc983ff021654c0876
Part-of: odoo/odoo#124457
This commit is contained in:
Ali Alfie (alal)
2023-06-13 11:27:47 +02:00
parent 3adf466c55
commit 1794b2386c
@@ -184,6 +184,7 @@ class account_journal(models.Model):
for i in range(30, 0, -5):
current_date = today + timedelta(days=-i)
data.append(build_graph_data(current_date, random.randint(-5, 15), currency))
graph_key = _('Sample data')
else:
last_balance = journal.current_statement_balance
data.append(build_graph_data(today, last_balance, currency))