Mysql
如何將客戶導入 dolibarr
我有一張粗略的準備好的桌子:
mysql> mysql> show tables; +----------------------+ | Tables_in_businesses | +----------------------+ | 2017july | +----------------------+ 1 row in set (0.00 sec) mysql> mysql> describe 2017july; +--------------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+-------------+------+-----+---------+-------+ | business | varchar(45) | YES | | NULL | | | product | varchar(45) | YES | | NULL | | | unit | varchar(45) | YES | | NULL | | | house | varchar(45) | YES | | NULL | | | road | varchar(45) | YES | | NULL | | | postal | varchar(45) | YES | | NULL | | | phnum | varchar(45) | YES | | NULL | | | emps | varchar(45) | YES | | NULL | | | town | varchar(45) | YES | | NULL | | | typebusiness | varchar(45) | YES | | NULL | | +--------------+-------------+------+-----+---------+-------+ 10 rows in set (0.01 sec) mysql>
導出到 LibreOffice 等沒有問題,但導入說明只有法語。或者,建議的 PHP腳本將從數據文件導入——但具有非常特定的結構。
我應該如何修改架構以適應 dolibarr?
可能有一些替代工具來導入客戶?我已經啟用了
Projects/Opportunities/Leads
和Third parties
模組。Dolibarr更複雜一點:
mysql> mysql> use dolibarr; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> mysql> show tables; +-----------------------------------------+ | Tables_in_dolibarr | +-----------------------------------------+ | llx_accounting_account | | llx_accounting_bookkeeping | | llx_accounting_fiscalyear | | llx_accounting_journal | | llx_accounting_system | | llx_actioncomm | | llx_actioncomm_extrafields | | llx_actioncomm_resources | | llx_adherent | | llx_adherent_extrafields | | llx_adherent_type | | llx_adherent_type_extrafields | | llx_advtargetemailing | | llx_bank | | llx_bank_account | | llx_bank_account_extrafields | | llx_bank_categ | | llx_bank_class | | llx_bank_url | | llx_bookmark | | llx_bordereau_cheque | | llx_boxes | | llx_boxes_def | | llx_budget | | llx_budget_lines | | llx_c_accounting_category | | llx_c_action_trigger | | llx_c_actioncomm | | llx_c_availability | | llx_c_barcode_type | | llx_c_chargesociales | | llx_c_civility | | llx_c_country | | llx_c_currencies | | llx_c_departements | | llx_c_ecotaxe | | llx_c_effectif | | llx_c_email_templates | | llx_c_field_list | | llx_c_format_cards | | llx_c_forme_juridique | | llx_c_holiday_types | | llx_c_hrm_department | | llx_c_hrm_function | | llx_c_incoterms | | llx_c_input_method | | llx_c_input_reason | | llx_c_lead_status | | llx_c_paiement | | llx_c_paper_format | | llx_c_payment_term | | llx_c_price_expression | | llx_c_price_global_variable | | llx_c_price_global_variable_updater | | llx_c_propalst | | llx_c_prospectlevel | | llx_c_regions | | llx_c_revenuestamp | | llx_c_shipment_mode | | llx_c_stcomm | | llx_c_tva | | llx_c_type_contact | | llx_c_type_fees | | llx_c_type_resource | | llx_c_typent | | llx_c_units | | llx_c_ziptown | | llx_categorie | | llx_categorie_account | | llx_categorie_contact | | llx_categorie_fournisseur | | llx_categorie_lang | | llx_categorie_member | | llx_categorie_product | | llx_categorie_project | | llx_categorie_societe | | llx_categorie_user | | llx_categories_extrafields | | llx_chargesociales | | llx_commande | | llx_commande_extrafields | | llx_commande_fournisseur | | llx_commande_fournisseur_dispatch | | llx_commande_fournisseur_extrafields | | llx_commande_fournisseur_log | | llx_commande_fournisseurdet | | llx_commande_fournisseurdet_extrafields | | llx_commandedet | | llx_commandedet_extrafields | | llx_const | | llx_contrat | | llx_contrat_extrafields | | llx_contratdet | | llx_contratdet_extrafields | | llx_contratdet_log | | llx_cronjob | | llx_deplacement | | llx_document_model | | llx_don | | llx_don_extrafields | | llx_ecm_directories | | llx_ecm_files | | llx_element_contact | | llx_element_element | | llx_element_resources | | llx_element_tag | | llx_entrepot | | llx_establishment | | llx_event_element | | llx_events | | llx_expedition | | llx_expedition_extrafields | | llx_expeditiondet | | llx_expeditiondet_batch | | llx_expeditiondet_extrafields | | llx_expensereport | | llx_expensereport_det | | llx_expensereport_extrafields | | llx_export_compta | | llx_export_model | | llx_extrafields | | llx_facture | | llx_facture_extrafields | | llx_facture_fourn | | llx_facture_fourn_det | | llx_facture_fourn_det_extrafields | | llx_facture_fourn_extrafields | | llx_facture_rec | | llx_facturedet | | llx_facturedet_extrafields | | llx_facturedet_rec | | llx_fichinter | | llx_fichinter_extrafields | | llx_fichinterdet | | llx_fichinterdet_extrafields | | llx_holiday | | llx_holiday_config | | llx_holiday_logs | | llx_holiday_users | | llx_import_model | | llx_links | | llx_livraison | | llx_livraison_extrafields | | llx_livraisondet | | llx_livraisondet_extrafields | | llx_loan | | llx_localtax | | llx_mailing | | llx_mailing_cibles | | llx_menu | | llx_multicurrency | | llx_multicurrency_rate | | llx_notify | | llx_notify_def | | llx_oauth_state | | llx_oauth_token | | llx_opensurvey_comments | | llx_opensurvey_formquestions | | llx_opensurvey_sondage | | llx_opensurvey_user_formanswers | | llx_opensurvey_user_studs | | llx_overwrite_trans | | llx_paiement | | llx_paiement_facture | | llx_paiementcharge | | llx_paiementfourn | | llx_paiementfourn_facturefourn | | llx_payment_donation | | llx_payment_expensereport | | llx_payment_loan | | llx_payment_salary | | llx_prelevement_bons | | llx_prelevement_facture | | llx_prelevement_facture_demande | | llx_prelevement_lignes | | llx_prelevement_rejet | | llx_printing | | llx_product | | llx_product_association | | llx_product_batch | | llx_product_customer_price | | llx_product_customer_price_log | | llx_product_extrafields | | llx_product_fournisseur_price | | llx_product_fournisseur_price_log | | llx_product_lang | | llx_product_lot | | llx_product_lot_extrafields | | llx_product_price | | llx_product_price_by_qty | | llx_product_pricerules | | llx_product_stock | | llx_product_warehouse_properties | | llx_projet | | llx_projet_extrafields | | llx_projet_task | | llx_projet_task_extrafields | | llx_projet_task_time | | llx_propal | | llx_propal_extrafields | | llx_propal_merge_pdf_product | | llx_propaldet | | llx_propaldet_extrafields | | llx_resource | | llx_resource_extrafields | | llx_rights_def | | llx_societe | | llx_societe_address | | llx_societe_commerciaux | | llx_societe_extrafields | | llx_societe_log | | llx_societe_prices | | llx_societe_remise | | llx_societe_remise_except | | llx_societe_rib | | llx_socpeople | | llx_socpeople_extrafields | | llx_stock_mouvement | | llx_subscription | | llx_supplier_proposal | | llx_supplier_proposal_extrafields | | llx_supplier_proposaldet | | llx_supplier_proposaldet_extrafields | | llx_tva | | llx_user | | llx_user_alert | | llx_user_clicktodial | | llx_user_employment | | llx_user_extrafields | | llx_user_param | | llx_user_rib | | llx_user_rights | | llx_usergroup | | llx_usergroup_extrafields | | llx_usergroup_rights | | llx_usergroup_user | | llx_website | | llx_website_page | +-----------------------------------------+ 238 rows in set (0.00 sec) mysql>
也許複製結構
llx_societe
並在那裡載入數據?我什至不確定某些表名是什麼意思——這似乎很尷尬。一定有我缺少的工具或成語。啊….不知道我必須啟用
Data Imports
外掛才能獲得嚮導:
這是神奇地翻譯成英文的頁面:https ://translate.google.com/translate?hl=en&sl=auto&tl=en&u=https%3A%2F%2Fwiki.dolibarr.org%2Findex.php%2FImporter_des_donn%25C3%25A9es_avec_OpenOffice .
最快的方法是執行類似這樣的 SQL 命令:
INSERT INTO dolibarr.llx_societe SELECT /*choose fields here*/ from businesses.2017july;
或使用https://www.dolibarr.org/57-documentation/features/231-import-export中描述的嚮導。
https://www.dolibarr.org/forum/12-howto-help/27371-why-is-importing-so-impossibly-difficult#31833有一些提示。