- Mailing Lists
- Contributors
- Problem when 2 person click same button on the same state at the same time.
Archives
- By thread 1419
-
By date
- August 2019 59
- September 2019 118
- October 2019 165
- November 2019 97
- December 2019 35
- January 2020 58
- February 2020 204
- March 2020 121
- April 2020 172
- May 2020 50
- June 2020 158
- July 2020 85
- August 2020 94
- September 2020 193
- October 2020 277
- November 2020 100
- December 2020 159
- January 2021 38
- February 2021 87
- March 2021 146
- April 2021 73
- May 2021 90
- June 2021 86
- July 2021 123
- August 2021 50
- September 2021 68
- October 2021 66
- November 2021 74
- December 2021 75
- January 2022 98
- February 2022 77
- March 2022 68
- April 2022 31
- May 2022 59
- June 2022 87
- July 2022 141
- August 2022 38
- September 2022 73
- October 2022 152
- November 2022 39
- December 2022 50
- January 2023 93
- February 2023 49
- March 2023 106
- April 2023 47
- May 2023 69
- June 2023 92
- July 2023 64
- August 2023 103
- September 2023 91
- October 2023 101
- November 2023 94
- December 2023 46
- January 2024 75
- February 2024 79
- March 2024 104
- April 2024 63
- May 2024 40
- June 2024 160
- July 2024 80
- August 2024 70
- September 2024 62
- October 2024 121
- November 2024 117
- December 2024 89
- January 2025 59
- February 2025 104
- March 2025 96
- April 2025 107
- May 2025 52
- June 2025 72
- July 2025 60
- August 2025 81
- September 2025 124
- October 2025 63
- November 2025 22
Contributors
Weblate translation locked down for account-analytic-15-0
l10n-estonia status and proposing myself as PSC
Problem when 2 person click same button on the same state at the same time.
- 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.
by Kitti Upariphutthiphong - 07:20 - 9 Jun 2022
Follow-Ups
-
Re: Problem when 2 person click same button on the same state at the same time.
Thanks Raph for confirming.I am also testing, def _check_concurrency(self): without successSeems to be useless without passing __last_update from the client side. May we we keep our hope on v16 OWL.On Fri, Jun 10, 2022 at 10:46 AM Raphaël Valyi <rvalyi@akretion.com> wrote:Yes an old one... A few years ago, some Odoo employee told me they planned to push live changes to all Odoo open sessions (server push). Might be a way to make such possibility extremely unlikely enough. But so far it seems they didn't developp the idea further. I guess the web client JS/OWL overhaul would come first anyway.Well in the places were this is extremely important like accounting move posting or stock reservation, we should ensure we have some sort of checking. In the other places, cross fingers, detect and fix later, try to partition the records processing over the users in ways that tend to avoid concurrent updates...May be leaving tabs open forever should also be avoided. May be some minimal autoresfresh could help and cost little dev...On Thu, Jun 9, 2022, 3:42 PM Kitti U. <kittiu@ecosoft.co.th> wrote:Found this problem discussed wayed back by our OCA people, https://github.com/odoo/odoo/issues/6737After reading, sound not quite possible, does it?On Fri, Jun 10, 2022 at 1:02 AM Kitti U. <kittiu@ecosoft.co.th> wrote: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. <kittiu@ecosoft.co.th> 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 <tom@sunflowerweb.nl> 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?
Thanks!_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Kitti Upariphutthiphong - 06:36 - 10 Jun 2022 -
Re: Problem when 2 person click same button on the same state at the same time.
Yes an old one... A few years ago, some Odoo employee told me they planned to push live changes to all Odoo open sessions (server push). Might be a way to make such possibility extremely unlikely enough. But so far it seems they didn't developp the idea further. I guess the web client JS/OWL overhaul would come first anyway.Well in the places were this is extremely important like accounting move posting or stock reservation, we should ensure we have some sort of checking. In the other places, cross fingers, detect and fix later, try to partition the records processing over the users in ways that tend to avoid concurrent updates...May be leaving tabs open forever should also be avoided. May be some minimal autoresfresh could help and cost little dev...On Thu, Jun 9, 2022, 3:42 PM Kitti U. <kittiu@ecosoft.co.th> wrote:Found this problem discussed wayed back by our OCA people, https://github.com/odoo/odoo/issues/6737After reading, sound not quite possible, does it?On Fri, Jun 10, 2022 at 1:02 AM Kitti U. <kittiu@ecosoft.co.th> wrote: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. <kittiu@ecosoft.co.th> 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 <tom@sunflowerweb.nl> 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?
Thanks!_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by "Raphaël Valyi" <rvalyi@akretion.com> - 05:45 - 10 Jun 2022 -
Re: Problem when 2 person click same button on the same state at the same time.
Found this problem discussed wayed back by our OCA people, https://github.com/odoo/odoo/issues/6737After reading, sound not quite possible, does it?On Fri, Jun 10, 2022 at 1:02 AM Kitti U. <kittiu@ecosoft.co.th> wrote: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. <kittiu@ecosoft.co.th> 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 <tom@sunflowerweb.nl> 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?
Thanks!_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Kitti Upariphutthiphong - 08:41 - 9 Jun 2022 -
Re: Problem when 2 person click same button on the same state at the same time.
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. <kittiu@ecosoft.co.th> 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 <tom@sunflowerweb.nl> 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?
Thanks!_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Kitti Upariphutthiphong - 08:06 - 9 Jun 2022 -
Re: Problem when 2 person click same button on the same state at the same time.
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 <tom@sunflowerweb.nl> 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?
Thanks!_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
_______________________________________________
Mailing-List: https://odoo-community.org/groups/contributors-15
Post to: mailto:contributors@odoo-community.org
Unsubscribe: https://odoo-community.org/groups?unsubscribe
by Kitti Upariphutthiphong - 07:45 - 9 Jun 2022