Skip to content

[13.0][IMP] multicompany_property_*: allow records without company#110

Open
AdriaGForgeFlow wants to merge 3 commits into13.0from
13.0-multicompany_property-allow_records_without_company_id
Open

[13.0][IMP] multicompany_property_*: allow records without company#110
AdriaGForgeFlow wants to merge 3 commits into13.0from
13.0-multicompany_property-allow_records_without_company_id

Conversation

@AdriaGForgeFlow
Copy link

Currently, the domain filters out all records for which the company is not the same as the company being edited but IMO records without company should be available for all companies.

<field
name="property_account_income_id"
domain="[('deprecated', '=', False),('company_id','=',company_id)]"
domain="[('deprecated', '=', False),'|', ('company_id','=',company_id), ('company_id','=',False)]"
Copy link
Contributor

@LoisRForgeFlow LoisRForgeFlow May 10, 2021

Choose a reason for hiding this comment

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

I wouldn't do the change for everything, I would do it regarding the default security rules or the company_id field in the model. For instance, for account.account company_id is required, so the change won't make sense here IMO.

Copy link
Author

Choose a reason for hiding this comment

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

Done 👍

I have kept the previous domain for all fields for which the related models have the company as a required field.

Copy link
Contributor

Choose a reason for hiding this comment

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

Great, thanks! 👍

@AdriaGForgeFlow AdriaGForgeFlow force-pushed the 13.0-multicompany_property-allow_records_without_company_id branch from 543b473 to 027a01a Compare May 11, 2021 06:25
@AdriaGForgeFlow AdriaGForgeFlow force-pushed the 13.0-multicompany_property-allow_records_without_company_id branch from 027a01a to ec466d1 Compare May 11, 2021 06:28
@MiquelRForgeFlow
Copy link
Contributor

I don't understand first and third commit :S

@LoisRForgeFlow
Copy link
Contributor

I don't understand first and third commit :S

probably they are "legacy" from previous changes, after corrections they can be dropped I think.

@MiquelRForgeFlow
Copy link
Contributor

MiquelRForgeFlow commented Jun 29, 2021

I think we can rebase and drop first and third commit directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants