From bb117d4ee624ead30f9b1f0faf80636b9d4333d3 Mon Sep 17 00:00:00 2001 From: laurentbarontini Date: Sat, 3 Jan 2026 13:25:11 +0100 Subject: [PATCH] 03.01.26 --- modules/purchase_trade/dashboard.py | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/modules/purchase_trade/dashboard.py b/modules/purchase_trade/dashboard.py index 2d01385..77f3a5e 100755 --- a/modules/purchase_trade/dashboard.py +++ b/modules/purchase_trade/dashboard.py @@ -277,11 +277,21 @@ class Dashboard(ModelSQL, ModelView): Invoice = Pool().get('account.invoice') invs = Invoice.search(['type','=','in']) inv_p = len(invs) + invs = Invoice.search([('type','=','in'),('state','=','paid')]) + inv_p_p = len(invs) + invs = Invoice.search([('type','=','in'),('state','!=','paid')]) + inv_p_np = len(invs) invs = Invoice.search(['type','=','out']) inv_s = len(invs) + invs = Invoice.search([('type','=','out'),('state','=','paid')]) + inv_s_p = len(invs) + invs = Invoice.search([('type','=','out'),('state','!=','paid')]) + inv_s_np = len(invs) AccountMove = Pool().get('account.move') - accs = AccountMove.search(['journal','=',3]) - move_cash = len(accs) + accs = AccountMove.search([('journal','=',3),('state','!=','posted')]) + pay_val = len(accs) + accs = AccountMove.search([('journal','=',3),('state','=','posted')]) + pay_posted = len(accs) return ( config.dashboard + @@ -319,10 +329,20 @@ class Dashboard(ModelSQL, ModelView): + str(lot_al) + "&inv_p=" + str(inv_p) + + "&inv_p_p=" + + str(inv_p_p) + + "&inv_p_np=" + + str(inv_p_np) + "&inv_s=" + str(inv_s) - + "&move_cash=" - + str(move_cash) + + "&inv_s_p=" + + str(inv_s_p) + + "&inv_s_np=" + + str(inv_s_np) + + "&pay_val=" + + str(pay_val) + + "&pay_posted=" + + str(pay_posted) )