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] IndirectReference.model_filter #195

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

KangOl
Copy link
Contributor

@KangOl KangOl commented Jan 16, 2025

Handle company_dependent_comodel in the model_filter method. When it's set, there is no model, so return false (sql boolean).

@KangOl KangOl requested a review from aj-fuentes January 16, 2025 13:31
@robodoo
Copy link
Contributor

robodoo commented Jan 16, 2025

Pull request status dashboard

@KangOl
Copy link
Contributor Author

KangOl commented Jan 16, 2025

upgradeci retry with always only base

@KangOl KangOl force-pushed the master-IR-model_filter-company_dependent_comodel-chs branch from fbd0600 to 28820de Compare January 16, 2025 13:44
Copy link
Contributor

@aj-fuentes aj-fuentes left a comment

Choose a reason for hiding this comment

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

some nits, I will ensure I understand this to be able to say more....

@@ -19,11 +19,15 @@ def model_filter(self, prefix="", placeholder="%s"):
else:
column = self.res_model

if column is None:
# `model` is not set when `company_dependent_comodel` is.
return "(false and {} IS NULL)".format(placeholder)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return "(false and {} IS NULL)".format(placeholder)
return "(false AND {} IS NULL)".format(placeholder)

src/util/indirect_references.py Show resolved Hide resolved
src/util/indirect_references.py Show resolved Hide resolved
Handle `company_dependent_comodel` in the `model_filter` method. When
it's set, there is no model, so return `false` (sql boolean).
Correct default values. `company_dependent_comodel` should also have a
default.
(Actually, as the defaults are pushed from the end, it's `res_id` that
didn't have any).
@KangOl KangOl force-pushed the master-IR-model_filter-company_dependent_comodel-chs branch from 28820de to afc1bcd Compare January 17, 2025 12:59
@KangOl
Copy link
Contributor Author

KangOl commented Jan 17, 2025

@robodoo rebase-ff r+

@robodoo
Copy link
Contributor

robodoo commented Jan 17, 2025

Merge method set to rebase and fast-forward.

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