|
|
DescriptionPatch Set 1 #
Total comments: 6
Patch Set 2 : Exclude party instead of id #Patch Set 3 : Exclude contact_mechanisms instead of id #
Total comments: 1
Patch Set 4 : Do not exclude email #MessagesTotal messages: 16
checks OK URL: https://codereview.tryton.org/427221003
Sign in to reply to this message.
https://codereview.tryton.org/427221003/diff/425211003/ir.py File ir.py (right): https://codereview.tryton.org/427221003/diff/425211003/ir.py#newcode61 ir.py:61: exclude.append('id') I do not think it is the id that must be excluded but the contact_mechanisms https://codereview.tryton.org/427221003/diff/425211003/ir.py#newcode62 ir.py:62: exclude.append('email') I do not understand why excluding the email Char? https://codereview.tryton.org/427221003/diff/425211003/ir.py#newcode64 ir.py:64: exclude.append('id') I do not think it is the id that must be excluded but the party because it is already used in _get_address.
Sign in to reply to this message.
Exclude party instead of id
Sign in to reply to this message.
https://codereview.tryton.org/427221003/diff/425211003/ir.py File ir.py (right): https://codereview.tryton.org/427221003/diff/425211003/ir.py#newcode61 ir.py:61: exclude.append('id') On 2022/05/20 13:17:02, ced wrote: > I do not think it is the id that must be excluded but the contact_mechanisms Indeed the fields causing duplicated values are id, email and contact_mechanisms. So we should exclude two of three. I think the best is to use contact_mechanism because in case the party has multiple emails defined all of them will be shown on the template and we let the user choose if he wants to use them all or just filter them out. Using the id or the email will just pick the first one and the user will not notice about the others. https://codereview.tryton.org/427221003/diff/425211003/ir.py#newcode64 ir.py:64: exclude.append('id') On 2022/05/20 13:17:02, ced wrote: > I do not think it is the id that must be excluded but the party because it is > already used in _get_address. Done.
Sign in to reply to this message.
checks OK URL: https://codereview.tryton.org/427221003
Sign in to reply to this message.
https://codereview.tryton.org/427221003/diff/425211003/ir.py File ir.py (right): https://codereview.tryton.org/427221003/diff/425211003/ir.py#newcode61 ir.py:61: exclude.append('id') On 2022/05/23 09:12:20, pokoli wrote: > On 2022/05/20 13:17:02, ced wrote: > > I do not think it is the id that must be excluded but the contact_mechanisms > > Indeed the fields causing duplicated values are id, email and > contact_mechanisms. So we should exclude two of three. > > I think the best is to use contact_mechanism because in case the party has > multiple emails defined all of them will be shown on the template and we let the > user choose if he wants to use them all or just filter them out. I think it goes against the design of contact mechanism with the sequence order and the usage filter. > Using the id or the email will just pick the first one and the user will not > notice about the others. I think this is a good default behavior. The first used contact mechanism should be good enough for most use case. There is no point to force user to always trim addresses.
Sign in to reply to this message.
Exclude contact_mechanisms instead of id
Sign in to reply to this message.
checks OK URL: https://codereview.tryton.org/427221003
Sign in to reply to this message.
https://codereview.tryton.org/427221003/diff/421201003/ir.py File ir.py (right): https://codereview.tryton.org/427221003/diff/421201003/ir.py#newcode62 ir.py:62: exclude.append('email') I do not see why email must be excluded, it is never used.
Sign in to reply to this message.
Do not exclude email
Sign in to reply to this message.
checks OK URL: https://codereview.tryton.org/427221003
Sign in to reply to this message.
New changeset bc92627b6fc9 by Sergi Almacellas Abellana in branch 'default': Avoid duplicated emails in party and contact mechanism default email https://hg.tryton.org/modules/party/rev/bc92627b6fc9
Sign in to reply to this message.
New changeset 07c227942fa1 by Sergi Almacellas Abellana in branch 'default': Avoid duplicated emails in party and contact mechanism default email https://hg.tryton.org/tryton-env/rev/07c227942fa1
Sign in to reply to this message.
New changeset 50b4ba7f33f3 by Sergi Almacellas Abellana in branch '6.4': Avoid duplicated emails in party and contact mechanism default email https://hg.tryton.org/modules/party/rev/50b4ba7f33f3 New changeset 4987942f0c2e by Sergi Almacellas Abellana in branch '6.2': Avoid duplicated emails in party and contact mechanism default email https://hg.tryton.org/modules/party/rev/4987942f0c2e New changeset 81831821a2a2 by Sergi Almacellas Abellana in branch '6.0': Avoid duplicated emails in party and contact mechanism default email https://hg.tryton.org/modules/party/rev/81831821a2a2
Sign in to reply to this message.
|