-
Notifications
You must be signed in to change notification settings - Fork 45
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
base: master
Are you sure you want to change the base?
[IMP] IndirectReference.model_filter #195
Conversation
upgradeci retry with always only base |
fbd0600
to
28820de
Compare
There was a problem hiding this 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....
src/util/indirect_references.py
Outdated
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return "(false and {} IS NULL)".format(placeholder) | |
return "(false AND {} IS NULL)".format(placeholder) |
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).
28820de
to
afc1bcd
Compare
@robodoo rebase-ff r+ |
Merge method set to rebase and fast-forward. |
Handle
company_dependent_comodel
in themodel_filter
method. When it's set, there is no model, so returnfalse
(sql boolean).