Where can I find the sql commands

Asked by Richard Lundberg

I am trying to upgrade a database from 6.01 to 6.1. My 6.01 installation was on an old server. I have 6.1 installed on a new server and am trying just to migrate the database. I am 90% of the way there (before I discovered this project) and most of it is running OK. I have one error in one of the views (customer) which I believe to be a database issue. What I wanted to find here is a list of the sql commands the upgrade executes to update the database to see which I might have missed, but I cannot find it in the source. Can you point me to the right file for the script.

Question information

Language:
English Edit question
Status:
Solved
For:
OpenUpgrade Server Edit question
Assignee:
No assignee Edit question
Solved by:
Richard Lundberg
Solved:
Last query:
Last reply:
Revision history for this message
Holger Brunn (Therp) (hbrunn) said :
#1

The upgrade server scarcely issues any SQL commands on its own - where possible, changes are done via the ORM. You could run a migration for a copy of your 6.01 database with the parameter --log-level=debug_sql and grep for ir_ui_view
Be prepared to dig through a lot of statements, with not all of them being related to the migration itself.

Given that you have problems with only one view, I highly doubt that the problem is database related btw.

Revision history for this message
Richard Lundberg (w-richard-p) said :
#2

Thanks for your quick response, if you think it may not be database related, do you have any other pointers as to where to look. The view in question is the top half of the partner view, it is missing, there is no Partner Name, Default Language etc. The related contacts are shown, but no the other tabs (sales and purchases, Accounting, Notes). I get the following error.

TypeError: this.viewmanager is undefined

http://www.xxx.fr:8069/web/static/src/js/view_form.js?debug=1329783586.0:2505

The only reason I thought is was the database, is that with the same installation, I created a new database with demo data, and all is fine

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) said :
#3

Hi Richard,

just to see if there is a usual suspect involved, could you post a list of installed modules (in the 6.0 version) and the server log of the upgrade run with log_level = debug? You can post it privately through our Launchpad accounts if you like.

Cheers,
Stefan.

Revision history for this message
Richard Lundberg (w-richard-p) said :
#4

Hi Stefan,

Thanks for the reply. There are some further things I have discovered. If I try and add an address, the content is not saved. However, if I use the GTK Client - v6.1.1, the partner view works, and I can enter data (adresses without problem and the content is saved. If I use the GDK client, I do get the following message

View Error!

 Form view has duplicate field: emails
 Model: res.partner
 View: res.partner.form
 The duplicated fields will be simply ignored !

Here is the list of modules of the 6.01 install. (I will run the upgrade a soon as i can.)

Thanks again,

Richard.
account
account_accountant
account_cancel
account_chart
account_followup
account_invoice_layout
account_payment
account_voucher
analytic
base
base_action_rule
base_calendar
base_iban
base_report_designer
base_setup
base_tools
base_vat
board
crm
decimal_precision
delivery
document
email_account
email_sale
email_template
google_map
hr
hr_attendance
hr_contract
hr_expense
hr_holidays
hr_payroll
hr_payroll_account
hr_timesheet
hr_timesheet_invoice
hr_timesheet_sheet
knowledge
l10n_fr
mail_gateway
marketing
marketing_campaign
mrp
process
procurement
product
product_visible_discount
profile_tools
purchase
purchase_approve
purchase_requisition
report_designer
resource
sale
sale_crm
sale_layout
smtpclient
stock
stock_invoice_directly
stock_location
web_livechat

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) said :
#5

Hi Richard,

see the list of currently supported modules below. Some of your modules are not covered but I think the problem is rather that your 6.0 installation may include modules that are obsolete and need to be deïnstalled manually. Try to find out in Administration -> Customization -> Views which view is adding the duplicate emails field, then you have a clue what to look for in the modules. Keep us updated!

Cheers,
Stefan.

account_accountant
account_analytic_analysis
account_analytic_default
account_analytic_plans
account_budget
account_cancel
account_chart
account_followup
account
account_voucher
analytic
analytic_user_function
audittrail
base
base_action_rule
base_calendar
base_contact
base_crypt
base_iban
base_report_designer
base_setup
base_tools
base_vat
board
crm
decimal_precision
email_template
hr_attendance
hr_contract
hr_expense
hr
hr_timesheet_invoice
hr_timesheet
hr_timesheet_sheet
knowledge
mail
mrp
process
procurement
project
project_retro_planning
project_timesheet
purchase
resource
sale
stock
wiki

Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) said :
#6

BTW Richard, I had not seen that did not use this project for migrating your database! My answer may not apply then.

Revision history for this message
Richard Lundberg (w-richard-p) said :
#7

The module mail_gateway in version 6.0.3 became mail in 6.1. This created a duplicate view: res.partner.emails.info.inherit which defined the field Emails.

Deleted the mail_gateway version of the view and all OK.

Still one point of confusion, your module list has the module mail, and I have an addons folder "mail" (from which the view res.partner.emails.info.inherit was created , but I do not have i listed as an installed module. I do have the module fetchmail, (with the appropriate folder in addons.)

Revision history for this message
Richard Lundberg (w-richard-p) said :
#8

Just updated modules list and found it....