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: add message_count on form view only if not explicit in view #34143

Closed
wants to merge 1 commit into from

Conversation

kebeclibre
Copy link
Contributor

On a brand new model, add a brand new model mail.thread as a o2m
(Studio can do this)
now, click on add a line on that o2m

Before this commit, there was a crash in the JS, because of 7f97c9f
In short, message_attachment_count was always injected in the view
Creating the crash in our case, because no valid info was injected

After this commit, we inject the field only if it not present explicitly in the view
The form view of the o2m opens without problems

OPW 1998503

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:

--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label Jun 14, 2019
Copy link
Contributor

@mgeubelle mgeubelle left a comment

Choose a reason for hiding this comment

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

I would have simplified the commit description by just saying that you cannot add the field message_attachment_count in a form view, an add a test in mail that creates a form view with this field.

@kebeclibre
Copy link
Contributor Author

@mge-odoo
Done :D

Before this commit, it was not possible to have the field message_attachment_count
explicitly defined in the form view. It crashed inelegantly if it were the case

After this commit, it is possible to have that field in the form view

OPW 1998503
@mgeubelle
Copy link
Contributor

robodoo r+

@robodoo robodoo added r+ 👌 CI 🤖 Robodoo has seen passing statuses labels Jun 14, 2019
@robodoo robodoo closed this in 6a29dec Jun 14, 2019
@robodoo
Copy link
Contributor

robodoo commented Jun 14, 2019

Merged, thanks!

@fw-bot fw-bot deleted the 12.0-messag-count-lpe branch October 19, 2019 04:47
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

4 participants