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

telegram /website/action-json request #447

Open
rosenvladimirov opened this issue Nov 18, 2022 · 3 comments
Open

telegram /website/action-json request #447

rosenvladimirov opened this issue Nov 18, 2022 · 3 comments

Comments

@rosenvladimirov
Copy link

When try to send from Telegram bot chat /start in log is received error:
404 Not Found: The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

@yelizariev
Copy link
Collaborator

Hi
It could be a multi-db issue. You should try to configure --db-filter in odoo.
It might be fixed on Sync Studio level by adding ?db=dbnamehere to the url, but I'm not sure and don't plan to do it soon.

@rosenvladimirov
Copy link
Author

rosenvladimirov commented Nov 22, 2022

I add the db_filter in config file, but is same error.
"POST /website/action-json/f5b7aa72-0fbb-40fb-8117-1fb23d896af1 HTTP/1.1" 404

The odoo is work behind proxy, to fix wrong web.base.url (http) i make small fix

def _get_website_url(self, website_path, webhook_type):
        base_url = self.env["ir.config_parameter"].sudo().get_param("web.base.url")
        if config.get('proxy_mode', False) and not base_url.startswith('https://') and base_url.find('http://') != -1:
            base_url = 'https://' + base_url.split('http://')[1]
        link = (
            website_path
            or (self.action_server_id.id and "%d" % self.action_server_id.id)
            or ""
        )
        if base_url and link:
            path = "website/action-{webhook_type}/{link}".format(
                webhook_type=webhook_type, link=link
            )
            return urls.url_join(base_url, path)
        return ""

@rosenvladimirov
Copy link
Author

I found problem, for moment in config file i add the db_name not db_filter. I will fork repository and will fix session.db in future. Thanks

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

No branches or pull requests

2 participants