-
-
Notifications
You must be signed in to change notification settings - Fork 90
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0][FW] ddmrp: multiple ports from 15.0 #300
[14.0][FW] ddmrp: multiple ports from 15.0 #300
Conversation
Hi @JordiBForgeFlow, @LoisRForgeFlow, |
1282b00
to
c30c909
Compare
…s set The onchange only has a visual effect. Actual changes to adu must be made in the create and write methods.
c30c909
to
0c9faae
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for checking
@@ -1917,7 +1917,7 @@ def action_view_future_adu(self): | |||
@api.model | |||
def cron_ddmrp_adu(self, automatic=False): | |||
"""calculate ADU for each DDMRP buffer. Called by cronjob.""" | |||
auto_commit = not getattr(threading.currentThread(), "testing", False) | |||
auto_commit = not getattr(threading.current_thread(), "testing", False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In v14 I can see multiple usages of threading.current_thread()
. Are you sure this is a needed backport?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed, probably not.
I checked on Python 3.7 / 3.8 / 3.9, and both are equivalent:
Python 3.7.3 (default, Oct 31 2022, 14:04:00)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import threading
>>> threading.currentThread == threading.current_thread
True
Python 3.8.10 (default, May 26 2023, 14:05:08)
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import threading
>>> threading.currentThread == threading.current_thread
True
Python 3.9.5 (default, Nov 23 2021, 15:27:38)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import threading
>>> threading.current_thread == threading.currentThread
True
So I guess it's safe to backport it as it's supported on old Python versions (especially the 3.7 which is the one recommended by Odoo I think for v14? I don't remember).
If you prefer to not backport it you tell me!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough, thanks for double checking! I think we can merge as is.
/ocabot merge patch |
What a great day to merge this nice PR. Let's do it! |
Congratulations, your PR was merged at 84ebeef. Thanks a lot for contributing to OCA. ❤️ |
Port of the following PRs from 15.0 to 14.0:
Blacklist of: