Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

top 10 customers odoo

query = "select sum(s.amount_total) as total , s.partner_id,
c.name from sale_order as s inner join res_partner as c 
on s.partner_id =c.id  group by s.partner_id,c.name
order by total desc"
//this will return the sum of amount_total group by custmer name ,
//you need to put this value inside the  self.env.cr.execute(query)
 
PREVIOUS NEXT
Tagged: #top #customers #odoo
ADD COMMENT
Topic
Name
5+5 =