Open alexander-arce opened 8 years ago
What command did you try running, or was it via Ruby code? That error makes me think that it's trying to import all tables
Hi @cheerfulstoic I try running _neo4apis activerecord models posorder --neo4j-url "http://xxxx:xx@localhost:7474" --identify-model --import-all-associations --debug Debug message is:
Importing tables: pos_order include_list [:account_invoice, :account_journal, :account_move, :pos_order_lines, :pos_order_line_commissions, >:account_bank_statement_lines, :pos_session, :product_pricelist, :res_company, :res_partner, >:res_user, :sale_shop, :stock_picking]
Error message:
/home/aletz/.rvm/gems/ruby-2.2.0/gems/neo4apis-0.8.2/lib/neo4apis/base.rb:35:in
add_node': No UUID specified for label
AccountJournal(ArgumentError) from /home/aletz/.rvm/gems/ruby-2.2.0/gems/neo4apis-activerecord-0.9.1/lib/neo4apis/activerecord.rb:63:in
add_model_node' from /home/aletz/.rvm/gems/ruby-2.2.0/gems/neo4apis-activerecord-0.9.1/lib/neo4apis/activerecord.rb:51:inadd_model_relationship' from /home/aletz/.rvm/gems/ruby-2.2.0/gems/neo4apis-activerecord-0.9.1/lib/neo4apis/activerecord.rb:35:in
block (2 levels) in model_importer' from /home/aletz/.rvm/gems/ruby-2.2.0/gems/neo4apis-activerecord-0.9.1/lib/neo4apis/activerecord.rb:30:ineach' from /home/aletz/.rvm/gems/ruby-2.2.0/gems/neo4apis-activerecord-0.9.1/lib/neo4apis/activerecord.rb:30:in
block in model_importer' Thanks
Ah, got it, I think it's because it's trying to load associations. In this case the PosJournal
model (I think) has an association to the AccountJournal
.
Is account_journal
a many-to-many table, maybe? Does it have a primary key?
Yes PosOrder has an association to the AccountJournal. AccountJournal has a primary key. I'm attaching files for model definition according to debug message. pos_order.txt account_bank_statement_line.txt account_invoice.txt account_journal.txt account_move.txt pos_order_line.txt pos_order_line_commission.txt pos_session.txt product_pricelist.txt res_company.txt res_partner.txt res_user.txt sale_shop.txt stock_picking.txt
Sql definition for AccountJournal: account_journal.sql.txt
I attach images of relations for pos_order
Foreign keys Dependencies
Hi, I try to import data from OpenErp/Odoo. Models are generated using Rmre. In my test, i want import data only from pos_order model, but process fail with message
No UUID specified for label
AccountJournal
Anyone trying to import data from OpenErp/Odoo?