แหล่งข้อมูล

Data sources, which are created each time a list, pivot table or graph is inserted into an Odoo spreadsheet, connect the spreadsheet and the relevant model in your database, keeping the data in the spreadsheet up-to-date.

Each data source is defined by properties that can be accessed via the Data menu. Data sources are identified by their respective (pivot table), (list) or (chart) icon, followed by their ID and name, e.g., (#1) Sales Analysis by Product.

Data sources listed in Data menu

Clicking on a data source opens the related properties in a pane on the right of the spreadsheet.

Tip

  • The properties pane can also be opened by right-clicking any cell of an inserted list or pivot table, then clicking See list properties or See pivot properties, or by clicking the (menu) icon at the top right of an inserted chart, then clicking Edit.

  • Once the properties of a specific data source are open, they remain open even when navigating between spreadsheet tabs. To close the properties pane, click the (close) icon at the top right of the pane.

Note

Deleting an inserted list or pivot table, or deleting the sheet into which it was inserted, does not delete the underlying data source. The data source of an inserted list or pivot table can only be deleted via the data source's properties.

A warning in the Data menu identifies any data sources for which the corresponding list or pivot table no longer appears in the spreadsheet.

ข้อความเตือนเกี่ยวกับรายการที่ไม่ได้ใช้

Deleting an inserted chart, on the other hand, also deletes the underlying data source.

แทรกรายการ

Important

ก่อนที่จะแทรกรายการในสเปรดชีต ให้แน่ใจว่ารายการนั้นได้รับการปรับให้เหมาะกับความต้องการของคุณ พิจารณาว่าฟิลด์ใดควรมองเห็นได้ รวมถึงวิธีการกรองและ/หรือเรียงลำดับระเบียน สิ่งนี้อาจส่งผลต่อทั้งเวลาในการโหลดและความสะดวกในการใช้งานของสเปรดชีตของคุณ

เพื่อแทรกรายการ:

  1. เมื่อมุมมองรายการที่เกี่ยวข้องเปิดอยู่ในฐานข้อมูลของคุณ ให้คลิกไอคอน (Actions) ข้างชื่อของมุมมอง จากนั้น Spreadsheet ‣ Insert list in spreadsheet

    Note

    หากต้องการแทรกเฉพาะระเบียนที่เฉพาะเจาะจง ให้เลือกระเบียนที่เกี่ยวข้อง คลิกปุ่ม Actions ที่ปรากฏที่ตรงกลางด้านบนของหน้าจอ จากนั้น Insert in spreadsheet

  2. ในหน้าต่างที่เปิดขึ้น ให้แก้ไข:guilabel:`ชื่อของรายการ`หากจำเป็น

    The list name is used in the sheet name and in the list properties.

    การแทรกรายการในสปรีดชีต
  3. แก้ไขจำนวนระเบียน เช่น จำนวนแถวที่จะแทรกหากจำเป็น

    ตามค่าเริ่มต้น ตัวเลขที่แสดงคือจำนวนระเบียนที่มองเห็นได้ในหน้าแรกของรายการ ตัวอย่างเช่น หากรายการมีระเบียน 150 รายการ แต่มีเพียง 80 รายการที่มองเห็นได้ ช่องนี้จะแสดง 80

    Note

    แม้ว่าข้อมูลในรายการของคุณจะได้รับการอัปเดตอยู่เสมอด้วยการเชื่อมต่อกับฐานข้อมูลของคุณ แต่รายการที่แทรกจะไม่ขยายโดยอัตโนมัติเพื่อรองรับระเบียนใหม่ เช่น หมวดหมู่สินค้าใหม่หรือพนักงานขายคนใหม่

    If you anticipate new records being added, consider adding extra rows when inserting the list. Records/rows can also be added manually after the spreadsheet has been inserted.

    Example

    บริษัทของคุณมีหมวดหมู่สินค้าสิบหมวดหมู่ในปัจจุบัน และคุณแทรกรายการนี้ในสปรีดชีต หากมีการสร้างหมวดหมู่สินค้าที่ 11 และรายการที่แทรกของคุณมีเพียงสิบแถว หมวดหมู่ใหม่จะถูกแทรกในตำแหน่งที่เหมาะสมในสปรีดชีต ส่งผลให้หมวดหมู่ที่มีอยู่ถูกลบออก

    One way to avoid this is to add extra rows when inserting the list.

  4. Click Blank spreadsheet or select in which existing spreadsheet the list should be inserted.

    Note

    New spreadsheets are saved in the Odoo Documents app in either the My Drive personal workspace or, if file centralization has been enabled for spreadsheets, in the Spreadsheet workspace.

  5. คลิก:guilabel:ยืนยัน

The list is inserted into a new sheet in the spreadsheet. The sheet tab in the bottom bar shows the name of the list followed by the list ID, e.g., Quotations by Total (List #1). A pane on the right side of the screen shows the list properties.

Tip

  • To view an individual record of an inserted list, right-click on any cell of the relevant row, then click See record. To return to the spreadsheet, click the name of the spreadsheet in the breadcrumbs at the top of the view.

  • To sever the link between an inserted list and your database, select the entire list, right-click and select Copy then right-click again and select Paste special ‣ Paste as value.

  • Do not modify the list ID in the sheet name, as the inserted list retains this ID for the lifetime of the spreadsheet. This list ID is used in the spreadsheet functions that retrieve data from your database.

ฟังก์ชันรายการ

When a list is inserted into a spreadsheet, the following functions are used to retrieve the header and field values, respectively:

=ODOO.LIST.HEADER(list_id, field_name)
=ODOO.LIST(list_id, index, field_name)

อาร์กิวเมนต์ของฟังก์ชันมีดังนี้:

  • list_id: ID ที่กำหนดเมื่อแทรกรายการ รายการแรกที่แทรกลงในสปรีดชีตจะได้รับ ID รายการ 1 รายการที่สอง ได้รับ ID รายการ 2 เป็นต้น

  • index: ระบุบรรทัดที่ระเบียนปรากฏในรายการก่อนการแทรก บรรทัดแรกมีดัชนี 1 บรรทัดที่สองมีดัชนี 2 เป็นต้น

  • field_name: ชื่อทางเทคนิคของฟิลด์

Tip

การคลิกที่เซลล์แต่ละเซลล์จะแสดงสูตรที่เกี่ยวข้อง หากเกี่ยวข้อง ในแถบสูตร หากต้องการแสดงสูตรทั้งหมดของสปรีดชีตพร้อมกัน ให้คลิก:menuselection:มุมมอง --> :menuselection:`แสดง --> สูตร`ในแถบเมนู ตัวอย่างด้านล่างแสดงฟังก์ชันที่ใช้ในการดึงส่วนหัวและค่าของรายการ

การดูสูตรของเซลล์สเปรดชีต

คุณสมบัติรายการ

คุณสมบัติรายการจะปรากฏทางด้านขวาของหน้าจอเมื่อมีการแทรกรายการ สามารถเข้าถึงได้ตลอดเวลาผ่านเมนู Data โดยคลิกที่รายการที่เกี่ยวข้อง ซึ่งขึ้นต้นด้วยไอคอน (list) หรือคลิกขวาที่ใดก็ได้บนรายการแล้วคลิก See list properties

คุณสมบัติรายการต่อไปนี้จะแสดงขึ้น โดยบางส่วนสามารถแก้ไขได้:

  • List #: ID รายการ ID รายการจะถูกกำหนดตามลำดับเมื่อมีการแทรกรายการเพิ่มเติมลงในสเปรดชีต

  • List Name: ชื่อของรายการ แก้ไขได้หากจำเป็น โปรดทราบว่าการแก้ไขชื่อรายการในคุณสมบัติรายการจะไม่เปลี่ยนชื่อรายการที่แสดงในชื่อชีต และในทางกลับกัน

  • Model: โมเดลที่ดึงข้อมูลมา

  • Columns: ฟิลด์ของโมเดลที่มองเห็นได้เมื่อแทรกรายการ

  • Domain: กฎที่ใช้กำหนดว่าระเบียนใดจะแสดง คลิก Edit domain เพื่อเพิ่มหรือแก้ไขกฎ

    Note

    When global filters are used, this domain is combined with the selected values of the global filter before the data is loaded into the spreadsheet.

  • Sorting: วิธีการเรียงลำดับข้อมูล หากมี หากต้องการเพิ่มกฎการเรียงลำดับ คลิก Add เลือกฟิลด์ จากนั้นเลือกว่าการเรียงลำดับควรเป็น Ascending หรือ Descending ลบกฎการเรียงลำดับโดยคลิกไอคอน (delete)

To duplicate or delete a list's data source, click the (gear) icon, then click Duplicate or Delete as relevant.

จัดการรายการที่แทรกแล้ว

Once a list from an Odoo database has been inserted into an Odoo spreadsheet, you can:

เพิ่มระเบียน/แถวลงในรายการ

หากต้องการเพิ่มระเบียนลงในรายการ ให้ใช้วิธีใดวิธีหนึ่งต่อไปนี้:

  • Select the last row of the table, then hover over the blue square until the plus icon appears. Click and drag down to add the desired number of rows. The cells of the new rows are populated with the appropriate formula to retrieve the list values. If there is corresponding data in your database, the cells are populated.

    เพิ่มระเบียนโดยการลากเซลล์ลง
  • วางเคอร์เซอร์ของคุณในเซลล์บนซ้ายของแผ่นงาน คลิก Data ‣ Re-insert list จากแถบเมนู จากนั้นเลือกรายการที่เหมาะสม ในหน้าต่างป๊อปอัป ระบุจำนวนระเบียนที่จะแทรกและคลิก Confirm รายการที่อัปเดตจะถูกแทรกเข้ามาแทนที่รายการเดิม

Tip

วิธีการข้างต้นยังสามารถใช้เพื่อเพิ่มแถวเปล่าเพิ่มเติมลงในตารางสปรีดชีตของคุณได้ ซึ่งอาจมีประโยชน์สำหรับรายการที่คุณคาดหว้าว่าจะมีระเบียนเพิ่มเติมถูกสร้างขึ้นในฐานข้อมูลของคุณ เช่น หมวดหมู่สินค้าใหม่หรือพนักงานขายใหม่

เพิ่มฟิลด์/คอลัมน์ลงในรายการ

เพื่อเพิ่มฟิลด์/คอลัมน์ลงในรายการ:

  1. เลือกคอลัมน์ทางด้านขวาหรือซ้ายของตำแหน่งที่คอลัมน์ใหม่ควรถูกแทรก

  2. คลิก Insert ‣ Insert column จากนั้น Column left หรือ Column right จากแถบเมนู หรือคลิกขวาจากนั้น Insert column left หรือ Insert column right ตามความเหมาะสม

  3. คัดลอกเซลล์หัวข้อของคอลัมน์ใดก็ได้ วางลงในเซลล์หัวข้อของคอลัมน์ใหม่ แล้วกด Enter

  4. ดับเบิลคลิกที่เซลล์หัวข้อใหม่ จากนั้นคลิกที่ชื่อฟิลด์ที่ปรากฏในเครื่องหมายคำพูดที่ส่วนท้ายของสูตร รายการชื่อทางเทคนิคทั้งหมดของฟิลด์ของโมเดลที่เกี่ยวข้องจะปรากฏขึ้น

    เพิ่มฟิลด์/คอลัมน์โดยการแก้ไขสูตร
  5. เลือกชื่อฟิลด์ที่เหมาะสมและกด Enter ป้ายกำกับของฟิลด์จะปรากฏในหัวข้อ

    Tip

    หากต้องการทราบชื่อทางเทคนิคของฟิลด์ ไปที่มุมมองที่เกี่ยวข้อง เปิดใช้งานโหมดนักพัฒนา จากนั้นตรวจสอบชื่อฟิลด์โดยการเลื่อนเมาส์ไปที่เครื่องหมายคำถามข้างป้ายกำกับของฟิลด์

  6. โดยเลือกเซลล์หัวข้อไว้ ดับเบิลคลิกที่สี่เหลี่ยมสีน้ำเงินที่มุมล่างขวา เซลล์ของคอลัมน์จะถูกเติมด้วยสูตรที่เหมาะสมเพื่อดึงค่ารายการ หากมีข้อมูลที่สอดคล้องกันในฐานข้อมูลของคุณ เซลล์จะถูกเติมข้อมูล

ทำสำเนารายการ

การทำสำเนารายการผ่านคุณสมบัติของรายการจะสร้างแหล่งข้อมูลเพิ่มเติม ซึ่งช่วยให้สามารถดำเนินการจัดการที่แตกต่างกันกับข้อมูลเดียวกันภายในสปรีดชีตเดียวได้

With the list properties open, click the (gear) icon then Duplicate.

แหล่งข้อมูลใหม่จะได้รับการกำหนด ID รายการถัดไปที่พร้อมใช้งาน ตัวอย่างเช่น หากไม่มีรายการอื่นถูกแทรกในระหว่างนี้ การทำสำเนา List #1 จะส่งผลให้มีการสร้าง List #2

แตกต่างจากเมื่อคุณแทรกรายการ รายการที่ทำสำเนาจะไม่ถูกแทรกลงในสปรีดชีตโดยอัตโนมัติ ในการแทรก ให้ทำตามขั้นตอนต่อไปนี้:

  1. เพิ่มแผ่นงานใหม่โดยการคลิกไอคอน (เพิ่มแผ่นงาน) ที่มุมล่างซ้ายของสปรีดชีต

  2. คลิก Data ‣ Re-insert list จากแถบเมนู จากนั้นเลือกรายการที่เหมาะสม

  3. กำหนดจำนวนระเบียนที่จะแทรกและคลิก Confirm

  4. Edit the List Name in the properties pane if needed.

  5. เปลี่ยนชื่อชีตโดยคลิกขวาที่แท็บชีต เลือก:guilabel:เปลี่ยนชื่อ และป้อนชื่อชีตใหม่

Note

การทำสำเนารายการที่แทรกโดยการคัดลอกและวางหรือโดยการทำสำเนาชีตที่แทรกไว้จะไม่สร้างแหล่งข้อมูลใหม่ การเปลี่ยนแปลงใดๆ ที่ทำกับคุณสมบัติของรายการจะส่งผลกระทบต่อสำเนาของรายการทั้งหมด

ลบรายการ

หากต้องการลบรายการและแหล่งข้อมูลพื้นฐานออกจากสプรดชีตอย่างสมบูรณ์ ให้ทำตามขั้นตอนต่อไปนี้ตามลำดับใดก็ได้:

  • ลบตารางสเปรดชีตโดยใช้วิธีที่คุณต้องการ เช่น ผ่านคำสั่งแป้นพิมพ์ เมนูสเปรดชีต หรือโดยการลบชีต การดำเนินการนี้จะลบการแสดงข้อมูลแบบภาพ

  • From the properties pane of the relevant list, click the (gear) icon then Delete. This deletes the data source of the list from the spreadsheet.

แทรกตารางสรุปข้อมูล

Tip

Converting an inserted pivot table to a dynamic pivot table allows you to add, remove, and manipulate dimensions (i.e., columns and rows) and measures. It is therefore possible to insert a basic pivot table with minimal configuration, convert it to a dynamic pivot table, then refine it directly in the spreadsheet.

To insert a pivot table:

  1. เมื่อเปิดมุมมองสรุปข้อมูลที่เกี่ยวข้องในฐานข้อมูลของคุณ คลิก:guilabel:แทรกในสเปรดชีต

  2. In the window that opens, edit the Name of the pivot if needed.

    This name is used in the sheet name and in the pivot table properties.

    Inserting a pivot table in a spreadsheet
  3. Click Blank spreadsheet or select in which existing spreadsheet the pivot table should be inserted.

    Note

    New spreadsheets are saved in the Odoo Documents app in either the My Drive personal workspace or, if file centralization has been enabled for spreadsheets, in the Spreadsheet workspace.

  4. คลิก:guilabel:ยืนยัน

The pivot table is inserted into a new sheet in the spreadsheet. The sheet tab in the bottom bar shows the name of the pivot table followed by the pivot table ID, e.g., Sales Analysis by Sales Team (Pivot #1). A pane on the right side of the screen shows the pivot table properties.

Tip

  • To view the records referenced by an individual cell of a pivot table, right-click on the cell, then click See record. To return to the spreadsheet, click the name of the spreadsheet in the breadcrumbs at the top of the view.

  • หากต้องการตัดการเชื่อมโยงระหว่างตารางสรุปข้อมูลที่แทรกและฐานข้อมูลของคุณ ให้เลือกตารางสรุปข้อมูลทั้งหมด คลิกขวาและเลือก:icon:fa-clone คัดลอก จากนั้นคลิกขวาอีกครั้งและเลือก:menuselection:วางแบบพิเศษ --> วางเป็นค่า

  • Do not modify the pivot table ID in the sheet name, as the inserted pivot table retains this ID for the lifetime of the spreadsheet. This pivot table ID is used in the spreadsheet functions that retrieve data from your database.

Pivot table functions

An inserted pivot table that has not been converted to a dynamic pivot table uses the following functions to retrieve the header and field values, respectively:

=PIVOT.HEADER(pivot_id, [domain_field_name, …], [domain_value, …])
=PIVOT.VALUE(pivot_id, measure_name, [domain_field_name, …], [domain_value, …])

อาร์กิวเมนต์ของฟังก์ชันมีดังนี้:

  • pivot_id: ID ที่กำหนดเมื่อแทรกตารางสรุปข้อมูล ตารางสรุปข้อมูลแรกที่แทรกในสปรีดชีตจะได้รับ pivot ID 1 ตารางที่สอง pivot ID 2 เป็นต้น

  • measure_name: ชื่อทางเทคนิคของสิ่งที่กำลังวัด ตามด้วยประเภทของการรวมข้อมูล เช่น product_uom_qty:sum

  • domain_field_name: ชื่อทางเทคนิคของฟิลด์ที่ใช้เป็นมิติ เช่น user_id หรือหากมิติเป็นช่วงเวลา ให้ใช้ชื่อทางเทคนิคของฟิลด์วันที่ ตามด้วยช่วงเวลา เช่น date_order:month

  • domain_value: ID ของเรกคอร์ด หรือหากมิติเป็นช่วงเวลา ให้ใช้วันที่หรือช่วงเวลาที่ต้องการ

Tip

Clicking on an individual cell displays the related formula, if relevant, in the formula bar. To display all the formulas of a spreadsheet at the same time, click View ‣ Show ‣ Formulas on the menu bar. The example below shows the functions used to retrieve headers and values of a static pivot table.

ฟังก์ชันของตาราง Pivot แบบคงที่

คุณสมบัติตาราง Pivot

The pivot table properties appear on the right side of the screen when a pivot table is inserted. They can be accessed at any time via the Data menu by clicking the relevant pivot table, as prefaced by the (pivot) icon, or by right-clicking anywhere on the pivot table and clicking See pivot properties.

The following pivot table properties are shown, some of which can be edited:

  • Pivot #: the pivot table ID. Pivot table IDs are assigned sequentially as additional pivot tables are inserted in the spreadsheet.

  • Name: the name of the pivot table. Edit this if needed. Note that editing the name in the pivot table properties does not modify the name shown in the sheet name, and vice versa.

  • Model: โมเดลที่ดึงข้อมูลมา

  • Columns and Rows: dimensions you are using to categorize or group data from the model.

  • Measures: what you are measuring, or analyzing, based on the dimensions you have chosen.

    Tip

    If you attempt to make changes to the columns, rows, or measures of a pivot table that has just been inserted into a spreadsheet, an error appears at the top right of the screen.

    Error message when trying to manipulate static pivot table

    To be able to manipulate a pivot table's properties, convert a static pivot table to a dynamic pivot table.

  • Domain: กฎที่ใช้กำหนดว่าระเบียนใดจะแสดง คลิก Edit domain เพื่อเพิ่มหรือแก้ไขกฎ

    Note

    When global filters are used, this domain is combined with the selected values of the global filter before the data is loaded into the spreadsheet.

To duplicate or delete a pivot table's data source, click the (gear) icon then Duplicate or Delete.

Manage an inserted pivot table

Once a pivot table from an Odoo database has been inserted into an Odoo spreadsheet, you can:

Duplikovat kontingenční tabulku

Duplicating a pivot table via the pivot table's properties creates an additional data source. This allows for different manipulations to be performed on the same data within one spreadsheet.

For example, you can see the same data aggregated by different dimensions or use global filters to offset the date and create pivot tables that compare the current period's data with a previous period.

To duplicate a pivot table, perform the following steps:

  1. With the pivot table properties open, click the (gear) icon then Duplicate.

    The duplicated pivot table is automatically inserted into a new sheet in the spreadsheet, with the pivot table properties open in the right pane.

  2. Edit the Name in the properties pane and the sheet tab if needed.

The new data source is assigned the next available pivot table ID. For example, if no other pivot tables have been inserted in the meantime, duplicating Pivot #1 results in the creation of Pivot #2.

Note

  • Duplicating an inserted pivot table by copying and pasting it or by duplicating the sheet does not create a new data source. Any changes made to the pivot table's properties would therefore impact any copies of the pivot table.

  • When a pivot table is duplicated, the new pivot table is by default a dynamic pivot table.

Odstranit kontingenční tabulku

To fully delete a pivot table and the underlying data source from a spreadsheet, perform the following steps in any order:

  • ลบตารางสเปรดชีตโดยใช้วิธีที่คุณต้องการ เช่น ผ่านคำสั่งแป้นพิมพ์ เมนูสเปรดชีต หรือโดยการลบชีต การดำเนินการนี้จะลบการแสดงข้อมูลแบบภาพ

  • From the properties pane of the relevant pivot table, click the (gear) icon then Delete. This deletes the data source of the pivot table.

Vložit graf

Chcete-li vložit graf z databáze Odoo do tabulkového procesoru Odoo:

  1. S otevřeným příslušným grafovým zobrazením v databázi klikněte na Vložit do tabulkového procesoru.

  2. V otevřeném okně v případě potřeby upravte Název grafu.

  3. Click Blank spreadsheet or select in which existing spreadsheet the chart should be inserted.

    Note

    New spreadsheets are saved in the Odoo Documents app in either the My Drive personal workspace or, if file centralization has been enabled for spreadsheets, in the Spreadsheet workspace.

  4. คลิก:guilabel:ยืนยัน

Charts are inserted on the first sheet of the spreadsheet. A pane on the right side of the screen shows the chart properties, where various aspects of the chart's configuration and design can be modified.

Tip

Kliknutím na datový bod v grafu se otevře příslušné seznamové zobrazení v databázi. V příkladu kliknutím na Jessica Childs se otevře seznamové zobrazení všech prodejů tohoto obchodníka, které odpovídají doméně grafu.

Klikatelný odkaz na nabídku Odoo plus klikatelný datový bod

แทรกข้อมูลทางการเงิน

เมื่อสร้างรายงานและแดชบอร์ด อาจเป็นประโยชน์ในการรวมข้อมูลที่เกี่ยวข้องกับระบบบัญชีบางอย่าง เช่น ID บัญชี เครดิตและเดบิตสำหรับบัญชีเฉพาะ และวันที่เริ่มต้นและสิ้นสุดของปีภาษี

ฟังก์ชันสเปรดชีตเฉพาะของ Odoo ช่วยให้คุณดึงข้อมูลระบบบัญชีดังกล่าวจากฐานข้อมูลของคุณและแทรกลงในสเปรดชีตได้