Contributors mailing list archives

Browse archives


Re: Problem when 2 person click same button on the same state at the same time.

Ecosoft Co. Ltd., Kitti Upariphutthiphong
- 09/06/2022 20:02:39
OK, I think it called the page is "Dirty"

I found from ERPNext on the same scenario, the 2nd person attempt to update, it will show warning like following,

Error: Document has been modified after you have opened it (2022-06-10 00:59:10.014101, 2022-06-10 00:59:24.963271). Please refresh to get the latest document.

This would be good too.

On Fri, Jun 10, 2022 at 12:45 AM Kitti U. <> wrote:
Yes Tom, but with that we need to write checking code everywhere. I wonder if there are better way (or yet some base server module in OCA).

I know that in other big name ERP., such an issue was prevented at the framework level, no way it can happen at all. Such things, when occur in accounting documents, can be a serious one.

Another thing (of the same technical shallowness of Odoo) I experienced iwas, user somehow click reverse document twice (because slow response), and it produce reverse entries twice!

On Fri, Jun 10, 2022 at 12:26 AM Tom Blauwendraat <> wrote:

Regular way is just to check if the sale order is already confirmed, and then don't increase the sequence again.

On 6/9/22 19:22, Kitti U. wrote:
Dear community,

I don't know technical word to describe this. As we knew, Odoo's view is not refreshed in real time as data got updated backend. And this is problematic.

For example,
  • 2 users open the same document at state Draft, and a Confirm Button visible.
  • 1st user clicks Confirm, and document sequence set to 1001
  • 2nd user still see the same Confirm button (as page not refreshed), and click it, sequence now change to 1002 without consent of the first person.
Because Odoo don't have mechanism to prevent this by the framework, and this can happen easily on less mature code.

Anyone have good techniques to prevent this, rather than writing the blocking everywhere?


Post to:

Post to: