콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다
5 답글
2849 화면

Hello,


I am new to ODOO and I have the following queries:


1- I would like to create postgreSQL queries or directly in Microsoft ACCESS via an ODBC connection that I already have configured.


Can someone give me the most important sales tables and their relationships?


       - Sales documents

       - Detail of sales lines

                - with sales price, cost price, batch number of the product sold

       - Table of third parties, articles, commercials, payment methods, risk, ...



2- Has anyone created SQL queries (mainly for sales) to pass to me so I don't waste a lot of time testing?


3- my final idea is after creating the queries that I mentioned above, connect them with POWER BI.


Does anyone have any POWER BI development already done?

아바타
취소
베스트 답변

Hello Jose

How did you solve sql queries to create powerbi report?


아바타
취소
작성자 베스트 답변

Hi Mayur,


thank you very much for your response.


Could you help me with the following query:

I want to obtain the orders invoiced with the sales lines:

- Invoice number

- Customer

- Article

- sale price

- Cost price (or Margin)

- batch number of the item sold.


I have thought about linking [account_move] with [sale_order] and [sale_order_line], to extract the sales lines, which I have achieved but my question is for this example:

   ++I have an order with 2 sales lines

   ++I have invoiced the two lines separately in 2 invoices

Where do I find the information (field filter) to know that this order line has gone to invoice 1 and the other order line has gone to invoice 2?


many tks

아바타
취소
베스트 답변

Hi Jose, 


Basic PSQL query is here. 

select * from public.sale_order a LEFT JOIN public.sale_order_line b on a.id = b.order_id where a.name =xxxx (Replace order number);


You may required to explore more tables and join them.

- stock_picking (sale_order.id = stock.picking.sale_id)

- stock_move (stock_picking.id = stock_move.picking_id) (sale_order.name = stock_move.origin)

Stock Move Line table  will provide detailed info of lot number and final quantities with status done.

-stock_move_line (stock_move.id = stock_move_line.move_id) 

- account_move (Invoice information) (journal_id = pick the journal id from your system)

http://localhost:0000/web#cids=2%2C3%2C1&menu_id=114&action=236&model=account.journal&view_type=list

- account_move_line (Invoice lines)



아바타
취소
베스트 답변

Hi Jose, 

I specialise in creating Power BI reports for Odoo using Techneith's direct connector. If you want to check out my portfolio you can find it at bepbi.com 

All of the reports showcased have been created using the Odoo data model, so the relationships have already been established. Some require joins from over 20 tables. If you need any assistance, I would love to help. If not, I'd definitely recommend checking out Techneith's connector if you want to create the reports yourself. 

아바타
취소
관련 게시물 답글 화면 활동
2
5월 25
1881
0
2월 25
2289
2
1월 25
9139
2
1월 24
10138
7
1월 24
50022