Khác biệt giữa các bản “Nhập tệp CSV vào Kiu ERP/en”
(Tạo trang mới với nội dung “The tags should be separated by a comma without any spacing. For example, if you want your customer to be linked to both tags 'Manufacturer' and 'Retailer…”) |
(Tạo trang mới với nội dung “'''How can I import a one2many relationship (e.g. several Order Lines of a Sales Order)?'''”) |
||
Dòng 88: | Dòng 88: | ||
CSV file for Manufacturer, Retailer. | CSV file for Manufacturer, Retailer. | ||
− | ''' | + | '''How can I import a one2many relationship (e.g. several Order Lines of a Sales Order)?''' |
− | + | ||
Nếu | Nếu |
Phiên bản lúc 17:29, ngày 18 tháng 12 năm 2017
Frequently Asked Questions
Need to import data from an other application?
In order to re-create relationships between different records, you should use the unique identifier from the original application and map it to the ID (External ID) column in Kiu ERP. When you import an other record that links to the first one, use XXX/ID (XXX/External ID) to the original unique identifier.
The ID (External ID) will also be used to update the original import if you need to re-import modified data later, it's thus good practice to specify it whenever possible.
I cannot find the field I want to map my column to?
Kiu ERP try to find with some heuristic, based on the first ten lines of the files, the type of field for each columns inside your file. For example if you have a column only containing numbers, only the fields that are of type integer will be displayed for you to choose from. While this behaviour might be good and easy for most cases scenarios, it is also possible that it goes wrong sometimes or that you want to map your column to a field that is not proposed by default.
If that happens, you just have to check the Show all fields for completion (advanced) option, you will then be able to choose from the complete list of fields for each columns.
Where can I change the date import format?
Kiu ERP can automatically detect if a column is a date and it will try to guess the date format from a set of most used date format. While this process can work for a lot of simple date format, some exotic date format will not be recognize and it is also possible to have some confusion (day and month inverted as example) as it is difficult to guess correctly which part is the day and which one is the month in a date like '01-03-2016'.
To view which date format Kiu ERP has found from your file you can check the Date Format that is shown when clicking on Options under the file selector. If this format is incorrect you can change it to your liking using the ISO 8601 to define the format.
Note
If you are importing an excel (.xls, .xlsx) file, you can use date cells to store dates as the display of dates in excel is different from the way it is stored. That way you will be sure that the date format is correct in Kiu ERP whatever your locale date format is.
Can I import numbers with currency sign (e.g.: $32.00)?
Yes, we fully support numbers with parenthesis to represent negative sign as well as numbers with currency sign attached to them. Kiu ERP also automatically detect which thousand/decimal separator you use (you can change those under options). If you use a currency symbol that is not known to Kiu ERP, it might not be recognized as a number though and it will crash.
Examples of supported numbers (using thirty-two thousands as an example):
- 32.000,00
- 32000,00
- 32.000,00
- -32000,00
- (32000.00)
- $ 32.000,00
- (32000.00 €)
Example that will not work:
về các trường hợp hệ thống không thể nhận dạng:
- ABC 32.000,00
- (32.000,00) $
What can I do when the Import preview table isn't displayed correctly?
By default the Import preview is set on commas as field separators and quotation marks as text delimiters. If your csv file does not have these settings, you can modify the File Format Options (displayed under the Browse CSV file bar after you select your file).
Note that if your CSV file has a tabulation as separator, Kiu ERP will not detect the separations. You will need to change the file format options in your spreadsheet application. See the following question.
How can I change the CSV file format options when saving in my spreadsheet application?
If you edit and save CSV files in speadsheet applications, your computer's regional settings will be applied for the separator and delimiter. We suggest you use OpenOffice or LibreOffice Calc as they will allow you to modify all three options (in 'Save As' dialog box > Check the box 'Edit filter settings' > Save).
Microsoft Excel will allow you to modify only the encoding when saving (in 'Save As' dialog box > click 'Tools' dropdown list > Encoding tab).
What's the difference between Database ID and External ID?
Some fields define a relationship with another object. For example, the country of a contact is a link to a record of the 'Country' object. When you want to import such fields, Kiu ERP will have to recreate links between the different records. To help you import such fields, Kiu ERP provides 3 mechanisms. You must use one and only one mechanism per field you want to import.
For example, to reference the country of a contact, Kiu ERP proposes you 3 different fields to import:
- Country: the name or code of the country
- Country/Database ID: the unique Kiu ERP ID for a record, defined by the ID postgresql column
- Country/External ID: the ID of this record referenced in another application (or the .XML file that imported it)
Trong For the country Belgium, you can use one of these 3 ways to import:
- Country: Belgium
- Country/Database ID: 21
- Country/External ID: base.be
According to your need, you should use one of these 3 ways to reference records in relations. Here is when you should use one or the other, according to your need:
- • Use Country: This is the easiest way when your data come from CSV files that have been created manually.
- • Use Country/Database ID: You should rarely use this notation. It's mostly used by developers as it's main advantage is to never have conflicts (you may have several records with the same name, but they always have a unique Database ID)
- • Use Country/External ID: Use External ID when you import data from a third party application.
When you use External IDs, you can import CSV files with the "External ID" column to define the External ID of each record you import. Then, you will be able to make a reference to that record with columns like "Field/External ID". The following two CSV files give you an example for Products and their Categories.
CSV file for categories.
CSV file for Products.
What can I do if I have multiple matches for a field?
If for example you have two product categories with the child name "Sellable" (ie. "Misc. Products/Sellable" & "Other Products/Sellable"), your validation is halted but you may still import your data. However, we recommend you do not import the data because they will all be linked to the first 'Sellable' category found in the Product Category list ("Misc. Products/Sellable"). We recommend you modify one of the duplicates' values or your product category hierarchy.
However if you do not wish to change your configuration of product categories, we recommend you use make use of the external ID for this field 'Category'.
How can I import a many2many relationship field (e.g. a customer that has multiple tags)?
The tags should be separated by a comma without any spacing. For example, if you want your customer to be linked to both tags 'Manufacturer' and 'Retailer' then you will encode "Manufacturer,Retailer" in the same column of your CSV file.
CSV file for Manufacturer, Retailer.
How can I import a one2many relationship (e.g. several Order Lines of a Sales Order)?
Nếu bạn muốn import Đơn bán hàng có một số khoản mục; với mỗi dòng khoản mục, bạn cần dành một hàng riêng trong file CSV. Dòng lệnh đầu tiên sẽ được nhập vào cùng hàng với các thông tin liên quan đến đơn hàng. Bất kỳ dòng bổ sung nào sẽ cần một hàng bổ sung mà không có bất kỳ thông tin trong các trường liên quan đến đơn hàng. Ví dụ, đây là tập tin purchase.order_functional_error_line_cant_adpat.CSV của một số trích dẫn bạn có thể nhập, dựa trên dữ liệu demo.
File for some Quotations.
Các file CSV sau đây cho thấy làm thế nào để nhập khẩu các lệnh mua với chi tiết đơn đặt hàng tương ứng:
Lệnh mua với chi tiết đơn đặt hàng tương ứng.
Các file CSV sau đây cho thấy làm thế nào để nhập liệu khách hàng và liên hệ tương ứng:
Khách hàng và liên hệ tương ứng.
Tôi có thể nhập nhiều lần cùng một bản ghi?
Nếu bạn nhập file có chứa một trong các cột “ID bên ngoài” hoặc “ID Cơ sở dữ liệu”, bản ghi đã được nhập sẽ được sửa đổi thay vì được tạo mới. Điều này là rất hữu ích vì nó cho phép bạn nhập nhiều lần một file CSV trong khi thay đổi giữa hai lần nhập. Kiu ERP sẽ quyết định tạo mới hoặc sửa đổi mỗi bản ghi phụ thuộc vào việc bản ghi là mới hay cũ.
Tính năng này cho phép bạn sử dụng các công cụ Import / kết xuất của Kiu ERP để sửa đổi một loạt các bản ghi trong ứng dụng bảng tính yêu thích.
Điều gì xảy ra nếu tôi không nhập giá trị cho một trường cụ thể?
Nếu bạn không đặt tất cả các lĩnh vực trong tập tin CSV của bạn, Kiu ERP sẽ gán giá trị mặc định cho tất cả các trường không xác định. Nhưng nếu bạn thiết lập các lĩnh vực với giá trị sản phẩm nào trong tập tin CSV của bạn, Kiu ERP sẽ thiết lập giá trị EMPTY trong trường này, thay vì gán giá trị mặc định.
Làm thế nào để kết xuất / nhập các bảng khác nhau từ ứng dụng SQL với Kiu ERP?
Nếu bạn cần nhập dữ liệu từ các bảng khác nhau, bạn sẽ phải tạo lại mối quan hệ giữa các bản ghi thuộc các bảng khác nhau. (Ví dụ: nếu bạn nhập công ty và người, bạn sẽ phải tạo sự liên kết giữa từng cá nhân và công ty của họ).
Để quản lý mối quan hệ giữa các bảng, bạn có thể sử dụng tính năng “ID Bên ngoài” của Kiu ERP. “ID bên ngoài” của một bản ghi là định danh duy nhất của bản ghi này trong ứng dụng khác. “ID Bên ngoài” này phải là duy nhất giữa tất cả bản ghi của mọi đối tượng, do đó, “ID Bên ngoài” nên bắt đầu bằng tên của ứng dụng hoặc bảng. (Như 'COMPANY_1', 'PERSON_1' thay vì '1')
Ví dụ, giả sử bạn có một cơ sở dữ liệu SQL với hai bảng mà bạn muốn nhập khẩu: công ty và cá nhân. Mỗi cá nhân thuộc về một công ty, vì vậy bạn sẽ phải tạo sự liên kết giữa cá nhân và công ty của người đó. (Nếu bạn muốn kiểm chứng ví dụ này, đây là <a href=”/base_import/static/csv/database_import_test.sql”> kho chứa cơ sở dữ liệu PostgreSQL như vậy</a> )
Đầu tiên chúng ta sẽ kết xuất tất cả các công ty và “ID ngoài” tương ứng. Trong PSQL, viết câu lệnh sau:
> copy (select 'company_'||id as "External ID",company_name as "Name",'True' as "Is a Company" from companies) TO '/tmp/company.csv' with CSV HEADER;
Lnh SQL này sẽ tạo ra các file CSV sau đây:
ID bên ngoài, tên là một công ty
company_1,Bigees,True
company_2,Organi,True
company_3,Boum,True
Để tạo ra file CSV cho các cá nhân, liên kết với các công ty, chúng tôi sẽ sử dụng các lệnh SQL sau đây trong PSQL:
> copy (select 'person_'||id as "External ID",person_name as "Name",'False' as "Is a Company",'company_'||company_id as "Related Company/External ID" from persons) TO '/tmp/person.csv' with CSV
Nó sẽ tạo ra các file CSV sau đây:
ID bên ngoài, tên, là một Công ty, Công ty liên quan / ID ngoài
person_1,Fabien,False,company_1
person_2,Laurence,False,company_1
person_3,Eric,False,company_2
person_4,Ramsy,False,company_3
Như bạn có thể thấy trong file này, Fabien và Laurence đang làm việc cho công ty Bigees (COMPANY_1) và Eric đang làm việc cho công ty Organi. Liên kết mối quan hệ giữa cá nhân và công ty được thực hiện bằng cách sử dụng ID bên ngoài của các công ty. Chúng tôi đã có tiền tố "ID bên ngoài" bằng tên của bảng để tránh một cuộc xung đột của ID giữa người và công ty (PERSON_1 và COMPANY_1 người chia sẻ cùng một ID 1 trong các cơ sở dữ liệu orignial).
Hai tập tin được sản xuất sẵn sàng để được nhập khẩu trong Kiu ERP mà không sửa đổi gì. Sau khi nhập hai file CSV, bạn sẽ có 4 liên hệ và 3 công ty. (Hai liên hệ đầu tiên được liên kết với công ty đầu tiên). Trước tiên, bạn phải nhập các công ty và sau đó là người.