IRC logs of #tryton for Monday, 2011-11-07 #tryton log beginning Mon Nov 7 00:00:01 CET 2011
sharooncedk: ping11:19
cedksharoon: pong11:22
sharooncedk: identified another place where we have slow queries. This is the query 00000LOG:  duration: 5248.770 ms  statement: SELECT CAST(SPLIT_PART("ir_property".res,',',2) AS INTEGER), "ir_property".id FROM "ir_property" JOIN "ir_model_field" ON ("ir_model_field".id = "ir_property".field) JOIN "ir_model" ON ("ir_model".id = "ir_model_field".model) WHERE CASE WHEN "ir_model".model = E'' AND "ir_model_field".name = E'sale_price_list' AND11:23
sharoon(((("ir_property"."company" = 7)) OR (("ir_property"."company" IS NULL))) AND True) THEN (cast(split_part(value,',',2) as int4) = 6)  ELSE FALSE END11:23
sharooncedk: do you want to see an EXPLAIN ANALYZE on this ?11:24
PanderHow do I trouble should when I export to OpenOffice and is expanded two times such as John SmithJohn Smith ?11:25
cedksharoon: report in the bug tracker11:25
sharooncedk: sure11:26
cedkPander: don't understand11:26
Pandercedk: the value I expect is printed twice11:27
cedkPander: when/where ?11:27
Pandercedk: a, found it I think (custom label.odt) I think the link split into two :S11:28
Pandercedk: fixed11:33
Panderother question on export to .odt: How can I prefix/format party.code so it will have leading zeros?11:34
PanderI think: '%05d' %party.code11:40
cedkPander: it is in the sequence configuration11:46
Pandercedk: Do I need to add more zeros to "Number padding" to achrive this?11:48
cedkPander: just the number of padding11:49
Pandercedk: I filled out 6 but don't see any effect11:52
cedkPander: it will not change existing values11:53
Pandercedk: ble... ok so I will have to use '%05d' %int(party.code) in the OpenOffice template11:54
PanderOpenOffice is not allowing certain relatorio hyperlinks... Try this one relatorio://'%05d' % (int(party.code)) it will replace the second % with %25 via url encode which is fine.12:07
Panderthe first % will not be replaced because it assumes %05 is the hex value you try to refer to :( putting %25%30%35 will be replaced to %0512:09
cedkPander: don't use hyperlink, use placeholder12:11
Pandercedk: ok thanks12:11
Pandercedk: how to cope with placeholders that are too big and messing with your layout?12:18
cedkPander: they don't change the layout12:25
-!- ciupicri(~ciupicri@unaffiliated/ciupicri) has joined #tryton13:13
zxq9How do I make a module menu item the child of an existing menu item directly without getting an error like "Reference to foo.act_foo_form not found"?13:52
zxq9Alternately, is there a complete Tryton XML reference somewhere?13:52
hoRnzxq9: there is no error if foo.act_foo_form exists13:53
hoRnzxq9: modul_name.id_of_the_menuentry13:54
zxq9I have existing module "bar" and a menuitem for it already. I make another module "foo" (depends on "bar") and only want it to have a child menu item of the main bar menuitem.13:55
zxq9I make <menuitem parent="bar.menu_foo" id="menu_foo_form" action="act_foo_form"/> and get error "Reference to foo.act_foo_form not found"13:56
zxq9I'm obviously missing a piece somewhere.13:57
zxq9correction, parent="bar.menu_bar"13:57
hoRnzxq9: the error complains, that the action isn't found13:58
hoRnin the foo.xml you need record model="ir.action.act_window" with the id="act_foo_form"14:00
zxq9I have that. Which is why I am confused.14:01
hoRnzxq9: can you put the code on a pasteservice?14:02
zxq9The sub-menu item:  The parent item I'm trying to place it under:
hoRnzxq9: do you mean id="person.act_person_form"14:11
hoRnzxq9: id should be id="act_person_form" only14:11
zxq9Ah, yes, I get the same error either way.14:12
zxq9The strange thing is, if I make the module stand alone and install it with its own main menu item first, then change the XML to main parent="info_admin.menu_info_admin" later, it works fine.14:20
zxq9But I can't make the module depend on info_admin and install it with the parent="info_admin.menu_info_admin" -- which is why I'm confused.14:21
hoRnzxq9: only for to be shure - depends is set in __tryton__.py14:22
zxq9Dependency is set.14:23
zxq9Everything works fine unless I make the menu item a child of the info_admin menu item. If the menus are separate everything installs/works fine.14:25
hoRnzxq9: thats strange - but the error complains that the action isn't found - not the parent14:27
zxq9This is the reason for my question. I think I can make this work by using xpath modifications to info_admin.xml, but that is a very ugly solution, and it doesn't seem like this is necessary.14:28
hoRnzxq9: my connection is very slow14:31
hoRnzxq9: change the order of the definitions - first the view - after the menuentry14:33
zxq9I think if that fixes the problem we have bigger issues. O.o14:34
zxq9Holy crap.14:34
zxq9That worked!14:34
cedkzxq9: line 35, remove person. in the id14:34
zxq9I think. Let me test function.14:34
hoRnzxq9: works for sure ;)14:35
cedkzxq9: and also define menu after the definition of the action14:35
zxq9cedk: Done. And changing the entry order seems to have worked.14:35
zxq9Thanks guys!14:35
zxq9Why does the order matter here?14:35
cedkzxq9: it always matter14:36
zxq9OK. I'll just remember that then.14:36
-!- hoRn( has left #tryton14:42
Panderhi all, how can I get Code to right-align like Receivable Today in party tree view?14:47
cedkPander: you can't14:49
cedkPander: code is not a number14:49
barnseyhi all o/, can anyone tell me the current state of the google_translate module?19:39
cedkbarnsey: abandoned19:57
barnseycedk: any idea why?20:06
cedkbarnsey: because broken and nobody as using it20:06
barnseycedk: ok, thank you.  I may have a use case for it so would like to take a look if thats ok?  How do I access the deprecated hg?20:20
cedkbarnsey: it should be still in the last series it was released20:21
cedkbarnsey: better:
barnseycedk: Its released in PyPi for 1.8.0 I think20:24
-!- ciupicri(~ciupicri@unaffiliated/ciupicri) has joined #tryton21:12
udonohi, is there any rule when to use loading='lazy' at fields with translate=True attribute?21:27
bechameludono: I don't see the point to use lazy loading on char field21:30
bechameludono: lazy is to prevent the client to query to much data when opening lists of records, mainly when there is a binary field21:31
udonobechamel: ok, so lazy and eager loading has nothing to do with the translation=true attribute. The use is on binary and maybe text fields.21:35
udonobechamel: many thanks21:36
bechameludono: yes, unless I am overlooking something21:36
bechameludono: actually (it's always better to read the code than to guess ..) it is also used for M2M and O2M21:38
udonobechamel: Ok. From here comes my question
udonobechamel: but it is never used in a tryton module.21:42
udonobechamel: For me it is a problem to decide when to use loading='lazy'. If there are some general rules, it would be very nice to know.21:42
bechameludono: maybe it is because translations are handled through a relate field, so it is resolved record by record anyway21:45
-!- meanmicio(~lfm@fsf/member/meanmicio) has joined #tryton21:50
udonobechamel: yes, possible.21:53
cedkudono: indeed it is better to set lazy for each translatable fields22:57
cedkudono: because loading is used also in browserecord, so it could improve speed22:58
udonocedk: ok, good to know.23:02

Generated by 2.11.0 by Marius Gedminas - find it at!