IRC logs of #tryton for Friday, 2018-11-02

chat.freenode.net #tryton log beginning Fri Nov 2 00:00:01 CET 2018
-!- udono(~udono@074-130-067-156.ip-addr.inexio.net) has joined #tryton23:31
-!- nicoe(~nicoe@2a02:578:858c:500:7e2a:31ff:fe5e:b25d) has joined #tryton00:23
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton01:42
-!- yangoon(~mathiasb@i59F72C4C.versanet.de) has joined #tryton03:57
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton05:34
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton07:46
-!- rpit(~rpit@p200300C88F34F900F465798B88F2ECE4.dip0.t-ipconnect.de) has joined #tryton08:04
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton08:27
-!- nicoe(~nicoe@2a02:578:858c:500:7e2a:31ff:fe5e:b25d) has joined #tryton08:29
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton08:44
-!- thaneor1(~lenovo3@r179-25-171-22.dialup.adsl.anteldata.net.uy) has joined #tryton09:30
-!- nicoe(~nicoe@2a02:578:858c:500:7e2a:31ff:fe5e:b25d) has joined #tryton10:21
-!- mariomop(~quassel@181.90.157.117) has joined #tryton11:06
-!- cappumuc_(uid303129@gateway/web/irccloud.com/x-goywkhqmrvirhppf) has joined #tryton11:52
-!- lukio(~lukio@190.191.95.243) has joined #tryton12:18
-!- lukio(~lukio@190.191.219.148) has joined #tryton14:08
-!- smorillo(258799fc@gateway/web/cgi-irc/kiwiirc.com/ip.37.135.153.252) has joined #tryton14:22
-!- csotelo(~csotelo@2800:200:f400:23c1:83dd:9b29:5c88:1c4c) has joined #tryton14:55
-!- lucascastro(~lucascast@177-185-139-186.isotelco.net.br) has joined #tryton17:49
-!- k_valdivia(~k_valdivi@2800:200:f400:23c1:74a2:3695:7bfa:918) has joined #tryton18:27
csotelohello dear coders, is there a way to restrict party identifiers to avoid no having two parties with the same identifier? thanks20:58
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton21:00
cedkcsotelo: no because this is almost always a bad idea21:07
csoteloyes.. but on a custommer type writer have save parties more than once21:08
csotelo:S21:08
cedkcsotelo: this will always happen no matter what "protection" you put21:13
cedkcsotelo: so it is better to merge than put constraint which are too strict21:14
csoteloI am thing some retriction based on identifier code21:14
csoteloas example, there couldn't be two parties with the same vat ..21:15
cedkcsotelo: are you really sure?21:15
csotelocedk, yes! completely sure21:15
cedkcsotelo: constraint (expecially unique) on things that you do not control is always going to fail21:16
cedkcsotelo: I'm pretty sure it is wrong, no matter what officials say21:16
csoteloin our country there couldnt be two companies with the same vat, the same for people, no more than one with a dni ( peruvian goverment identification )21:16
cedkcsotelo: do what ever you want but this does not solve your duplicate issue and it is going to fail some day21:17
cedkcsotelo: the real world data never follow the rules21:18
csoteloI am thinking probably on something like a trigger to prevent to save a party is there is more than one with the same identifier, what do you think?21:18
cedkcsotelo: never going to happen in base Tryton21:19
cedkcsotelo: already been there and it does not work21:19
csoteloI understan but I must do :( or at leaast find a way to solve that21:20
cedkcsotelo: there is nothing to solve as it is not the problem21:21
csotelo:(21:21
cedkcsotelo: merge duplicate when you find them21:21
cedkcsotelo: best advise when implementing is to say "no"21:22
csotelohmmmm,. since as I understand, is possible to have n parties with same identifier?21:23
cedkcsotelo: yes and adding a unique constraint will not solve that21:23
csotelo:(21:23
csoteloI guess, just I guess that is not a good idea21:23
cedkcsotelo: for example, user does not fill it first and after he can not because there is already one? WTF21:24
cedkcsotelo: but you may be interrested by https://discuss.tryton.org/t/record-creation-helper/81721:26
cedkthis is our thought for a generic solution to prevent duplicates21:27
csotelothanks!!21:32
-!- thaneor(~lenovo3@179.26.153.16) has joined #tryton21:32
csoteloand aboput filling a record without identifier for doing later .. well that is my point, the validation could be done just on existing identifiers21:33
cedkcsotelo: so it will not avoid duplicates21:42
csotelohmmm21:42
csoteloI will se how I could prevent that on some way21:42
csotelothanks a lot :)21:42
-!- cryptic(~cryptic@142.196.170.87) has joined #tryton21:56
cedkcsotelo: trust me, you can not prevent duplicates but you can help remove them22:16
csoteloI see22:16
csotelohmm22:16
csoteloANy way I want to review the whole code and logic22:17

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