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

[IMP] allow making html fields company-dependent #26556

Open
wants to merge 1 commit into
base: 13.0
from

Conversation

@yelizariev
Copy link
Contributor

commented Aug 23, 2018

Description of the issue/feature this PR addresses:

Improve company_dependent attributes possibility

Current behavior before PR:

company_dependent cannot be applied for html fields

Desired behavior after PR is merged:

allow using company_dependent from html fields

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

@it-projects-llc

@a0c

This comment has been minimized.

Copy link
Contributor

commented Aug 30, 2018

Gosh, the proper fix should be smth like this.

The two context.get('uid', uid) parts are needed to avoid having to force_company into context before every write to a property field - as in original commit a4c7c. Having to force_company is inconvenient and error prone as chances are you will forget to force it or will never be able to cover all the possible usages/combinations beforehand. And you have to effectively force_company because more often than not writing happens as sudo(), but admin is generally not guaranteed to be in the company of the current user, which is particularly critical for a company-dependent field (property).

The patch is for v8, sorry. No time for proprietary v11 etc.

@gustavovalverde

This comment has been minimized.

Copy link
Contributor

commented Apr 30, 2019

@pedrobaeza who should we ping for a follow-up on this PR? I was going to make an opw with this issue and found this.

@pedrobaeza

This comment has been minimized.

Copy link
Collaborator

commented Apr 30, 2019

Let's check it if @rco-odoo can take a look

Copy link
Member

left a comment

You also have to add a case for html in the selection field definition (line 42), and in method get_by_record.

I suggest to re-target the PR to 13.0.

@yelizariev yelizariev force-pushed the yelizariev:patch-20 branch from 58b5219 to e3cdb8e Oct 9, 2019
@robodoo robodoo added the seen 🙂 label Oct 9, 2019
@yelizariev yelizariev changed the base branch from master to 13.0 Oct 9, 2019
@robodoo robodoo added the CI 🤖 label Oct 9, 2019
@yelizariev

This comment has been minimized.

Copy link
Contributor Author

commented Oct 10, 2019

@rco-odoo I have done the updates according to your suggestions. Please check

@mreficent

This comment has been minimized.

Copy link
Contributor

commented Oct 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
7 participants
You can’t perform that action at this time.