IRC logs of #tryton for Thursday, 2017-07-06

chat.freenode.net #tryton log beginning Thu Jul 6 00:00:01 CEST 2017
-!- smarro(~sebastian@cust-138-45-13-200.trynet.com.ar) has joined #tryton01:12
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton01:47
-!- smarro(~sebastian@cust-138-45-13-200.trynet.com.ar) has joined #tryton02:52
-!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton02:53
-!- thaneor(~ldlc6@179.26.17.69) has joined #tryton02:53
-!- smarro(~sebastian@cust-138-45-13-200.trynet.com.ar) has joined #tryton03:09
-!- smarro(~sebastian@cust-138-45-13-200.trynet.com.ar) has joined #tryton03:40
-!- kstenger(~karla@r190-134-55-99.dialup.adsl.anteldata.net.uy) has joined #tryton05:32
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton06:49
-!- flachtassekasse(~flachtass@5.104.149.54) has joined #tryton07:09
-!- dmollerm(~dmollerm@170.red-80-28-119.staticip.rima-tde.net) has joined #tryton08:20
-!- irclog(~irclog@moretus.b2ck.com) has joined #tryton08:20
-!- udono1(~udono@078-058-210-188.ip-addr.inexio.net) has joined #tryton08:43
-!- mrichez(~smuxi@mail.saluc.com) has joined #tryton08:56
-!- nicoe(~nicoe@2a02:a03f:30b2:3c00:ee55:f9ff:fe7b:f7ac) has joined #tryton09:00
-!- asyncee(~asyncee@91.144.149.242) has joined #tryton10:03
-!- asyncee(~asyncee@91.144.149.242) has joined #tryton10:08
asynceehello, can anyone help me? I need to implement custom authorization module for tryton. Can anyone point me direction how to start?10:10
flachtassekassecedk: i thing i found the problem from yesterday: https://bugs.tryton.org/issue662810:18
dmollermasyncee: since tryton 4.2 custom authentication methods can be plugged. Have a look to the SMS auth module http://hg.tryton.org/modules/authentication_sms/11:01
asynceedmollerm: great, thank you very much!11:02
dmollermasyncee: or to this dummy auth module https://bitbucket.org/calidae/trytond-authentication_dummy/ (intended for development use only)11:02
asynceenice, i'll check it out11:04
dmollermasyncee: and remember to configure the server to use your custom auth! http://doc.tryton.org/4.4/trytond/doc/topics/configuration.html#authentications11:07
asynceedmollerm: thank you. Don't you know if there are some tutorial how to start basic project with tryton for novices on the internet?11:08
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton11:09
dmollermasyncee: I'm not aware of any. I think a skeleton project exists that can be fetched with cookiecutter, but aside from that... the first steps with tryton are tough, take it easy. My approach is to clone lots of known modules in a folder and search for code examples in there11:36
asynceethat's what i do, actually. Anyway, thank you for idea to use cookiecutter skeleton template)11:39
-!- csotelo(~csotelo@2001:1388:49c6:3697:d466:59f2:8025:271d) has joined #tryton11:42
-!- dmollerm(~dmollerm@170.red-80-28-119.staticip.rima-tde.net) has joined #tryton12:35
-!- mariomop(~quassel@181.90.131.198) has joined #tryton12:57
-!- flachtassekasse(~flachtass@5.104.149.54) has joined #tryton14:02
-!- LordVan(~LordVan@gentoo/developer/LordVan) has joined #tryton14:05
-!- kobain(~kobain@unaffiliated/kobain) has joined #tryton14:14
-!- thaneor(~ldlc6@179.26.17.69) has joined #tryton14:35
-!- smarro(~sebastian@181.16.7.104) has joined #tryton14:37
-!- alexbodn(~alex@213.57.190.189) has joined #tryton14:48
-!- thaneor1(~ldlc6@179.26.63.100) has joined #tryton14:55
-!- jcm(~jcm@78.194.214.115) has joined #tryton15:11
-!- cryptic(~cryptic@67-8-35-31.res.bhn.net) has joined #tryton15:17
jcmhi cedk ; I'm porting the sale_rebate you wrote for 2.6 to 4.4. Lurking on some modules extending SaleLine, I see that some use __setup__, like sale_price_list, some other don't, like sale_supply15:20
jcmis there a good way to proceed?15:20
nicoejcm: I don't remember if 2.6 was already using the ActiveRecord pattern (it was almost 5 years ago) you might want to dig in the mailing lists/bugs about pointers on the migration15:34
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton15:51
-!- kstenger(~karla@r186-49-254-216.dialup.adsl.anteldata.net.uy) has joined #tryton16:30
-!- kstenger(~karla@r186-49-254-216.dialup.adsl.anteldata.net.uy) has joined #tryton17:35
-!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton17:57
-!- nicoe(~nicoe@2a02:a03f:30b2:3c00:ee55:f9ff:fe7b:f7ac) has joined #tryton18:14
-!- Telesight(~anthony@4dae0c97.ftth.telfortglasvezel.nl) has joined #tryton19:00
-!- csotelo_at_work(~csotelo@179.43.97.56) has joined #tryton19:34
csotelo_at_workdear coders19:41
csotelo_at_workI could find a way to add identifiers to a party using proteous, and I couldnt find an example :( any suggest https://pastebin.com/22MhC3UK, thanks19:42
kstengercsotelo_at_work: create the Identifier with the party.identifier model, then append it to party.identifiers19:45
csotelo_at_workkstenger, thanks!!! I will try19:47
-!- smarro(~sebastian@host52.181-0-198.telecom.net.ar) has joined #tryton19:50
kstengerWouldn't it be nice to have examples like this https://bugs.tryton.org/msg23706 in the override translation doc (or at least a link to this msg) ?20:18
-!- flachtassekasse(~flachtass@p5DD1940E.dip0.t-ipconnect.de) has joined #tryton20:18
kstengeror at least a clarification that the final dot which separates module and xml_id is mandatory even if xml_id is empty20:22
jcmnicoe: sure, my question was about the two different ways to proceed, with and without __setup__20:36
csotelo_at_workcoders, is there a way on proteus to avoid domain restrictions in a model field?20:41
kstengercsotelo_at_work: shouldn't, up to where I know, proteus respects all the tryton modules' code. Why would there be such need?20:43
kstengercsotelo_at_work: if you need to modify the domain, shouldn't you instead extend the class on another module and modify the domain there?20:46
csotelo_at_workkstenger, I am trying to use proteus to migrate date fropm database to gnuhealth ( tryton finally ) where I have PersonName "gnuhealth.person_name", it has a field depending on party, wich a domain for field "is_person", the issue is : if I update party.party and set is_person = True, it would tell me that I need given on gnuhealth.person_name, but if I try to create gnuhealth.person_name instance, it would tellme I need is_person on part_party20:47
csotelo_at_workkstenger, this is my code https://pastebin.com/DVrs01av20:49
csotelo_at_workI am fighting with it the whole day20:49
kstengercsotelo_at_work: try not to save person_name, append it and then do party.save()20:51
csotelo_at_workkstenger, I have done that20:52
csotelo_at_workI will try again20:53
kstengerCan you give me a link to see how PersonName is defined ?20:53
csotelo_at_workkstenger, do you mean on gnuhealth repository??20:55
kstengeryeah20:55
csotelo_at_workwhen I do party.person_names = person_names gives me AttributeError20:56
csotelo_at_workI will look for it20:56
kstengercsotelo_at_work: append20:57
csotelo_at_workhttp://hg.savannah.gnu.org/hgweb/health/file/6a9b86767b34/tryton/health/health.py#l79120:57
csotelo_at_workkstenger, when I try to append to party.person_names(person_name) it gives me an error related to a person_name field restriction, "given"20:59
kstengercsotelo_at_work: Probably you should create the party, use is_person=True, don't save it, then create the PersonName, and do person_name.party = party, then do person_name.save()21:00
csotelo_at_workI ma working on existing data values..21:02
csotelo_at_workthat is the reason on working on existing datat.. where is_person is False, them I try to set it to True and add person_names21:02
csotelo_at_workon both model demain an restrictions restrcit to me to update data21:03
kstengercsotelo_at_work: what happens if you modify your party.is_person to True without saving?21:04
csotelo_at_workAnd try to save person_name? it told me that is no part of the domain is_person21:05
kstengercsotelo_at_work: can I see the code where you tried this ?21:06
csotelo_at_workI al so try to update a field on the client, neither is possible21:06
csotelo_at_workif the record was created with is_person as false, trying to set it to is_person to True is no possible21:07
csotelo_at_workI guess is a bidrectional restriction21:08
csotelo_at_workI must try editing on database before doing and update21:08
csotelo_at_workI will try thya21:08
csotelo_at_workthat*21:08
csotelo_at_workkstenger, doing some fixes on database it works21:17
kstengercsotelo_at_work: I guess doing it from proteus is not the best, I wonder if you should instead use __register__21:19
kstengeras it seems you are converting from some previous version21:19
csotelo_at_workI could solve this issues21:19
csotelo_at_workI am miugrating from mssql to tryton database21:20
csotelo_at_workfrom a invoincing system toa  tryton / gnuhealth21:20
kstengerthen you should be able to create the party as you create the person_name... but if you already got it working...21:21
-!- smarro(~sebastian@181.16.7.104) has joined #tryton21:47
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton22:01
-!- JosDzG(~Thunderbi@189.250.45.130) has joined #tryton22:19

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