IRC logs of #tryton for Wednesday, 2019-10-02

chat.freenode.net #tryton log beginning Wed 02 Oct 2019 12:00:01 AM CEST
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton22:18
-!- yangoon1(~mathiasb@92.117.173.112) has joined #tryton02:20
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton05:25
-!- Timitos(~kpreisler@2001:a61:5a4:b101:762b:62ff:fe84:ed7e) has joined #tryton06:22
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton06:22
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton06:56
-!- Timitos(~kpreisler@2001:a61:5a4:b101:762b:62ff:fe84:ed7e) has joined #tryton07:01
-!- smorillo(8965fb90@gateway/web/cgi-irc/kiwiirc.com/ip.137.101.251.144) has joined #tryton07:03
-!- Timitos(~kpreisler@2001:a61:5a4:b101:762b:62ff:fe84:ed7e) has joined #tryton07:09
-!- udono(~udono@tmo-102-237.customers.d1-online.com) has joined #tryton07:49
-!- rpit(~rpit@p200300C88F1AFC00E5271953866667B8.dip0.t-ipconnect.de) has joined #tryton08:06
-!- nicoe(~nicoe@host-85-201-184-151.dynamic.voo.be) has joined #tryton08:10
-!- udono(~udono@2a00:6020:15f9:2f00:76e5:bff:fe6e:a706) has joined #tryton08:50
mrichezhi, in a custom module i'm adding data's through xml file... i define rights (C,W,D, R) to res.group_admin on my model but when i want to update some data's, i get the message 'You're not allowed to modify this record, this record is part of base configuration'.. I took for example product_uom that are also created by xml and that could be updated by group product_admin... in my case, i just want the "admin" group.. but it's not working. Any idea?09:14
pokolimrichez: on product uom the check_xml_record is overriden to allow modification: https://hg.tryton.org/modules/product/file/31061ac0b0e4/uom.py#l7709:16
pokolimrichez: so you should probably do the same for your module09:16
mrichezpokoli: don't know about this method... but i need also to give access rights ?09:17
pokolimrichez: no, this method is used to allow edition of xml_records. See: http://docs.tryton.org/projects/server/en/latest/ref/models/models.html#trytond.model.ModelStorage.check_xml_record09:20
mrichezpokoli: thanks ! :-)09:21
-!- mariomop(~quassel@181.90.109.5) has joined #tryton10:54
-!- SimAlbertiBeltra(sim6matrix@gateway/shell/matrix.org/x-brindaksotdrejbz) has joined #tryton11:22
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton12:04
-!- mrichez(~Maxime@mail.saluc.com) has joined #tryton12:30
-!- csotelo__(~csotelo@190.239.195.43) has joined #tryton12:40
mrichezin a treeview; can we have only an icon in a column ? often there's field value and icon... but in case of boolean field, can we have another icon instead of checkbox ?13:28
pokolimrichez: using the icon attribute should show the icon instead of the name13:33
pokolimrichez: <field name="yourfieldname" icon="nameoffunctionalfield">13:34
pokolimrichez: nameoffunctionalfield should be a functional field that return the name of the icon to use13:34
pokolimrichez: We are using this on the koolvet modules13:35
mrichezpokoli: yes saw examples but, for instance in journal : period_list_close view, there is <field name="journal" icon="icon"/> , and value is displayed with icon13:36
mrichezpokoli: could i use something like this <field icon="icon"/>13:37
pokolimrichez: IIRC name or id is required13:38
mrichezpokoli: and in koolvet you have an column only with an icon ?13:49
pokolimrichez: yes. Here is a screenshot https://gyazo.com/7025de34a3d478a543452a42c7ec41ae13:52
pokolimrichez: and here is the full code used: https://pastebin.com/u07ZXQY213:55
mrichezpokoli: ok, so in case of boolean field, the checkbox is replaced by the icon :-) but if field is another type, field value is displayed next to the icon13:56
mrichezpokoli: thanks!13:58
pokolimrichez: probably the image tag can be  used to show only the icon13:58
pokolimrichez: but you still required the function field to compute the icon name14:00
cedkI think the checkbox is displayed but not visible because the column size is too small14:00
cedkindeed this is a bug, the column size should be greater if there are affix in it14:00
cedkusing image tag will not be efficient because it will download the icon for each row14:02
mrichezcedk: so it doesn't fix my "problem"... so we could add a feature to hide field value if there's an icon attribute ?14:03
cedkmrichez: I do not think it will be a good feature for accessibility14:04
mrichezcedk: or just in case of field type is boolean ?14:07
mrichezcedk: to replace "checkbox" icon by the icon attribute14:07
pokolimrichez: probably a field with icon widget will be the best from the developer PoV14:08
cedkIt may be considered for boolean which are readonly or on non-editable list14:10
mrichezok...14:17
-!- csotelo__(~csotelo@190.239.195.43) has joined #tryton19:02
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton21:43

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