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] base_automation: do not read all fields #31737

Closed

Conversation

mart-e
Copy link
Contributor

@mart-e mart-e commented Mar 11, 2019

vals may be an empty dict
This may happen a write is done on a computed field, the call to _write will
be empty (still needed to update write_uid/date).

Before this commit, all fields were read in the read call.
This was unecessary and may produce acess-rights errors or other side effect
(e.g. in odoo/enterprise#3778 the technical field ticket_count was read, even
if not present in the view or the write call)

Only compute old_values on the fields that are modified

Fixes odoo/enterprise#3778
opw-1949911

cc @moylop260

vals may be an empty dict
This may happen a write is done on a computed field, the call to _write will
be empty (still needed to update write_uid/date).

Before this commit, all fields were read in the read call.
This was unecessary and may produce acess-rights errors or other side effect
(e.g. in odoo/enterprise#3778 the technical field ticket_count was read, even
if not present in the view or the write call)

Only compute old_values on the fields that are modified

Fixes odoo/enterprise#3778
opw-1949911
@mart-e mart-e force-pushed the 12.0-base-automation-trigger-write-mat branch from 565326d to 48f42f1 Compare March 11, 2019 10:50
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Mar 11, 2019
@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label Mar 11, 2019
Copy link
Member

@rco-odoo rco-odoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

robodoo r+

@robodoo
Copy link
Contributor

robodoo commented Mar 11, 2019

Merged, thanks!

@nim-odoo nim-odoo deleted the 12.0-base-automation-trigger-write-mat branch March 11, 2019 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants