@@ -110,12 +110,14 @@ class LeFilamentTdb(models.Model):
'entree':0,
'sortie':0,
'variation':0,
'target':100000,
'target':0,
'cca':0,
'capital':0,
'date_maj':0,
'a_encaisser':0,
}
cr.execute("""
self._cr.execute("""
SELECT
(select count(*) from account_invoice) as id,
(select sum(amount_untaxed) from account_invoice where state!='draft' and type='out_invoice' and date >= date_trunc('year', current_date) ) as facture,
...
...
@@ -130,13 +132,13 @@ class LeFilamentTdb(models.Model):
(select sum(amount) from account_bank_statement_line where date >= date_trunc('year', current_date) ) as variation,
(select sum(total_amount) from hr_expense where payment_mode='own_account' and state!='done' ) as cca,
(select sum(price_subtotal-qty_invoiced*price_unit) from sale_order_line where invoice_status='to invoice') as commandes; """)
datas=cr.dictfetchall()
datas=self._cr.dictfetchall()
cr.execute("select ca_target from res_company;")
ca_target=cr.dictfetchall()
self._cr.execute("select ca_target from res_company;")
ca_target=self._cr.dictfetchall()
cr.execute("select sum(capital) as capital from hr_employee;")
capital=cr.dictfetchall()
self._cr.execute("select sum(capital) as capital from hr_employee;")