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] expression.py: auto_join no require join #31908

Closed

Conversation

Projects
None yet
3 participants
@nle-odoo
Copy link
Contributor

commented Mar 18, 2019

When we search for example:

  self.env['account.analytic.account'].search(
    ['|', ('id', '=', 22), ('partner_id.name', 'ilike', 'yo')]
  )

with a record with ID 22 that has partner_id unset, this would
unexpectedly return no records: because partner_id field is
auto_join=True and so when auto_join'ing we remove any records
that has no partner_id.

This has been reported before, this changeset is an example of it being
fixed (if this was added it would probably be in master).

opw-1816246
opw-1941547
opw-1950010

@nle-odoo nle-odoo added the OE label Mar 18, 2019

@nle-odoo nle-odoo force-pushed the odoo-dev:12.0-expression-py-opw-1816246-nle branch from 23fe3a2 to 0454826 Mar 18, 2019

nle-odoo added a commit to odoo-dev/odoo that referenced this pull request Mar 18, 2019

[FIX] expression.py: auto_join no require join
When we search for example:

```
  self.env['account.analytic.account'].search(
    ['|', ('id', '=', 22), ('partner_id.name', 'ilike', 'yo')]
  )
```

with a record with ID 22 that has partner_id unset, this would
unexpectedly return no records: because partner_id field is
`auto_join=True` and so when auto_join'ing we remove any records
that has no partner_id.

This has been reported before, this changeset is an example of it being
fixed (if this was added it would probably be in master).

opw-1816246
opw-1941547
opw-1950010
closes odoo#31908

@robodoo robodoo added the seen 🙂 label Mar 18, 2019

@mreficent

This comment has been minimized.

Copy link
Contributor

commented Mar 18, 2019

Please check #25182. Although it has more diff, and has a bit different approach, it also provides a test, and maybe you get some inspiration from that.

[FIX] expression.py: auto_join no require join
When we search for example:

```
  self.env['account.analytic.account'].search(
    ['|', ('id', '=', 22), ('partner_id.name', 'ilike', 'yo')]
  )
```

with a record with ID 22 that has partner_id unset, this would
unexpectedly return no records: because partner_id field is
`auto_join=True` and so when auto_join'ing we remove any records
that has no partner_id.

This has been reported before, this changeset is an example of it being
fixed (if this was added it would probably be in master).

opw-1816246
opw-1941547
opw-1950010
closes #31908

@nle-odoo nle-odoo force-pushed the odoo-dev:12.0-expression-py-opw-1816246-nle branch from 0454826 to 5a6d9a7 Mar 18, 2019

@nle-odoo nle-odoo closed this Mar 19, 2019

@robodoo robodoo added the closed 💔 label Mar 19, 2019

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