IRC logs of #tryton for Sunday, 2012-01-29 #tryton log beginning Sun Jan 29 00:00:02 CET 2012
-!- udono( has left #tryton13:06
gltrippcan somebody help me with upgrading from 1.8 to 2.2 ?14:52
gltrippi get some errors with the table "ir_translation" while running an upgrade... :-(14:53
cedkgltripp: what is the error?14:55
gltripp[Sun Jan 29 14:04:01 2012] WARNING:init:Unable to set column src_md5 of table ir_translation not null !14:55
gltrippmy database is from version 1.814:56
gltrippcan i upgrade with 2.2 or do i have to upgrade 1.8 to 2.0 and then 2.0 to 2.2 ?14:56
cedkgltripp: you can14:57
cedkgltripp: the warning should not be an issue, did the column filled?14:58
gltrippthe column does not exist15:00
cedkgltripp: very strange15:01
cedkgltripp: it doesn't exist after the migration?15:01
gltrippit does not exist before the migration15:01
cedkgltripp: that's normal15:02
gltrippi'm reinstalling all python modules now15:03
gltrippan then, i'll retry an database-migration via "trytond -d <dbname> -u all"15:03
gltrippok, migration is running15:06
gltripp[Sun Jan 29 15:11:00 2012] ERROR:sql:Wrong SQL: ALTER TABLE "ir_model_field" ADD FOREIGN KEY ("model") REFERENCES "ir_model" ON DELETE CASCADE15:14
gltripppsycopg2.IntegrityError: FEHLER:  Einfügen oder Aktualisieren in Tabelle »ir_model_field« verletzt Fremdschlüssel-Constraint »ir_model_field_model_fkey«15:14
gltrippDETAIL:  Schlüssel (model)=(259) ist nicht in Tabelle »ir_model« vorhanden.15:14
gltrippany ideas ?15:21
cedkgltripp: your data seems corrupted16:01
cedkgltripp: the foreign key should exist since day one16:01
gltrippthats strange16:08
gltrippthe database is working with 1.816:08
cedkgltripp: this error doesn't prevent trytond to work16:14
cedkgltripp: but you must have a wrong record in the table ir_model_field16:14
gltrippcedk: whats better: add the column by hand - or - fix ir_model_field ?16:26
cedkgltripp: fix ir_model_field, find the record with the wrong model value16:26
gltrippi'm not very familiar with all the model relationships16:37
gltrippah, i think i got the recoed16:39
gltrippit was a record about an "id" field16:41
cedkgltripp: from which model?16:45
gltrippthere was no record in ir_model with this foreign key...16:48
cedkgltripp: and in the field relation?16:50
gltripphere are some other "broken" records with non existing references16:51
gltrippsome of them have "res.user" the field relations16:52
cedkgltripp: what are the names?16:56
gltripp"rec_name" (relation = null)16:59
gltripp"create_uid" (relation = res.user)16:59
gltripp"domain" (relation = null)16:59
cedkgltripp: this is very strange17:00
gltrippcreate_date, nodes, model, id and child_name  (rel = null)17:00
cedkgltripp: since when do you have the database?17:00
gltrippsince... 2 years ?17:00
gltrippmaybe i should stard with a fresh database and try to import my data to it ?17:01
cedkgltripp: which version?17:04
cedkgltripp: importing is much more work17:05
gltrippthis database runs with 1.8 without known problems17:05
gltrippmaybe i could do the following:17:05
gltripp1. dump data from the 1.8 database17:05
gltripp2. start with a new 1.8 database17:06
junkfilterhi, i do have some problems connecting to the demo server mentoined on the homepage with my tryton client (lastest, linuxmint 12). the default profile isnt working, if i add a profile with the informations mentoined on the homepage (dbname is missing!) it trys to fetch the available databases without luck (and does not timeout).17:06
gltripp3. import the module's data via sql (nothing from the ir.* stuff)17:06
cedkgltripp: I don't know17:08
cedkjunkfilter: demo server works17:09
junkfilterhmmmm strange. but there is no other package i need than tryton-client? (deb/ubuntu) i guess apt-get would have caught the dependencies :)17:11
cedkjunkfilter: I don't know ubuntu17:12
junkfilterdo you now the lastest dbname? demo, demo2.2?17:13
cedkjunkfilter: it is in the profile17:15
junkfilterah right, and because the profile says host: and the website says and there is a 2.2 branch i can totally trust the default profile. that's the point, the default profile is not working and its definitely not my router/firewall. and because the profile from is not working I came here :)17:19
junkfilterbut you said the demo server is working so, yeah, i don't know. thanks for the info. now i can at least be sure i'm not trying to connect to a shutdown server17:20
cedkjunkfilter: you don't have the last version which is 2.217:26
junkfilterm( oh boy ... i didnt think of that. is there no v2.0 database active? sad, sad. okay, seems like i have to build the client myself17:31
junkfilterthanks for the hint17:31
cedkjunkfilter: I just check 2.0 is down17:32
cedkjunkfilter: it is up now17:37
junkfilterwoohoo thanks a lot. i was just digging in the manual for manual installing from the repos. but thats much easier :)17:40
gltrippre-importing only the data from ir_* tables seems to be hard work :-/19:15
gltrippcedk ?19:27
cedkgltripp: yes19:28
gltrippi've installed a backup from my 1.8 database19:29
gltrippand on the first look, it seems that there are no inconstientcies19:30
gltrippselect * from ir_model;19:31
gltrippwhere id not in (select model from ir_model_field mf group by model order by model )19:31
gltrippno results19:31
cedkgltripp: the query should be in the other way19:32
gltrippis there an option to get the sql-statements that an migration would execute?19:33
gltripplike a dump?19:33
cedkgltripp: you can put print in trytond/backend/postgresql/database.py19:34
gltrippselect * from ir_model_field19:34
gltrippwhere model not in (select id from ir_model)19:34
gltrippno results either19:35
gltrippis this good ?19:36
cedkgltripp: yeps, do you have the foreign key?19:37
gltrippforeign key of what ?19:37
cedkfrom ir_model_field to ir_model19:38
gltrippyou mean the contraint ?19:39
cedkgltripp: yes a foreign key19:41
gltrippALTER TABLE ir_model_field19:42
gltripp  ADD CONSTRAINT ir_model_field_model_fkey FOREIGN KEY (model)19:42
gltripp      REFERENCES ir_model (id) MATCH SIMPLE19:42
gltrippthis contraint is installed on the db19:42
cedkgltripp: so how could it be delete during the migration?19:43
gltrippshould i insert the print-statement and re-run the migration ?19:47
cedkgltripp: run the migration, there is no reason to have the foreign key dropped19:48
gltrippi'll try it19:48
gltripp[Sun Jan 29 20:47:05 2012] WARNING:init:Unable to set column src_md5 of table ir_translation not null !20:48
gltrippTry to re-run: --update=module20:48
gltrippIf it doesn't work, update records and execute manually:20:48
gltrippALTER TABLE "ir_translation" ALTER COLUMN "src_md5" SET NOT NULL20:48
gltripp  Transaction().set_context(self._context)):20:48
cedkgltripp: this is normal, after migration the column must be filled20:49
cedkgltripp: it is just a warning20:49
gltripp*migration is still running*20:49
gltrippthats getting wired21:16
gltrippALTER TABLE "stock_shipment_in" ALTER COLUMN "company" SET NOT NULL21:16
gltrippWrong SQL: SELECT "stock_move".id AS id,"stock_move"."create_date" AS "create_date","stock_move"."planned_date" AS "planned_date","stock_move"."write_uid" AS "write_uid","stock_move"."currency" AS "currency","stock_move"."create_uid" AS "create_uid","stock_move"."shipment_internal" AS "shipment_internal","stock_move"."unit_price" AS "unit_price","stock_move"."state" AS "state","stock_move"."effective_date" AS "effective_date","stock_move"."shipment_in_21:16
gltrippTraceback (most recent call last):21:16
gltripppsycopg2.ProgrammingError: FEHLER:  Spalte stock_move.internal_quantity existiert nicht21:17
gltrippLINE 1: ...S "uom","stock_move"."cost_price" AS "cost_price","stock_mov...21:17
cedkgltripp: don't copy/paste in channel, use pastebin21:18
gltripp k21:18
cedkgltripp: this is a migration bug21:24
cedkgltripp: please fill an issue21:25
cedkgltripp: indeed you could make the migration to 2.0 and after 2.2 to skip this issue21:54
jamilhi all22:45
jamilzodman: are you deploying module account to  México?22:47
cedkgltripp: did you fill the issue?22:55

Generated by 2.11.0 by Marius Gedminas - find it at!