In a one2many, you can mark multiple times a record to delete
(Tested in develop branch) For the example we will use the field address in the party model (any one2many will have the same behavior):
- Create an address (using the form view)
- Now if we press the delete button (without switching the view of the address to list), we can see that we can continue pressing the delete button, in this case, we press the delete button three times.
- Save the party
- If we have the verbose activated in the server console, we can see:
30380 140062888007424 [2021-03-30 08:42:05,814] DEBUG trytond.protocols.dispatcher <class 'trytond.pool.party.party'>.write(*([3], {'addresses': [['delete', [5, 5, 5]]]}, {'client': '59cc3a5a-3792-46cf-b312-0f06fee7535e', 'company': 1, 'company.rec_name': 'TEST', 'language': 'en', 'language_direction': 'ltr', 'groups': [6, 7, 1, 4, 2, 5, 3, 8], 'locale': {'date': '%m/%d/%Y', 'grouping': [3, 3, 0], 'decimal_point': '.', 'thousands_sep': ','}, '_timestamp': {'party.party,3': '1617093634.382613', 'party.address,5': '1617093634.382613'}}), **{}) from admin@127.0.0.1/tryton_test/
- As we can see in the log, Tryton trying delete the same address 3 times , as many times as we press the button.