IRC logs of #tryton for Sunday, 2016-04-03

chat.freenode.net #tryton log beginning Sun Apr 3 00:00:01 CEST 2016
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton00:04
-!- smarro(~sebastian@190.14.157.18) has joined #tryton01:31
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton03:07
-!- smarro(~sebastian@181.16.7.104) has joined #tryton03:23
-!- smarro(~sebastian@190.14.157.18) has joined #tryton03:29
shroxkstenger: Hi! I need help with issue5386. From what I understand, I am to use the digits argument in unit_price (http://pastebin.ubuntu.com/15595217/) from invoice.py in the report to access price_digits. But I cannot figure how I do that.04:18
shroxkstenger: I am unable to link you to the specific line in codebase, there seems to be a problem.04:18
kstengershrox: a more generic link available?04:19
shroxkstenger: a more generic link for?04:19
kstengeryou mean th ereview on the bugtracker?04:20
kstengershrox: I mean I don't understand what line of the codebase you were refering to04:21
shroxkstenger: No, I mean I am unable to access the files on the mercurial repo (hg.tryton.org). So cannot link you to it.04:21
shroxkstenger: It's line 1417 in invoice.py in the account_invoice module04:22
kstengershrox: would you explain me more thoroughly what you try to achieve and you cannot?04:25
shroxkstenger: Okay so one of the arguments in format_number is 'digits'. The digits argument in unit_price is price_digits. So I have to make use of this price_digits in format_number (that will then format it accordingly in the report).04:28
shroxkstenger: cedk seemed to think I was missing something obvious, but I've spent some time now on this and don't know what it could be04:29
kstengershrox: ok, so what did you try so far?04:31
shroxkstenger: I was having a look at the fields.Numeric function in order to be able to refer to the digits argument04:33
shroxkstenger: another point to note is that price_digits is a list of two integers. I will only need one.04:33
shroxkstenger: Am I confusing you?04:38
kstengerI still don't follow what you tried, as I'm not familiar with this issue04:39
shroxkstenger: What do you think I should try?04:40
kstengershrox: right now I don't know but I can help you find out :) what info do you have about what the issue implies?04:44
-!- smarro(~sebastian@190.14.157.18) has joined #tryton04:45
shroxkstenger: Reports made with format_currency are by default limited to two decimal points. So if I have 20.012, it will show up in the report as 20.01. We need to allow for more digits, which we can do by replacing format_currency with format_number which allows us to specify the number of digits.04:47
shroxkstenger: Now, the number of digits for unit_price (what we are trying to change) is specified in invoice.py as price_digits04:47
shroxkstenger: price_digits is a list of two numbers. price_digits[0] is the total number of digits and price_digits[1] is the number of digits after the decimal point04:48
shroxkstenger: I need to use price_digits[1] for the digits argument in format_number04:48
shroxkstenger: But I don't know how04:48
kstengeroh I see04:50
kstengerlet me check a little bit the code04:50
shroxkstenger: I think I need to use price_digits[1]. I might be wrong.04:51
kstengeryes, that seems to be correct04:51
shroxkstenger: Have a look at the log where cedk was trying to give me a better idea - http://www.tryton.org/~irclog/2016-03-28.log.html04:52
kstengershrox: so you were trying to access 'price_digits' as a member of the invoice line ?04:57
shroxkstenger: Yes but that was earlier before I looked into the code in detail.04:58
kstengerok, so what are you trying to do now to get to this value?04:58
shroxkstenger: I tried to modify invoice.py so that it would then be member of the invoice line. But I don't think I need to do that.04:59
kstengerno, more likely you need to access this value, in the right way ... so let's see...05:00
kstengerthe invoice line has a member unit_price, when defined it is given the digits parameter ... so the digits will be stored in the unit_price ... (let me check one more thing)05:02
kstenger(and keep in mind I'm "thinking aloud")05:03
shroxkstenger: haha, continue to do so, please05:03
kstengeryou said you were looking at fields.Numeric, did you by chance find where the 'digits' parameter was assigned or used ?05:05
kstengerI'm looking for it05:06
shroxkstenger: Look at float.py. Numeric basically inherits from it.05:07
kstengerah yes, it's in float.py05:07
kstengerso, if you want to access it, say you have 'line' is your invoice line, then you can access line.unit_price.digits05:09
shroxkstenger: I tried it. Didn't work05:09
kstengerwhat did you get when you tried it ?05:10
shroxkstenger: decimal number (x) has no member named 'digits'05:10
shroxkstenger: where x is the number that was to be in the report05:10
kstengerhmm, ok... let me check some more05:10
kstengeroh, shrox what about line.unit_digits ?05:11
shroxkstenger: That works but I don't think I'm supposed to use that.05:12
kstengerah, ... right.... sorry that's something else05:13
kstengerah... wait I think I know... but I don't remember it on the top of my head let me find it05:18
shroxkstenger: maybe I can help if you can give me an idea about it?05:20
kstengershrox: it should be accessible in code with invoice_line.__class__.unit_price_tax_included.digits[1], but I cannot tell you if this is accessible from the report, try it and see05:21
kstengerah, well... that's for unit_price_tax_included field... so change it for yours :)05:21
kstengerunit_price05:22
shroxkstenger: Okay, let me give it a go :)05:22
shroxkstenger: yup, this was it05:24
-!- kstenger1(~karla@r186-55-66-20.dialup.adsl.anteldata.net.uy) has joined #tryton05:25
kstengerI'm glad it worked shrox :)05:26
kstengershrox: so you are changing this from inside the odt report?05:27
shroxkstenger: Yes, thanks! Though I feel bad about not figuring it out myself.05:27
shroxkstenger: I wouldn't have used __class__05:27
kstengershrox: don't worry, it's the kind of things you will learn about tryton with time :)05:28
shroxkstenger: No, from the xml. I don't think it's possible to do so from the odt.05:28
kstengershrox: ahh, that makes more sense05:29
shroxkstenger: Now to see if it passes cedk's scrutiny, haha.05:29
kstenger:D05:29
-!- smarro(~sebastian@181.16.7.104) has joined #tryton05:30
shroxkstenger: cedk will have to review the binary file ;)06:11
kstengershrox: you may consider using a solution just like the unit_digits, so creating a new attribute to hold the value of the digits for the price, and use this instead of using __class__ directly from the odt file. It will be better to use __class__ from an on_change_with or the like.06:25
kstengershrox: Remember this field may be used later from modules that extend account_invoice to create their own invoice templates, and so this will keep it simple06:26
shroxkstenger: Hmm. I think I can do that for my next patch, if needed.06:27
kstengershrox: 'unit_price_digits' would be a good name I think ;-)06:30
-!- frispete(~frispete@p54A90D0A.dip0.t-ipconnect.de) has joined #tryton07:40
-!- udono(~udono@ip-178-202-239-138.hsi09.unitymediagroup.de) has joined #tryton09:08
-!- ccaz(~ccr@ax313-1-82-66-159-99.fbx.proxad.net) has joined #tryton09:17
-!- JosDzG(~Thunderbi@187.188.72.35) has joined #tryton09:36
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton10:00
-!- udono(~udono@ip-178-202-239-138.hsi09.unitymediagroup.de) has joined #tryton10:16
-!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton10:36
-!- shrox(shrox@nat/iiit/x-ebnfsrmiiexbtuwh) has joined #tryton13:08
-!- Guest41033(~daniel@81.171.58.68) has joined #tryton13:15
Guest41033hi13:15
Guest41033can someone help me with triton installation process?13:15
Guest41033did run pip install trytond and wen't through so far13:16
Guest41033but initializing database with triton -d <dbname> --all says <dbname>.sqlite  doesn't exist13:17
Guest41033what can I do now?13:17
-!- ccaz(~ccr@ax313-1-82-66-159-99.fbx.proxad.net) has left #tryton13:29
aronceroGuest41033: tryton is the client and -d flag is for development mode13:32
Guest41033sry typo error13:33
Guest41033trytond -d <dbname> --all13:33
aronceroGuest41033: are you create a database before?13:33
Guest41033I would like to setup a simple triton server to connect remotely from other machines13:33
Guest41033nope how can i do that?13:33
aroncerostart the server: trytond13:34
aroncerofrom the client conect and from the menu, create database13:34
Guest41033/etc/init.d/tryton-server start?13:35
aronceroare you install form deb or from pip?13:35
Guest41033pip13:35
aroncerojust type trytond, what is happened?13:36
aroncerotrytond -v, better13:36
Guest41033lots of error ... last one "socket already in use"13:37
-!- prayashm(~prayashm@27.49.128.2) has joined #tryton13:40
-!- prayashm(~prayashm@unaffiliated/prayashm) has joined #tryton13:40
aronceroumm13:43
aroncerois the server already running?13:43
aroncerocreate a minimal conf file13:45
Guest41033triton is running now14:00
Guest41033top is proofing that14:01
Guest41033trytond14:01
Guest41033Triton server Password is set in the /etc/tryton/trytond.config?14:11
Guest41033at localist:8000 right?14:12
cedkGuest41033: it depends on what you have set in your configuration: http://doc.tryton.org/3.8/trytond/doc/topics/configuration.html#listen15:26
Guest41033where can I get a minimal configuration?15:47
Guest41033/etc/tryton/trytond.config doesn't exist15:48
Guest41033so it seems that no conning exist15:48
-!- ccaz(~ccr@ax313-1-82-66-159-99.fbx.proxad.net) has joined #tryton15:55
-!- prayashm(~prayash@117.197.249.158) has joined #tryton16:22
-!- aroncero(~aroncero@86.63.19.153) has joined #tryton16:30
cedkGuest41033: minimal == empty file16:41
-!- kstenger1(~karla@r190-134-54-111.dialup.adsl.anteldata.net.uy) has joined #tryton17:28
-!- smarro(~sebastian@181.16.7.104) has joined #tryton17:57
aroncerocedk: with a empty file, what is the default admin password?18:00
aroncerocedk: Can you put the super_pwd as argument?18:00
cedkaroncero: none18:18
cedkaroncero: we don't consider a good practice to define such password18:18
cedkaroncero: it is better to manage the database from the server: http://doc.tryton.org/3.8/trytond/doc/topics/setup_database.html#topics-setup-database18:19
aroncerocedk: I agree, It is not a good practice, so I thought it was necessary a config file to define it18:20
cedkaroncero: no Tryton tries to have good defaults18:42
aroncerocedk: I see :D18:42
-!- aroncero(~aroncero@86.63.19.153) has joined #tryton18:59
-!- aroncero(~aroncero@86.63.19.153) has joined #tryton18:59
-!- aroncero(~aroncero@86.63.19.153) has joined #tryton18:59
-!- kstenger(~karla@r190-134-54-111.dialup.adsl.anteldata.net.uy) has joined #tryton19:05
-!- ljimaz33(57dde69a@gateway/web/freenode/ip.87.221.230.154) has joined #tryton19:28
-!- nicoe(~nicoe@2a02:a03f:3025:800:ee55:f9ff:fe7b:f7ac) has joined #tryton20:27
-!- ccaz(~ccr@ax313-1-82-66-159-99.fbx.proxad.net) has left #tryton22:57
-!- ccaz(~ccr@ax313-1-82-66-159-99.fbx.proxad.net) has joined #tryton23:01
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton23:57

Generated by irclog2html.py 2.11.0 by Marius Gedminas - find it at mg.pov.lt!