IRC logs of #tryton for Friday, 2013-02-22

chat.freenode.net #tryton log beginning Fri Feb 22 00:00:01 CET 2013
2013-02-22 00:34 <plantian> cedk: purge all the entries in ir.model.data?
2013-02-22 00:34 <plantian> *delete
2013-02-22 00:34 <cedk> plantian: no, otherwise it will create duplicate
2013-02-22 00:35 <plantian> cedk: I guess I don't understand. What should I do then?
2013-02-22 00:35 <cedk> plantian: I'm speaking about the values column
2013-02-22 00:35 <plantian> cedk: I should write a script to read each one and change the id values in place and write them back?
2013-02-22 00:36 <cedk> plantian: I'm speaking about the values column
2013-02-22 00:38 <plantian> cedk: Yes, read each entry in ir.model.data to get the values column, update the ids inside that column and then write the column back.
2013-02-22 00:40 <plantian> cedk: This is what I had so far for fixing the foreign keys: https://gist.github.com/ianjosephwilson/5009477
2013-02-22 00:42 <cedk> plantian: I think you can just set it to null
2013-02-22 00:43 <plantian> cedk: okay i think maybe the issue is that i fix the ids of the tables and then it skips updating the model data for the table because I wrote to the table, is that possible?
2013-02-22 00:43 <cedk> plantian: possible
2013-02-22 00:44 <plantian> cedk: I tried to set the write_date to the create_date, is it checking the write date?
2013-02-22 00:44 <cedk> plantian: no
2013-02-22 00:48 <cedk> plantian: I think the last solution would be to delete every ir.action* entries and their coresponding entries in ir.model.data, then run an update
2013-02-22 00:50 <plantian> cedk: How can I tell which entries in ir.model.data correspond to entries in ir.action.*?
2013-02-22 00:52 <plantian> Is there something more straight forward than deciphering the different patterns of values column and try to find a backlink?
2013-02-22 00:56 <cedk> plantian: there is the column model
2013-02-22 00:56 <cedk> plantian: I guess you do all of that on a test database?
2013-02-22 00:57 <plantian> cedk: yes, I have many databases and tryton environments
2013-02-22 00:58 <plantian> and scripts to rebuild development environment so i can change included modules
2013-02-22 00:58 <plantian> it takes a long time
2013-02-22 01:02 <plantian> cedk: I will try those two things each separately, setting column to null and running update and also try removing the model data entires for the actions, thanks.
2013-02-22 13:58 <sharoonthomas> is there any example of a migration from float8 to numeric within the tryton source code ?
2013-02-22 14:01 <cedk> sharoonthomas: I don't think
2013-02-22 14:01 <sharoonthomas> cedk: any tips ?
2013-02-22 14:11 <cedk> sharoonthomas: I guess you can CAST it
2013-02-22 14:11 <sharoonthomas> cedk: looks like the best thing to do
2013-02-22 14:11 <cedk> sharoonthomas: but I guess you can not do it in plcae
2013-02-22 14:11 <sharoonthomas> cedk: is there a plan to have test_buttons ?
2013-02-22 14:11 <sharoonthomas> cedk: yes, a new column will be required
2013-02-22 14:26 <cedk> sharoonthomas: what are you talking about?
2013-02-22 14:30 <sharoonthomas> cedk: just as we have test_views and test_depends do you think we can have a test buttons, which checks that the button is added to _buttons and hence rpc
2013-02-22 14:30 <sharoonthomas> cedk: may be it could be a part of test_views itself, just as it checks for fields
2013-02-22 14:31 <cedk> sharoonthomas: I don't know, you could want to manage buttons differently
2013-02-22 14:32 <cedk> sharoonthomas: need to check the code if it is possible
2013-02-22 14:33 <sharoonthomas> cedk: something like this ? http://hg.tryton.org/2.6/trytond/file/271dd306761f/trytond/protocols/dispatcher.py#l112
2013-02-22 14:33 <cedk> plantian: next time, it is better to update the existing review than creating a new one
2013-02-22 14:34 <cedk> sharoonthomas: I don't remember if you can have button in view without having it registered in _buttons
2013-02-22 14:48 <jcav> cedk: I'm almost sure you can. I'va had numerous 'Calling method <func_name> is not allowed on object..."
2013-02-22 14:50 <cedk> jcav: so it is the opposite, you can not
2013-02-22 14:51 <jcav> cedk: Well, you can have a button in the view (the view will validate), but the button will not work when clicked
2013-02-22 14:53 <cedk> jcav: so it is pointless
2013-02-22 14:54 <jcav> cedk: Indeed. So it should be checked by test_views / sharoonthomas' test_buttons
2013-02-22 14:58 <shalabhaggarwal> cedk: sharoonthomas: +1 for test_buttons
2013-02-22 15:04 <cedk> jcav: but I think if you set the method in __rpc__ it works
2013-02-22 15:05 <jcav> cedk: Probably. But the point of testing button is to detect that the method has not been set in __rpc__ when testing, and not having to "discover" it when trying to click it
2013-02-22 23:44 <plantian> When I call save() on an object in proteus does that commit a transaction?

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!