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 #tryton | 23:31 | |
-!- nicoe(~nicoe@2a02:578:858c:500:7e2a:31ff:fe5e:b25d) has joined #tryton | 00:23 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 01:42 | |
-!- yangoon(~mathiasb@i59F72C4C.versanet.de) has joined #tryton | 03:57 | |
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton | 05:34 | |
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton | 07:46 | |
-!- rpit(~rpit@p200300C88F34F900F465798B88F2ECE4.dip0.t-ipconnect.de) has joined #tryton | 08:04 | |
-!- cedk(~ced@gentoo/developer/cedk) has joined #tryton | 08:27 | |
-!- nicoe(~nicoe@2a02:578:858c:500:7e2a:31ff:fe5e:b25d) has joined #tryton | 08:29 | |
-!- Timitos(~kpreisler@host-88-217-184-172.customer.m-online.net) has joined #tryton | 08:44 | |
-!- thaneor1(~lenovo3@r179-25-171-22.dialup.adsl.anteldata.net.uy) has joined #tryton | 09:30 | |
-!- nicoe(~nicoe@2a02:578:858c:500:7e2a:31ff:fe5e:b25d) has joined #tryton | 10:21 | |
-!- mariomop(~quassel@181.90.157.117) has joined #tryton | 11:06 | |
-!- cappumuc_(uid303129@gateway/web/irccloud.com/x-goywkhqmrvirhppf) has joined #tryton | 11:52 | |
-!- lukio(~lukio@190.191.95.243) has joined #tryton | 12:18 | |
-!- lukio(~lukio@190.191.219.148) has joined #tryton | 14:08 | |
-!- smorillo(258799fc@gateway/web/cgi-irc/kiwiirc.com/ip.37.135.153.252) has joined #tryton | 14:22 | |
-!- csotelo(~csotelo@2800:200:f400:23c1:83dd:9b29:5c88:1c4c) has joined #tryton | 14:55 | |
-!- lucascastro(~lucascast@177-185-139-186.isotelco.net.br) has joined #tryton | 17:49 | |
-!- k_valdivia(~k_valdivi@2800:200:f400:23c1:74a2:3695:7bfa:918) has joined #tryton | 18:27 | |
csotelo | hello dear coders, is there a way to restrict party identifiers to avoid no having two parties with the same identifier? thanks | 20:58 |
---|---|---|
-!- semarie(~semarie@unaffiliated/semarie) has joined #tryton | 21:00 | |
cedk | csotelo: no because this is almost always a bad idea | 21:07 |
csotelo | yes.. but on a custommer type writer have save parties more than once | 21:08 |
csotelo | :S | 21:08 |
cedk | csotelo: this will always happen no matter what "protection" you put | 21:13 |
cedk | csotelo: so it is better to merge than put constraint which are too strict | 21:14 |
csotelo | I am thing some retriction based on identifier code | 21:14 |
csotelo | as example, there couldn't be two parties with the same vat .. | 21:15 |
cedk | csotelo: are you really sure? | 21:15 |
csotelo | cedk, yes! completely sure | 21:15 |
cedk | csotelo: constraint (expecially unique) on things that you do not control is always going to fail | 21:16 |
cedk | csotelo: I'm pretty sure it is wrong, no matter what officials say | 21:16 |
csotelo | in 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 |
cedk | csotelo: do what ever you want but this does not solve your duplicate issue and it is going to fail some day | 21:17 |
cedk | csotelo: the real world data never follow the rules | 21:18 |
csotelo | I 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 |
cedk | csotelo: never going to happen in base Tryton | 21:19 |
cedk | csotelo: already been there and it does not work | 21:19 |
csotelo | I understan but I must do :( or at leaast find a way to solve that | 21:20 |
cedk | csotelo: there is nothing to solve as it is not the problem | 21:21 |
csotelo | :( | 21:21 |
cedk | csotelo: merge duplicate when you find them | 21:21 |
cedk | csotelo: best advise when implementing is to say "no" | 21:22 |
csotelo | hmmmm,. since as I understand, is possible to have n parties with same identifier? | 21:23 |
cedk | csotelo: yes and adding a unique constraint will not solve that | 21:23 |
csotelo | :( | 21:23 |
csotelo | I guess, just I guess that is not a good idea | 21:23 |
cedk | csotelo: for example, user does not fill it first and after he can not because there is already one? WTF | 21:24 |
cedk | csotelo: but you may be interrested by https://discuss.tryton.org/t/record-creation-helper/817 | 21:26 |
cedk | this is our thought for a generic solution to prevent duplicates | 21:27 |
csotelo | thanks!! | 21:32 |
-!- thaneor(~lenovo3@179.26.153.16) has joined #tryton | 21:32 | |
csotelo | and aboput filling a record without identifier for doing later .. well that is my point, the validation could be done just on existing identifiers | 21:33 |
cedk | csotelo: so it will not avoid duplicates | 21:42 |
csotelo | hmmm | 21:42 |
csotelo | I will se how I could prevent that on some way | 21:42 |
csotelo | thanks a lot :) | 21:42 |
-!- cryptic(~cryptic@142.196.170.87) has joined #tryton | 21:56 | |
cedk | csotelo: trust me, you can not prevent duplicates but you can help remove them | 22:16 |
csotelo | I see | 22:16 |
csotelo | hmm | 22:16 |
csotelo | ANy way I want to review the whole code and logic | 22:17 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!