IRC logs of #tryton for Monday, 2013-08-05 #tryton log beginning Mon Aug 5 00:00:01 CEST 2013
corroanyone familiar with the error message 'The field "Model" on "Action keyword" is not in the selection.'? I guess I know what it means, I see the violated field, but I have no idea how to fix it.10:39
cedkcorro: probably a wrong model name11:06
sisalpI cannot get cdecimal installed on Debian 7 nor Ubuntu 12.04, how do you do ?11:18
corrosisalp: pip install cdecimal. What's the problem?11:19
sisalpcorro: error: command 'gcc' failed with exit status 111:20
sisalpcdecimal2.c:29:20: fatal error: Python.h: No such file or directory11:21
corrosisalp: install package python-dev via apt, it includes the header files needed for compilation11:21
sisalpSuccessfully installed cdecimal excellent11:22
sisalpwill update my install script accordingly. Thank you11:23
corrosisalp: np11:24
nicoealbertca: The maps are in catalan, wouldn'it be better to be in english ?11:28
albertcawhat does appear in Catalan?11:29
nicoealbertca: "Sigeu el primer a escriure una ressenya"11:31
nicoealbertca: And on the other map "Itinaris", "Cerca a prop", "més"11:32
nicoealbertca: of course the name of the road must be in catalan :D11:32
sisalplooking for nereid modules for trytond. pypi indicates 2.6 for catalogue and cart. Is it the right place ?11:38
albertcanicoe: should be fixed, now, can you check it please?11:59
nicoealbertca: Now I see it in french I guess that google choose the language from my location/settings, BTW I really like the tryton hand ala parc guell12:00
albertcanicoe: I let to decide the language, instead of hard coding it12:00
albertcanicoe: the hand is a little bit hidden but I like it too :)12:02
sisalptrytond_nereid- from github doesn't install on Tryton 2.812:18
sisalppretty sure I miss the right source. too bad.12:20
sisalpanyone has some nereid working ?12:21
shalabhaggarwalcedk: Hi, I want to compute the price of a product based on price lists but the price lists are not dependent on party which i see is a mandatory parameter to be passed to compute(). What would be the best way to get around this?13:18
cedkshalabhaggarwal: pass None13:26
shalabhaggarwalcedk: thanks!13:28
sisalpsharoon: had some questions about nereid13:44
sharoonthomassisalp: sure13:44
sisalppypi indicates 2.6 for catalogue and cart. Is it the right place to get the code ?13:45
sisalpsharron: and also trytond_nereid- from github doesn't install on Tryton 2.813:49
-!- heg( has left #tryton13:54
sisalpsharoon: In tag record: model ir.action.act_window.view with id act_url_rule_defaults_tree_view2.14:26
pokolicedk: regarding review1008002, when you see the cost should always be set, you mean that the patch must provide a migration script to store all costs to the database?14:48
cedkpokoli: I mean that still having a loop on timesheet lines to sum doesn't fix the problem14:52
pokolicedk: Yes, I understood you, but the problem is when you upgrade a database, the cost field is null for all the rows14:54
pokolicedk: so i'm asking if the patch should also calculate the cost field if there is one row that has a null value14:55
pokolicedk: because your say it should always be set, no problem for new rows because we ensure it, but the problem is for rows that had been created before the patch14:55
cedkpokoli: I don't have a solution14:57
pokolicedk: a proteus script to execute before the database migration would be a good solution?14:58
cedkpokoli: no14:58
cedkpokoli: stop thinking about your patch because you go in a wrong direction14:58
pokolicedk: why???? don't understand you14:59
pokolicedk: so you mean calcullating the cost by and sql query directly?14:59
cedkpokoli: I don't have the solution15:00
pokolicedk: ok no problem, will thing a little about it, but you can tell which you think is the right direction?15:00
cedkpokoli: no I can not, I can just yours is wrong15:01
pokolicedk: ok, don't mind15:01
cedkpokoli: generic rules about cache: the difficulty is invalidation15:02
pokolicedk: i want to replace the loop with and sql query that sums all costs of the lines15:02
pokolicedk: ok so you prefer a chache on the field, and not to store it... But i think that storing it on the database and make a sum of costs will improve it15:05
cedkpokoli: I never say that15:06
cedkpokoli: storing computation == cache15:06
cedkpokoli: indeed, I think the problem should be reversed15:13
cedkpokoli: we should be able to get the cost of an employee over a period as a list of period with different cost15:13
cedkpokoli: then make a SQL query on timesheet lines for each period15:13
pokolicedk: so i think i understand you, will try to work on that way15:17
cedkpokoli: normally the cost of an employee doesn't vary much15:19
pokolicedk: yes, you're absolutly right here15:19
pokolicedk: but i must think about it. If it can be done on the database or if the query must be filtered15:19
pokolicedk: If I understand you right: you don't want to store the cost on the database, you're thinking on calculating it in a bunch of records grouped by the employee cost dates, am I right?15:20
cedkpokoli: yes I think it is easier15:23
cedkpokoli: because the problem always with cache is invalidation15:23
pokolicedk: yes, and I thing that when changing employee costs all the lines on a given period must be invalidated and recalulating, so your proposal makes sense15:24
pokolicedk: as employees costs are modified backwards in the time normally15:24
pokolicedk: thank's for the clarifications15:24
ykarmoutahello everyone15:54
ykarmoutai try to use the model.res.user.create method but every time i have the error : "assert value is not False"15:56
ykarmoutasomeone have an example how to use it ?15:57
cedkykarmouta: could you show the traceback (in a pastebin)15:58
ykarmoutathanks for helping me16:04
ykarmoutamy python script look at this:16:05
ykarmoutaimport xmlrpclib16:05
ykarmoutaPASSWORD = 'xxxxx'16:05
ykarmoutaUSER = "admin"16:05
ykarmoutas = xmlrpclib.ServerProxy ('http://%s:%s@' % (USER, PASSWORD))16:05
ykarmoutacontext = s.model.res.user.get_preferences(True, {})16:05
ykarmoutaand it return this error: [Mon Aug 05 16:03:38 2013] ERROR:dispatcher:Exception calling method create on model res.user from 1@
ykarmoutaTraceback (most recent call last):16:06
ykarmouta  File "/usr/local/lib/python2.7/dist-packages/trytond-2.8.2-py2.7.egg/trytond/protocols/", line 158, in dispatch16:06
ykarmouta    result = rpc.result(meth(*args, **kwargs))16:06
ykarmouta  File "/usr/local/lib/python2.7/dist-packages/trytond-2.8.2-py2.7.egg/trytond/res/", line 214, in create16:06
ykarmouta    res = super(User, cls).create(vlist)16:06
ykarmouta  File "/usr/local/lib/python2.7/dist-packages/trytond-2.8.2-py2.7.egg/trytond/model/", line 269, in create16:06
ykarmouta    upd2.append(FIELDS[field._type].sql_format(value))16:06
ykarmouta  File "/usr/local/lib/python2.7/dist-packages/trytond-2.8.2-py2.7.egg/trytond/backend/", line 172, in sql_format16:06
ykarmouta    assert value is not False16:06
corrocedk meant, please don't clutter the channel like that16:08
ykarmoutasorry i will use this16:11
cedkykarmouta: you must use None instead of False for Many2One value16:13
ykarmoutacedk: yes but i don't see where i have to put it16:24
cedkykarmouta: probably a wrong default value16:30
-!- zakariao(c4c8ae7d@gateway/web/freenode/ip. has left #tryton16:36
ykarmoutacedk: thanks the probleme was the "menu" variable who i must leave blanc16:39
cedkykarmouta: which version ?16:39
ykarmoutacedk: 2.8.216:40
ykarmoutacedk: oups in fact i have an other error I don't have solve my problem16:41
cedkykarmouta: it is fixed since long time:
ykarmoutacedk: could you help me on the for the syntax, I have see many read action on the net but no for the creation with Many2One type for send the data17:29
cedkykarmouta: value of M2O is just the id17:30
guillemNaNcedk: hi cedk, a little off topic. which mercurial extensions do you use? which "branch method" do you use?17:32
cedkguillemNaN: don't understand17:35
nicoeguillemNaN: we do branching with clones17:37
nicoeguillemNaN: If you're refering to
guillemNaNnicoe: yes, I was refering to it. thanks17:42
guillemNaNnicoe: it is possible to publish the branch (to continue working in another computer)?17:43
guillemNaNnicoe: sorry, yes it is possible. I will try it.17:45
pokoliguillemNaN: it's possible to delete branches in mercurial?17:49
ykarmoutacedk: Well I still don't see my error, I have complete the 3 required params, whith the good type, but the error "assert value is not False" always appear17:57
guillemNaNpokoli: maybe with 3 o 4 extensions :-P17:58
pokoliguillemNaN: so much extensions.. xD18:00
guillemNaNpokoli: for short live branches it seems the best option are 'bookmarks' (are publishable, with 'mq' could be removed...). I'm investigating the 'mq' extension18:00
guillemNaNpokoli: it's a joke (or not?). I'm investigating but... I miss git18:00
pokoliguillemNaN: will be great if you can inform us on some TUC18:01
guillemNaNpokoli: of course, I'm writting some notes in a wiki. when it was more clear, I'll publish them.18:02
pokoliguillemNaN: yeah I know why you are asking about branches. I'm a bit used on git branches. You can always have a git copy ...18:02
cedkykarmouta: you must try to find on which field the error appears18:11
cedkykarmouta: you can put print statement on the right places18:11
-!- guillemNaN(~guillem@ has left #tryton18:19
ykarmoutacedk : I can properly create other type of objects, like groups using :[{'name':'truc2'}],context)18:21
ykarmoutahowever, when trying do create a user using the following line I get the former error :  s.model.res.user.create([{'name':'machin','login':'machin','menu':'2'}],context)18:22
cedkykarmouta: you must try to find on which field the error appears18:24
ykarmoutacedk : I got it. company and main_company are required fields, even if they are not purple in the create user form. The proper way of creating my user is thus : s.model.res.user.create([{'name':'machin','login':'machin','menu':'2','company':'1','main_company':'1'}],context)18:32
cedkykarmouta: must be int not string18:34
ykarmoutacedk : ok, thanks, I'll change that one, actually it did work throught with the quotes...18:38
ykarmoutacedk : the issue seems that when dealing with the XMLRPC interfaces, I have to specify the company and main_company, even if it is not required in the class User overiding, nor in the QT interface18:40
cedkykarmouta: default_main_company return the company in the context18:42
cedkykarmouta: if you have set it in the ctx to False so it is normal to fail18:43
ykarmoutacedk : ok, thanks for the explanation18:43
ykarmoutaThe command works if I specify None directly in the create statement : s.model.res.user.create([{'name':'machin4','login':'machin4','menu':2,'company':None,'main_company':None}],context)18:45
ykarmoutacedk : shouldn't the context be initialized to None rather than False for the company? Otherwise, if the defining the company in the context is mandatory, then it should be explicit I think and directly throw an assert error from the context initialisation18:46
cedkykarmouta: for me it is set to None18:48
ykarmoutamy context for my admin user (which is not part of any company) : {'language': 'en_US', 'company': False, 'groups': [1, 2, 3], 'employee': False, 'timezone': False, 'language_direction': 'ltr'}18:48
cedkykarmouta: which version?18:49
ykarmoutacedk : trytond-2.8.2 ,  trytond_company-2.8.0 , trytond_party-2.8.018:53
cedkykarmouta: m2o are set to None:
ykarmoutacedk : ok, I'll do a hg checkout tomorow morning and try with the head version. I'll keep you informed of my results. Thanks a lot for your effort. I'm currently evaluating tryton on a technical point of view for a migration from openerp. First impression : nice code and great community! Well, I have to go. Cheers19:01

Generated by 2.11.0 by Marius Gedminas - find it at!