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] mail_tracking: error when filtering by "Sent" #847

Merged
merged 1 commit into from
Mar 11, 2022
Merged

[FIX] mail_tracking: error when filtering by "Sent" #847

merged 1 commit into from
Mar 11, 2022

Conversation

sugapablo
Copy link
Contributor

Problem:

~/web#action=928&cids=1&menu_id=282&model=mail.tracking.email&view_type=list

Go to: Email Marketing -> Mail Tracking -> Emails
Click Filters and select "Sent"

Error:
Odoo Server Error

Traceback (most recent call last):
File "/opt/odoo13/odoo/odoo/http.py", line 624, in _handle_exception
return super(JsonRequest, self)._handle_exception(exception)
File "/opt/odoo13/odoo/odoo/http.py", line 310, in _handle_exception
raise pycompat.reraise(type(exception), exception, sys.exc_info()[2])
File "/opt/odoo13/odoo/odoo/tools/pycompat.py", line 14, in reraise
raise value
File "/opt/odoo13/odoo/odoo/http.py", line 669, in dispatch
result = self._call_function(**self.params)
File "/opt/odoo13/odoo/odoo/http.py", line 350, in _call_function
return checked_call(self.db, *args, **kwargs)
File "/opt/odoo13/odoo/odoo/service/model.py", line 94, in wrapper
return f(dbname, *args, **kwargs)
File "/opt/odoo13/odoo/odoo/http.py", line 339, in checked_call
result = self.endpoint(*a, **kw)
File "/opt/odoo13/odoo/odoo/http.py", line 915, in call
return self.method(*args, **kw)
File "/opt/odoo13/odoo/odoo/http.py", line 515, in response_wrap
response = f(*args, **kw)
File "/opt/odoo13/odoo/addons/web/controllers/main.py", line 1300, in search_read
return self.do_search_read(model, fields, offset, limit, domain, sort)
File "/opt/odoo13/odoo/addons/web/controllers/main.py", line 1319, in do_search_read
return Model.web_search_read(domain, fields, offset=offset, limit=limit, order=sort)
File "/opt/odoo13/odoo/addons/web/models/models.py", line 48, in web_search_read
records = self.search_read(domain, fields, offset=offset, limit=limit, order=order)
File "/opt/odoo13/odoo/odoo/models.py", line 4960, in search_read
records = self.search(domain or [], offset=offset, limit=limit, order=order)
File "/opt/odoo13/odoo/odoo/models.py", line 1657, in search
res = self._search(args, offset=offset, limit=limit, order=order, count=count)
File "/opt/odoo13/odoo/odoo/models.py", line 4505, in _search
query = self._where_calc(args)
File "/opt/odoo13/odoo/odoo/models.py", line 4227, in _where_calc
where_clause, where_params = e.to_sql()
File "/opt/odoo13/odoo/odoo/osv/expression.py", line 1296, in to_sql
q, ps = self.__leaf_to_sql(leaf)
File "/opt/odoo13/odoo/odoo/osv/expression.py", line 1238, in __leaf_to_sql
raise ValueError("Invalid domain term %r" % (leaf,))
ValueError: Invalid domain term ('state', 'in', 'sent')

Solution:
Minor edit to: mail.tracking.email.search

@oca-clabot
Copy link

Hey @sugapablo, thank you for your Pull Request.

It looks like some users haven't signed our Contributor License Agreement, yet.
You can read and sign our full Contributor License Agreement here: http://odoo-community.org/page/cla
Here is a list of the users:

Appreciation of efforts,
OCA CLAbot

@sugapablo
Copy link
Contributor Author

@oca-clabot emailed agreement to you

@pedrobaeza pedrobaeza added this to the 13.0 milestone Feb 17, 2022
@rafaelbn
Copy link
Member

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 13.0-ocabot-merge-pr-847-by-rafaelbn-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit e702446 into OCA:13.0 Mar 11, 2022
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 9b4eb4c. Thanks a lot for contributing to OCA. ❤️

SiesslPhillip pushed a commit to grueneerde/OCA-social that referenced this pull request Nov 20, 2024
Syncing from upstream OCA/social (8.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants