IRC logs of #tryton for Monday, 2013-08-05

chat.freenode.net #tryton log beginning Mon Aug 5 00:00:01 CEST 2013
2013-08-05 10:39 <corro> anyone 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.
2013-08-05 11:06 <cedk> corro: probably a wrong model name
2013-08-05 11:17 <sisalp> hello,
2013-08-05 11:18 <sisalp> I cannot get cdecimal installed on Debian 7 nor Ubuntu 12.04, how do you do ?
2013-08-05 11:19 <corro> sisalp: pip install cdecimal. What's the problem?
2013-08-05 11:20 <sisalp> corro: error: command 'gcc' failed with exit status 1
2013-08-05 11:21 <sisalp> cdecimal2.c:29:20: fatal error: Python.h: No such file or directory
2013-08-05 11:21 <corro> sisalp: install package python-dev via apt, it includes the header files needed for compilation
2013-08-05 11:22 <sisalp> Successfully installed cdecimal excellent
2013-08-05 11:23 <sisalp> will update my install script accordingly. Thank you
2013-08-05 11:24 <corro> sisalp: np
2013-08-05 11:28 <nicoe> albertca: The maps are in catalan, wouldn'it be better to be in english ?
2013-08-05 11:29 <albertca> what does appear in Catalan?
2013-08-05 11:31 <nicoe> albertca: "Sigeu el primer a escriure una ressenya"
2013-08-05 11:32 <nicoe> albertca: And on the other map "Itinaris", "Cerca a prop", "més"
2013-08-05 11:32 <nicoe> albertca: of course the name of the road must be in catalan :D
2013-08-05 11:37 <sisalp> hello,
2013-08-05 11:38 <sisalp> looking for nereid modules for trytond. pypi indicates 2.6 for catalogue and cart. Is it the right place ?
2013-08-05 11:59 <albertca> nicoe: should be fixed, now, can you check it please?
2013-08-05 12:00 <nicoe> albertca: 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 guell
2013-08-05 12:00 <albertca> nicoe: I let maps.google.com to decide the language, instead of hard coding it
2013-08-05 12:02 <albertca> nicoe: the hand is a little bit hidden but I like it too :)
2013-08-05 12:18 <sisalp> trytond_nereid-2.8.0.1 from github doesn't install on Tryton 2.8
2013-08-05 12:20 <sisalp> pretty sure I miss the right source. too bad.
2013-08-05 12:21 <sisalp> anyone has some nereid working ?
2013-08-05 13:18 <shalabhaggarwal> cedk: 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?
2013-08-05 13:26 <cedk> shalabhaggarwal: pass None
2013-08-05 13:28 <shalabhaggarwal> cedk: thanks!
2013-08-05 13:44 <sisalp> sharoon: had some questions about nereid
2013-08-05 13:44 <sharoonthomas> sisalp: sure
2013-08-05 13:45 <sisalp> pypi indicates 2.6 for catalogue and cart. Is it the right place to get the code ?
2013-08-05 13:49 <sisalp> sharron: and also trytond_nereid-2.8.0.1 from github doesn't install on Tryton 2.8
2013-08-05 13:54 -!- heg(~heg@dyn.83-228-134-186.dsl.vtx.ch) has left #tryton
2013-08-05 14:26 <sisalp> sharoon: In tag record: model ir.action.act_window.view with id act_url_rule_defaults_tree_view2.
2013-08-05 14:48 <pokoli> cedk: 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?
2013-08-05 14:52 <cedk> pokoli: I mean that still having a loop on timesheet lines to sum doesn't fix the problem
2013-08-05 14:54 <pokoli> cedk: Yes, I understood you, but the problem is when you upgrade a database, the cost field is null for all the rows
2013-08-05 14:55 <pokoli> cedk: so i'm asking if the patch should also calculate the cost field if there is one row that has a null value
2013-08-05 14:55 <pokoli> cedk: 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 patch
2013-08-05 14:57 <cedk> pokoli: I don't have a solution
2013-08-05 14:58 <pokoli> cedk: a proteus script to execute before the database migration would be a good solution?
2013-08-05 14:58 <cedk> pokoli: no
2013-08-05 14:58 <cedk> pokoli: stop thinking about your patch because you go in a wrong direction
2013-08-05 14:59 <pokoli> cedk: why???? don't understand you
2013-08-05 14:59 <pokoli> cedk: so you mean calcullating the cost by and sql query directly?
2013-08-05 15:00 <cedk> pokoli: I don't have the solution
2013-08-05 15:00 <pokoli> cedk: ok no problem, will thing a little about it, but you can tell which you think is the right direction?
2013-08-05 15:01 <cedk> pokoli: no I can not, I can just yours is wrong
2013-08-05 15:01 <pokoli> cedk: ok, don't mind
2013-08-05 15:02 <cedk> pokoli: generic rules about cache: the difficulty is invalidation
2013-08-05 15:02 <pokoli> cedk: i want to replace the loop with and sql query that sums all costs of the lines
2013-08-05 15:05 <pokoli> cedk: 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 it
2013-08-05 15:06 <cedk> pokoli: I never say that
2013-08-05 15:06 <cedk> pokoli: storing computation == cache
2013-08-05 15:13 <cedk> pokoli: indeed, I think the problem should be reversed
2013-08-05 15:13 <cedk> pokoli: we should be able to get the cost of an employee over a period as a list of period with different cost
2013-08-05 15:13 <cedk> pokoli: then make a SQL query on timesheet lines for each period
2013-08-05 15:17 <pokoli> cedk: so i think i understand you, will try to work on that way
2013-08-05 15:19 <cedk> pokoli: normally the cost of an employee doesn't vary much
2013-08-05 15:19 <pokoli> cedk: yes, you're absolutly right here
2013-08-05 15:19 <pokoli> cedk: but i must think about it. If it can be done on the database or if the query must be filtered
2013-08-05 15:20 <pokoli> cedk: 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?
2013-08-05 15:23 <cedk> pokoli: yes I think it is easier
2013-08-05 15:23 <cedk> pokoli: because the problem always with cache is invalidation
2013-08-05 15:24 <pokoli> cedk: 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 sense
2013-08-05 15:24 <pokoli> cedk: as employees costs are modified backwards in the time normally
2013-08-05 15:24 <pokoli> cedk: thank's for the clarifications
2013-08-05 15:54 <ykarmouta> hello everyone
2013-08-05 15:56 <ykarmouta> i try to use the model.res.user.create method but every time i have the error : "assert value is not False"
2013-08-05 15:57 <ykarmouta> someone have an example how to use it ?
2013-08-05 15:58 <cedk> ykarmouta: could you show the traceback (in a pastebin)
2013-08-05 16:04 <ykarmouta> thanks for helping me
2013-08-05 16:05 <ykarmouta> my python script look at this:
2013-08-05 16:05 <ykarmouta> import xmlrpclib
2013-08-05 16:05 <ykarmouta> PASSWORD = 'xxxxx'
2013-08-05 16:05 <ykarmouta> USER = "admin"
2013-08-05 16:05 <ykarmouta> s = xmlrpclib.ServerProxy ('http://%s:%s@192.168.149.171:8069/tryton' % (USER, PASSWORD))
2013-08-05 16:05 <ykarmouta> context = s.model.res.user.get_preferences(True, {})
2013-08-05 16:05 <ykarmouta> s.model.res.user.create([{'name':'truc','login':'truc','menu':2,'password':'testtest'}],context)
2013-08-05 16:06 <ykarmouta> and it return this error: [Mon Aug 05 16:03:38 2013] ERROR:dispatcher:Exception calling method create on model res.user from 1@192.168.149.14:56150/tryton:
2013-08-05 16:06 <ykarmouta> Traceback (most recent call last):
2013-08-05 16:06 <ykarmouta> File "/usr/local/lib/python2.7/dist-packages/trytond-2.8.2-py2.7.egg/trytond/protocols/dispatcher.py", line 158, in dispatch
2013-08-05 16:06 <ykarmouta> result = rpc.result(meth(*args, **kwargs))
2013-08-05 16:06 <ykarmouta> File "/usr/local/lib/python2.7/dist-packages/trytond-2.8.2-py2.7.egg/trytond/res/user.py", line 214, in create
2013-08-05 16:06 <ykarmouta> res = super(User, cls).create(vlist)
2013-08-05 16:06 <ykarmouta> File "/usr/local/lib/python2.7/dist-packages/trytond-2.8.2-py2.7.egg/trytond/model/modelsql.py", line 269, in create
2013-08-05 16:06 <ykarmouta> upd2.append(FIELDS[field._type].sql_format(value))
2013-08-05 16:06 <ykarmouta> File "/usr/local/lib/python2.7/dist-packages/trytond-2.8.2-py2.7.egg/trytond/backend/fields.py", line 172, in sql_format
2013-08-05 16:06 <ykarmouta> assert value is not False
2013-08-05 16:06 <ykarmouta> AssertionError
2013-08-05 16:08 <corro> cedk meant http://pastebin.com/, please don't clutter the channel like that
2013-08-05 16:11 <ykarmouta> sorry i will use this
2013-08-05 16:13 <cedk> ykarmouta: you must use None instead of False for Many2One value
2013-08-05 16:24 <ykarmouta> cedk: yes but i don't see where i have to put it
2013-08-05 16:30 <cedk> ykarmouta: probably a wrong default value
2013-08-05 16:36 -!- zakariao(c4c8ae7d@gateway/web/freenode/ip.196.200.174.125) has left #tryton
2013-08-05 16:39 <ykarmouta> cedk: thanks the probleme was the "menu" variable who i must leave blanc
2013-08-05 16:39 <cedk> ykarmouta: which version ?
2013-08-05 16:40 <ykarmouta> cedk: 2.8.2
2013-08-05 16:41 <ykarmouta> cedk: oups in fact i have an other error I don't have solve my problem
2013-08-05 16:42 <cedk> ykarmouta: it is fixed since long time: https://bugs.tryton.org/issue2512
2013-08-05 17:29 <ykarmouta> cedk: 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 data
2013-08-05 17:30 <cedk> ykarmouta: value of M2O is just the id
2013-08-05 17:32 <guillemNaN> cedk: hi cedk, a little off topic. which mercurial extensions do you use? which "branch method" do you use?
2013-08-05 17:35 <cedk> guillemNaN: don't understand
2013-08-05 17:37 <nicoe> guillemNaN: we do branching with clones
2013-08-05 17:37 <nicoe> guillemNaN: If you're refering to http://stevelosh.com/blog/2009/08/a-guide-to-branching-in-mercurial/
2013-08-05 17:42 <guillemNaN> ok
2013-08-05 17:42 <guillemNaN> nicoe: yes, I was refering to it. thanks
2013-08-05 17:43 <guillemNaN> nicoe: it is possible to publish the branch (to continue working in another computer)?
2013-08-05 17:45 <guillemNaN> nicoe: sorry, yes it is possible. I will try it.
2013-08-05 17:49 <pokoli> guillemNaN: it's possible to delete branches in mercurial?
2013-08-05 17:57 <ykarmouta> cedk: 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 appear
2013-08-05 17:58 <guillemNaN> pokoli: maybe with 3 o 4 extensions :-P
2013-08-05 18:00 <pokoli> guillemNaN: so much extensions.. xD
2013-08-05 18:00 <guillemNaN> pokoli: for short live branches it seems the best option are 'bookmarks' (are publishable, with 'mq' could be removed...). I'm investigating the 'mq' extension
2013-08-05 18:00 <guillemNaN> pokoli: it's a joke (or not?). I'm investigating but... I miss git
2013-08-05 18:01 <pokoli> guillemNaN: will be great if you can inform us on some TUC
2013-08-05 18:02 <guillemNaN> pokoli: of course, I'm writting some notes in a wiki. when it was more clear, I'll publish them.
2013-08-05 18:02 <pokoli> guillemNaN: yeah I know why you are asking about branches. I'm a bit used on git branches. You can always have a git copy ...
2013-08-05 18:11 <cedk> ykarmouta: you must try to find on which field the error appears
2013-08-05 18:11 <cedk> ykarmouta: you can put print statement on the right places
2013-08-05 18:19 -!- guillemNaN(~guillem@90.163.249.77) has left #tryton
2013-08-05 18:21 <ykarmouta> cedk : I can properly create other type of objects, like groups using : s.model.res.group.create([{'name':'truc2'}],context)
2013-08-05 18:22 <ykarmouta> however, 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)
2013-08-05 18:24 <cedk> ykarmouta: you must try to find on which field the error appears
2013-08-05 18:32 <ykarmouta> cedk : 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)
2013-08-05 18:34 <cedk> ykarmouta: must be int not string
2013-08-05 18:38 <ykarmouta> cedk : ok, thanks, I'll change that one, actually it did work throught with the quotes...
2013-08-05 18:40 <ykarmouta> cedk : 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 company.py class User overiding, nor in the QT interface
2013-08-05 18:42 <cedk> ykarmouta: default_main_company return the company in the context
2013-08-05 18:43 <cedk> ykarmouta: if you have set it in the ctx to False so it is normal to fail
2013-08-05 18:43 <ykarmouta> cedk : ok, thanks for the explanation
2013-08-05 18:45 <ykarmouta> The 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)
2013-08-05 18:46 <ykarmouta> cedk : 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 initialisation
2013-08-05 18:48 <cedk> ykarmouta: for me it is set to None
2013-08-05 18:48 <ykarmouta> my 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'}
2013-08-05 18:49 <cedk> ykarmouta: which version?
2013-08-05 18:53 <ykarmouta> cedk : trytond-2.8.2 , trytond_company-2.8.0 , trytond_party-2.8.0
2013-08-05 18:57 <cedk> ykarmouta: m2o are set to None: http://hg.tryton.org/2.8/trytond/file/ee1d7a918d74/trytond/res/user.py#l304
2013-08-05 19:01 <ykarmouta> cedk : 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. Cheers

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