Tryton - Issues

 

Issue9034

Title Do not copy mandates when duplicate parties
Priority bug Status resolved
Superseder Nosy List ced, josesalvador, pokoli, reviewbot, roundup-bot
Type Components account_payment_sepa
Assigned To josesalvador Keywords review
Reviews 266771002
View: 266771002

Created on 2020-02-03.19:35:24 by josesalvador, last changed by roundup-bot.

Messages
New changeset 76b614fc37ae by José Salvador in branch '5.4':
Do not copy mandates when duplicate parties
https://hg.tryton.org/modules/account_payment_sepa/rev/76b614fc37ae

New changeset 3c561e4368d9 by José Salvador in branch '5.2':
Do not copy mandates when duplicate parties
https://hg.tryton.org/modules/account_payment_sepa/rev/3c561e4368d9

New changeset 38945709f7e3 by José Salvador in branch '5.0':
Do not copy mandates when duplicate parties
https://hg.tryton.org/modules/account_payment_sepa/rev/38945709f7e3
New changeset 00a53d5e615e by José Salvador in branch 'default':
Do not copy mandates when duplicate parties
https://hg.tryton.org/modules/account_payment_sepa/rev/00a53d5e615e
New changeset 3036dd8552e2 by Cédric Krier in branch 'default':
Do not copy mandates when duplicate parties
https://hg.tryton.org/tryton-env/rev/3036dd8552e2
New changeset 00a53d5e615e by José Salvador in branch 'default':
Do not copy mandates when duplicate parties
https://hg.tryton.org/modules/account_payment_sepa/rev/00a53d5e615e
review266771002 updated at https://codereview.tryton.org/266771002/#ps253041002
msg55226 (view) Author: [hidden] (josesalvador) Date: 2020-02-05.16:36:43
Bug title changed
msg55223 (view) Author: [hidden] (josesalvador) Date: 2020-02-04.21:50:26
> Could you please share some steps to reproduce it on a fresh database?

I am not be able to reproduce it in a fresh database :-(

> I know that I'm gonna to say does not have any sense but... when I execute trytond with the --logconf flag it works well without that flag not...

And when Trytond is launched with --dev flag also works... I do not understand this...

Anyway as @ced says there is no reason to copy the mandates when the party is duplicated tomorrow I push a review to solve that.
msg55192 (view) Author: [hidden] (ced) (Tryton committer) (Tryton translator) Date: 2020-02-03.21:26:22
I think it makes sense to not duplicate sepa_mandates from party as the linked bank account will never be valid.
msg55191 (view) Author: [hidden] (pokoli) (Tryton committer) (Tryton translator) Date: 2020-02-03.19:41:37
Could you please share some steps to reproduce it on a fresh database?
msg55190 (view) Author: [hidden] (josesalvador) Date: 2020-02-03.19:39:36
I know that I'm gonna to say does not have any sense but... when I execute trytond with the --logconf flag it works well without that flag not...
msg55189 (view) Author: [hidden] (josesalvador) Date: 2020-02-03.19:35:23
Having a party with a validated SEPA mandate and proper bank account number when I try to duplicate the party Tryton shows a message (translated to english): "The field value of "Account number" of "SEPA Mandate" it is not right under its domain"

I do not see any wrong in the account number domain of Mandate.

Here the trace:

Traceback (most recent call last):
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond-5.2.11-py3.6.egg/trytond/protocols/dispatcher.py", line 186, in _dispatch
    result = rpc.result(meth(*c_args, **c_kwargs))
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond_party-5.2.1-py3.6.egg/trytond/modules/party/party.py", line 205, in copy
    return super(Party, cls).copy(parties, default=default)
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond-5.2.11-py3.6.egg/trytond/model/modelstorage.py", line 400, in copy
    new_records = cls.create(to_create)
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond_party-5.2.1-py3.6.egg/trytond/modules/party/party.py", line 196, in create
    return super(Party, cls).create(vlist)
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond-5.2.11-py3.6.egg/trytond/model/modelsql.py", line 159, in wrapper
    return func(cls, *args, **kwargs)
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond-5.2.11-py3.6.egg/trytond/model/modelsql.py", line 666, in create
    field.set(cls, fname, *fargs)
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond-5.2.11-py3.6.egg/trytond/model/fields/one2many.py", line 241, in set
    actions[action](ids, *args)
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond-5.2.11-py3.6.egg/trytond/model/fields/one2many.py", line 224, in copy
    Target.copy(copies, default=default)
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond_account_payment_sepa-5.2.1-py3.6.egg/trytond/modules/account_payment_sepa/payment.py", line 528, in copy
    return super(Mandate, cls).copy(mandates, default=default)
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond-5.2.11-py3.6.egg/trytond/model/workflow.py", line 57, in copy
    return super().copy(records, default=default)
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond-5.2.11-py3.6.egg/trytond/model/modelstorage.py", line 400, in copy
    new_records = cls.create(to_create)
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond_account_payment_sepa-5.2.1-py3.6.egg/trytond/modules/account_payment_sepa/payment.py", line 505, in create
    return super(Mandate, cls).create(vlist)
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond-5.2.11-py3.6.egg/trytond/model/modelsql.py", line 159, in wrapper
    return func(cls, *args, **kwargs)
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond-5.2.11-py3.6.egg/trytond/model/modelsql.py", line 676, in create
    cls._validate(sub_records)
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond-5.2.11-py3.6.egg/trytond/model/modelstorage.py", line 73, in wrapper
    return func(*args, **kwargs)
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond-5.2.11-py3.6.egg/trytond/model/modelstorage.py", line 1159, in _validate
    validate_domain(field)
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond-5.2.11-py3.6.egg/trytond/model/modelstorage.py", line 1112, in validate_domain
    validate_relation_domain(field, sub_records, Relation, domain)
  File "/home/josesalvador/git/tryton-projects/mentatech/.venv/lib/python3.6/site-packages/trytond-5.2.11-py3.6.egg/trytond/model/modelstorage.py", line 1142, in validate_relation_domain
    **cls.__names__(field.name)))
trytond.model.modelstorage.DomainValidationError: El valor del campo "Número de cuenta" de "Mandato SEPA" no es correcto según su dominio. -
History
Date User Action Args
2020-02-25 22:02:14roundup-botsetmessages: + msg55587
keyword: - backport
2020-02-16 01:33:02roundup-botsetmessages: + msg55389
2020-02-16 00:22:27roundup-botsetmessages: + msg55388
2020-02-16 00:22:12roundup-botsetstatus: testing -> resolved
nosy: + roundup-bot
messages: + msg55387
2020-02-16 00:20:57cedsetkeyword: + backport
2020-02-05 16:54:01reviewbotsetnosy: + reviewbot
messages: + msg55227
2020-02-05 16:46:19josesalvadorsetstatus: in-progress -> testing
2020-02-05 16:46:10josesalvadorsetreviews: 266771002
keyword: + review
2020-02-05 16:43:26josesalvadorsettitle: Do not duplicate mandates when duplicate parties -> Do not copy mandates when duplicate parties
2020-02-05 16:36:44josesalvadorsetmessages: + msg55226
title: Duplicate party with validated SEPA mandate -> Do not duplicate mandates when duplicate parties

Showing 10 items. Show all history (warning: this could be VERY long)