Issue 10839

Many2Many fields are duplicating when adding the same record on proteus
Nosy list
ced, pokoli
Assigned to

Created on 2021-10-08.15:20:36 by pokoli, last changed 3 months ago by ced.


Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-10-08.15:39:07

I think it is not necessary to have this behavior in proteus. But if you can implement it easily, you are welcomed.

For the tax, please fill another issue because we need to pur a unique constraint.

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-10-08.15:36:00

Why not? I can not add twice the same record in tryton so proteus should behave the same.
Also, if you open such record from the gtk client only one tax is shown (you should dig into the database to realize that there are two taxes). So there is a incoherence between clients there.

In my scenario my main problem is that the user did not notice that the tax is already there.

Author: [hidden] (ced) Tryton committer Tryton translator
Date: 2021-10-08.15:28:01

For me it is not a bug as you add a second tax. And I'm not sure we want to support the uniqueness of Many2Many in proteus.

Author: [hidden] (pokoli) Tryton committer Tryton translator
Date: 2021-10-08.15:20:36

Steps to reproduce:

  1. Activate account_invoice module
  2. Create a tax and set is as default account for revenue account
  3. Create a new invoice with a line using the revenue account.
  4. Add the tax to the line (which will cause a duplicate because it has been already added by on_change)

Current behaviour:

  • A line with two taxes of the same record is created.

Expected behaviour:

  • Like gtk client only one tax is related to the line (because the added tax is the same)
Date User Action Args
2021-10-08 15:39:07cedsetmessages: + msg70771
2021-10-08 15:36:00pokolisetmessages: + msg70768
2021-10-08 15:28:02cedsetmessages: + msg70767
nosy: + ced
priority: bug -> feature
status: unread -> chatting
2021-10-08 15:20:36pokolicreate

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