IRC logs of #tryton for Thursday, 2020-05-28

chat.freenode.net #tryton log beginning Thu 28 May 2020 12:00:01 AM CEST
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton02:05
-!- SimAlbertiBeltra(sim6matrix@gateway/shell/matrix.org/x-iymojqunwwjznynn) has joined #tryton02:05
-!- thaneor(~ldlc6@r186-54-245-250.dialup.adsl.anteldata.net.uy) has joined #tryton04:05
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton06:05
-!- mrichez(~Maxime@2a02:a03f:467c:d500:a385:4ecf:c4ea:d8cf) has joined #tryton07:05
-!- Timitos(~kpreisler@2001:a61:5ad:c901:762b:62ff:fe84:ed7e) has joined #tryton08:05
-!- rpit(~rpit@p200300c88f094100da82d2c817b701d0.dip0.t-ipconnect.de) has joined #tryton08:05
-!- rpit(~rpit@p200300c88f094100da82d2c817b701d0.dip0.t-ipconnect.de) has joined #tryton08:05
-!- udono(~udono@048-135-067-156.ip-addr.inexio.net) has joined #tryton08:05
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton08:05
-!- nicoe(~nicoe@2a02:578:852a:c00:7e2a:31ff:fe5e:b25d) has joined #tryton10:05
mrichezhi, is there only fields that can be used in xml tree ? or could this apply to a property ? Concrete example: i'm storing density of a product material (density uom is weight and volume), so in my model i'm using 2 many2one fields to get each uom. But in treeview, i would display uom with format ("weight_uom/volume_uom"). Is the best way to use a function field to return a new string with both uoms?11:05
cedkmrichez: why not using a new category of measure density?12:05
mrichezcedk: because i'm using it to calculate a theoretical weight of the product, (volume * density = weight) so i need to know uom factor12:05
cedkmrichez: maybe you could have a cross unit conversion definition12:05
mrichezcedk: heuuu...12:05
mrichezcedk: so it implies a new model for cross unit ? and then associate this cross unit to density model ?12:05
cedkyes we could store that 1 volume * 1 density = x weight12:05
mrichezcedk: ok, but don't know if there's other example of cross unit ? 1 model for 1 case ? useful ?12:05
-!- mariomop(~quassel@190.193.24.15) has joined #tryton12:05
pokolimrichez: speed is similar: Distance / Time13:05
pokolimrichez: strengh also: Mass / Aceleration13:05
mrichezpokoli: :-)13:05
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton13:05
-!- springwurm(~Springwur@5.104.149.54) has joined #tryton13:05
mrichezback with cross unit: how would be this new model added to product.uom ? i'm lost... :-)14:05
-!- LordVan|Work(~LordVan@gentoo/developer/LordVan) has joined #tryton14:05
mrichezcedk: could it be a model like this : https://pastebin.com/9uiCGxz714:05
cedkmrichez: I think it should only be based on categories14:05
cedkbecause we need to have only one result for the product of two categories14:05
cedkso it would be: category1 * category2 = x unit14:05
cedkand anoption for category1 / category2 = x unit14:05
mrichezcedk: what would be the choice of the uom in the category then ?14:05
cedkmrichez: 114:05
mrichezcedk: so let's says i add a new cross_unit that would be "Density" category 1 is Weight, category2 is Volume... how user can get this uom in Gr/mm³  ?14:05
cedkmrichez: it will depend on the base unit of weight and volume14:05
LordVan|Workhi15:05
LordVan|Workjust trying to install newest trytond + modules on a new box to test something15:05
LordVan|Workany clue why it wants no 3.8 ?15:05
LordVan|WorkThe following USE changes are necessary to proceed:15:05
LordVan|Work (see "package.use" in the portage(5) man page for more details)15:05
LordVan|Work# required by trytond (argument)15:05
LordVan|Work>=app-office/trytond-5.6.0 -python_targets_python3_815:05
LordVan|WorkI mean i don'T mind if i use 3.7 or 3.8 just wondering15:05
LordVan|Workoh tryton 5.6 supports weasyprint.. anyone want to share experiences?15:05
cedkLordVan|Work: not all modules in Gentoo supports 3.8 because of missing dependencies declaration15:05
cedkLordVan|Work: I think 3.7 is fully supported15:05
LordVan|Workcedk, yeah i suspected that but thanks for confirming ;)15:05
cedkLordVan|Work: I find that python version management in Gentoo too much complicated15:05
cedkLordVan|Work: and too slow to update15:05
LordVan|Workcedk, hmm id on'T mind that, but sometimes too slow - especially the deps15:05
cedkI think most packages should work on new version of Python without issue15:05
LordVan|Workcedk, alternatively i could of course use virtualenv, but well15:05
LordVan|Workcedk, yeah but they need to be checked by the maintainer(s)15:05
cedkLordVan|Work: well as long as they do not require compilation, the odds is very low that they will not work on the next version15:05
LordVan|Workyeah i know15:05
cedkand now that Python release a new version every year, it is worse15:05
LordVan|Workhm i don'T have too much time for gentoo at the moment unfortunately (used to be active in the python team )15:05
LordVan|Workthat said i often just use virtualenv anyway15:05
LordVan|Workcedk, since you are here .. can weasyprint replace the opendocument reports,..?16:05
LordVan|Workor is it not that far (yet)?16:05
pokoliLordVan|Work: weasyprint is used for converting html reports into pdf16:05
LordVan|Workyes but can that with html reports  (feasibly) replace open document ones?16:05
pokoliLordVan|Work: yes, but you will need to design your own reports16:05
pokoliLordVan|Work: all the base reports are odt based16:05
LordVan|Workwell i was going to make custom reports for just about anything anyway so i might have a look at that16:05
pokoliLordVan|Work: you just need to create the report with html extensions and pdf output format16:05
pokoliLordVan|Work: and trytond will use weasyprint for conversion and fallback to libreoffice is not available16:05
cedkthe main difficult is that HTML is not really designed to make printed document16:05
pokoliACTION bbl16:05
LordVan|Worki like the idea of not needing libreoffice installed on the server16:05
LordVan|Workcedk, true16:05
LordVan|Workxml/fop would be more suitable16:05
LordVan|WorkI did some xml+ fop stuff several years ago .. very precise control from what i remember16:05
LordVan|Workdo you know if anyone tried generating reports that way before ?16:05
LordVan|Work-- to be fair libreoffice docs have the advantage they can be edited later if you need to do anything special16:05
-!- thaneor1(~ldlc6@179.26.158.99) has joined #tryton16:05
pokoliLordVan|Work: it should be doable to override the report module to generate the pdf in the format you want16:05
pokoliLordVan|Work: You can use Genshi (the template engine) to render the xml and the convert it to pdf using fop latter16:05
-!- mrichez(~Maxime@2a02:a03f:467c:d500:a385:4ecf:c4ea:d8cf) has joined #tryton19:05
-!- mrichez(~Maxime@2a02:a03f:467c:d500:a385:4ecf:c4ea:d8cf) has joined #tryton20:05

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