-
Notifications
You must be signed in to change notification settings - Fork 23k
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
[DOC] Add words of caution about sudo
#9655
Conversation
@lmignon I propose to update the official docs with what I understand from you comments in OCA/stock-logistics-warehouse#81 (comment) and OCA/stock-logistics-warehouse#93 (comment) |
@odony would you agree with adding this bit of documentation please? |
That looks good, although the pseudo-paragraphs in the text are not going to work once compiled to RST, either create "genuine" paragraphs in plain text (with a blank line inbetween) or create single paragraphs, but not just carriage returns between sentences. Might be good to use warning rST directives as well for better visibility, for the cache and multi-company parts at least. |
ce3ec4a
to
b0237ba
Compare
Amended as suggested by @xmo-odoo. |
b0237ba
to
2a38b76
Compare
2a38b76
to
fbd48fa
Compare
maybe |
@@ -5306,6 +5306,10 @@ def with_env(self, env): | |||
""" Returns a new version of this recordset attached to the provided | |||
environment | |||
|
|||
.. warning:: | |||
The new environment may not benefit from the initial environment's | |||
data cache. This may introduce performance problems. |
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.
May I suggest a wording change?
The new environment will not benefit from the current environment's
data cache, so later data access may incur extra delays while re-fetching
from the database.
My main point is that it doesn't introduce "problems", it may cause extra delays that may or may not be a problem (user-facing actions vs background jobs, etc.) The documentation should just state the facts, the developer should infer the consequences according to his particular application.
On 11/20/2015 12:02 PM, Lionel Sausin wrote:
Yes, |
Well, based on this additional very welcome documentation for devs I thought about maybe doing it even better and respect the company from the original environment? I don't know if this is easily possible concerning other side-effects but it seems not impossible on a quick look in sudo... At least this is what I did in v7 for my multicompany instance to change the company of the sudo user back and forth to actually get it right. My 2 cents about this issue. |
@wtaferner this is out of scope here but you could file an issue about it. |
still objective hopefully
51b3b5b
to
90f0149
Compare
@clonedagain |
@odony I integrated your suggestions but added an the concrete examples of default company and default BoM. |
@wtaferner no problem you're welcome |
Merged/squashed at 6188bc6 in 8.0, thanks! |
sudo
may introduce perfs problem and break multi-company features when used without caution.This adds the needed documentation.