IRC logs of #tryton for Monday, 2011-11-07

chat.freenode.net #tryton log beginning Mon Nov 7 00:00:01 CET 2011
2011-11-07 11:19 <sharoon> cedk: ping
2011-11-07 11:22 <cedk> sharoon: pong
2011-11-07 11:23 <sharoon> cedk: 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'party.party' AND "ir_model_field".name = E'sale_price_list' AND
2011-11-07 11: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 END
2011-11-07 11:24 <sharoon> cedk: do you want to see an EXPLAIN ANALYZE on this ?
2011-11-07 11:25 <Pander> How do I trouble should when I export to OpenOffice and party.name is expanded two times such as John SmithJohn Smith ?
2011-11-07 11:25 <cedk> sharoon: report in the bug tracker
2011-11-07 11:26 <sharoon> cedk: sure
2011-11-07 11:26 <cedk> Pander: don't understand
2011-11-07 11:27 <Pander> cedk: the value I expect is printed twice
2011-11-07 11:27 <cedk> Pander: when/where ?
2011-11-07 11:28 <Pander> cedk: a, found it I think (custom label.odt) I think the link split into two :S
2011-11-07 11:33 <Pander> cedk: fixed
2011-11-07 11:34 <Pander> other question on export to .odt: How can I prefix/format party.code so it will have leading zeros?
2011-11-07 11:40 <Pander> I think: '%05d' %party.code
2011-11-07 11:46 <cedk> Pander: it is in the sequence configuration
2011-11-07 11:48 <Pander> cedk: Do I need to add more zeros to "Number padding" to achrive this?
2011-11-07 11:49 <cedk> Pander: just the number of padding
2011-11-07 11:52 <Pander> cedk: I filled out 6 but don't see any effect
2011-11-07 11:53 <cedk> Pander: it will not change existing values
2011-11-07 11:54 <Pander> cedk: ble... ok so I will have to use '%05d' %int(party.code) in the OpenOffice template
2011-11-07 12:07 <Pander> OpenOffice 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.
2011-11-07 12:09 <Pander> the 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 %05
2011-11-07 12:11 <cedk> Pander: don't use hyperlink, use placeholder
2011-11-07 12:11 <Pander> cedk: ok thanks
2011-11-07 12:18 <Pander> cedk: how to cope with placeholders that are too big and messing with your layout?
2011-11-07 12:25 <cedk> Pander: they don't change the layout
2011-11-07 13:13 -!- ciupicri(~ciupicri@unaffiliated/ciupicri) has joined #tryton
2011-11-07 13:52 <zxq9> How 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"?
2011-11-07 13:52 <zxq9> Alternately, is there a complete Tryton XML reference somewhere?
2011-11-07 13:53 <hoRn> zxq9: there is no error if foo.act_foo_form exists
2011-11-07 13:54 <hoRn> zxq9: modul_name.id_of_the_menuentry
2011-11-07 13:55 <zxq9> I 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.
2011-11-07 13:56 <zxq9> I 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"
2011-11-07 13:57 <zxq9> I'm obviously missing a piece somewhere.
2011-11-07 13:57 <zxq9> correction, parent="bar.menu_bar"
2011-11-07 13:58 <hoRn> zxq9: the error complains, that the action isn't found
2011-11-07 14:00 <hoRn> in the foo.xml you need record model="ir.action.act_window" with the id="act_foo_form"
2011-11-07 14:01 <zxq9> I have that. Which is why I am confused.
2011-11-07 14:02 <hoRn> zxq9: can you put the code on a pasteservice?
2011-11-07 14:02 <zxq9> sure.
2011-11-07 14:07 <zxq9> The sub-menu item: http://pastebin.com/TbYGDA4J The parent item I'm trying to place it under: http://pastebin.com/Br8ihppW
2011-11-07 14:11 <hoRn> zxq9: do you mean id="person.act_person_form"
2011-11-07 14:11 <hoRn> zxq9: id should be id="act_person_form" only
2011-11-07 14:12 <zxq9> Ah, yes, I get the same error either way.
2011-11-07 14:20 <zxq9> The 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.
2011-11-07 14:21 <zxq9> But 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.
2011-11-07 14:22 <hoRn> zxq9: only for to be shure - depends is set in __tryton__.py
2011-11-07 14:23 <zxq9> Dependency is set.
2011-11-07 14:25 <zxq9> Everything 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.
2011-11-07 14:27 <hoRn> zxq9: thats strange - but the error complains that the action isn't found - not the parent
2011-11-07 14:27 <zxq9> Right.
2011-11-07 14:28 <zxq9> This 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.
2011-11-07 14:31 <hoRn> zxq9: my connection is very slow
2011-11-07 14:33 <hoRn> zxq9: change the order of the definitions - first the view - after the menuentry
2011-11-07 14:34 <zxq9> I think if that fixes the problem we have bigger issues. O.o
2011-11-07 14:34 <zxq9> Holy crap.
2011-11-07 14:34 <zxq9> That worked!
2011-11-07 14:34 <cedk> zxq9: line 35, remove person. in the id
2011-11-07 14:34 <zxq9> I think. Let me test function.
2011-11-07 14:35 <hoRn> zxq9: works for sure ;)
2011-11-07 14:35 <cedk> zxq9: and also define menu after the definition of the action
2011-11-07 14:35 <zxq9> cedk: Done. And changing the entry order seems to have worked.
2011-11-07 14:35 <zxq9> Thanks guys!
2011-11-07 14:35 <zxq9> Why does the order matter here?
2011-11-07 14:36 <cedk> zxq9: it always matter
2011-11-07 14:36 <zxq9> OK. I'll just remember that then.
2011-11-07 14:42 -!- hoRn(~jan@business-088-079-110-234.static.arcor-ip.net) has left #tryton
2011-11-07 14:47 <Pander> hi all, how can I get Code to right-align like Receivable Today in party tree view?
2011-11-07 14:49 <cedk> Pander: you can't
2011-11-07 14:49 <cedk> Pander: code is not a number
2011-11-07 19:39 <barnsey> hi all o/, can anyone tell me the current state of the google_translate module?
2011-11-07 19:57 <cedk> barnsey: abandoned
2011-11-07 20:06 <barnsey> cedk: any idea why?
2011-11-07 20:06 <cedk> barnsey: because broken and nobody as using it
2011-11-07 20:13 <cedk> barnsey: https://groups.google.com/d/topic/tryton/3TRiGdF0G9k/discussion
2011-11-07 20:20 <barnsey> cedk: 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?
2011-11-07 20:21 <cedk> barnsey: it should be still in the last series it was released
2011-11-07 20:22 <cedk> barnsey: better: http://hg.tryton.org/deprecated/
2011-11-07 20:24 <barnsey> cedk: Its released in PyPi for 1.8.0 I think
2011-11-07 21:12 -!- ciupicri(~ciupicri@unaffiliated/ciupicri) has joined #tryton
2011-11-07 21:27 <udono> hi, is there any rule when to use loading='lazy' at fields with translate=True attribute?
2011-11-07 21:30 <bechamel> udono: I don't see the point to use lazy loading on char field
2011-11-07 21:31 <bechamel> udono: lazy is to prevent the client to query to much data when opening lists of records, mainly when there is a binary field
2011-11-07 21:35 <udono> bechamel: ok, so lazy and eager loading has nothing to do with the translation=true attribute. The use is on binary and maybe text fields.
2011-11-07 21:36 <udono> bechamel: many thanks
2011-11-07 21:36 <bechamel> udono: yes, unless I am overlooking something
2011-11-07 21:38 <bechamel> udono: actually (it's always better to read the code than to guess ..) it is also used for M2M and O2M
2011-11-07 21:42 <udono> bechamel: Ok. From here comes my question http://hg.tryton.org/trytond/rev/76c13c17db96#l2.21
2011-11-07 21:42 <udono> bechamel: but it is never used in a tryton module.
2011-11-07 21:42 <udono> bechamel: 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.
2011-11-07 21:45 <bechamel> udono: maybe it is because translations are handled through a relate field, so it is resolved record by record anyway
2011-11-07 21:46 <bechamel> s/relate/reference
2011-11-07 21:50 -!- meanmicio(~lfm@fsf/member/meanmicio) has joined #tryton
2011-11-07 21:53 <udono> bechamel: yes, possible.
2011-11-07 22:57 <cedk> udono: indeed it is better to set lazy for each translatable fields
2011-11-07 22:58 <cedk> udono: because loading is used also in browserecord, so it could improve speed
2011-11-07 23:02 <udono> cedk: ok, good to know.

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