Skip to content
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

[FIX] mail: update document name=>activity name #31850

Closed
wants to merge 1 commit into
base: 12.0
from

Conversation

Projects
None yet
2 participants
@nle-odoo
Copy link
Contributor

nle-odoo commented Mar 14, 2019

The activities "Document Name" (res_name) are computed and stored by
getting them on original document, so if we change name of original
model => the activity names are not updated.

With this change we recompute them so if for example we show an
"Activity" view we don't get old names no longer existing.

note: by default you can only write on your activities, so this would
only affect activities you see on current record (so if the document
name is translatable, this should not be an issue)

opw-1949437

@nle-odoo nle-odoo added the OE label Mar 14, 2019

@nle-odoo nle-odoo force-pushed the odoo-dev:12.0-mail-opw-1949437-nle branch Mar 14, 2019

@robodoo robodoo added the seen 🙂 label Mar 14, 2019

@nle-odoo nle-odoo force-pushed the odoo-dev:12.0-mail-opw-1949437-nle branch Mar 14, 2019

@robodoo robodoo added the CI 🤖 label Mar 14, 2019

[FIX] mail: activity document name=>updated name
The activities "Document Name" (res_name) are computed and stored by
getting them on original document, so if we change name of original
model => the activity names are not updated.

Thus the document name we see we showing the "Activity" view is the one
that was used when activities were created with an odd heuristic (by
inverse order of activity type and max alphabetical value) and not
translated.

With this changeset we ignore "Document Name" and directly get names of
records when display "Activity" view.

note: the changeset also filter out activities on document we can reads:
this was done when a domain was set but not otherwise so access error
could be easily gotten.

opw-1949437
closes #31850

@nle-odoo nle-odoo force-pushed the odoo-dev:12.0-mail-opw-1949437-nle branch to 38b6e04 Mar 14, 2019

@robodoo robodoo added CI 🤖 and removed CI 🤖 labels Mar 14, 2019

@nle-odoo

This comment has been minimized.

Copy link
Contributor Author

nle-odoo commented Mar 19, 2019

Ok, test when having records we see, we don't see and with name changed (and translations should work now).

As a side note, if there was no domain with the previous code we would see all activity even for records we do not have access or do not see exist.

robodoo r+

@robodoo robodoo added the r+ 👌 label Mar 19, 2019

robodoo pushed a commit that referenced this pull request Mar 19, 2019

[FIX] mail: activity document name=>updated name
The activities "Document Name" (res_name) are computed and stored by
getting them on original document, so if we change name of original
model => the activity names are not updated.

Thus the document name we see we showing the "Activity" view is the one
that was used when activities were created with an odd heuristic (by
inverse order of activity type and max alphabetical value) and not
translated.

With this changeset we ignore "Document Name" and directly get names of
records when display "Activity" view.

note: the changeset also filter out activities on document we can reads:
this was done when a domain was set but not otherwise so access error
could be easily gotten.

opw-1949437
closes #31850

Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
@robodoo

This comment has been minimized.

Copy link
Contributor

robodoo commented Mar 19, 2019

Merged, thanks!

@robodoo robodoo closed this Mar 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.