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

⚡ different template users for each website #993

Open
wants to merge 1 commit into
base: 11.0
Choose a base branch
from

Conversation

KolushovAlexandr
Copy link

No description provided.

@trojikman
Copy link
Contributor

Привет! Запусти пожалуйста у себя в репозитории команду pre-commit run --all, чтобы исправить линты

Copy link
Collaborator

@yelizariev yelizariev left a comment

Choose a reason for hiding this comment

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

I don't think that auth_signup can be in depedencies of this module. I'd suggest to inherit _signup_create_user method. In that case we don't need to add auth_signup to dependencies. But it doesn't fit the purpose of the module "Website switcher in backend". Proper place for the feature would be https://github.com/itpp-labs/website-addons/tree/11.0/website_multi_company_portal or a new module auth_signup_multi_website

@api.multi
def create_new_template_user_id(self):
IrConfigParameter = self.env["ir.config_parameter"].sudo()
user_id = IrConfigParameter.get_param("auth_signup.template_user_id", "False")
Copy link
Collaborator

Choose a reason for hiding this comment

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

auth_signup is not in depedencies of web_website module

Copy link
Author

Choose a reason for hiding this comment

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

Yes, you're right, forgot to test this case. Website module is in dependencies and it uses such structures but they won't lead to an error.
https://github.com/odoo/odoo/blob/11.0/addons/website/models/res_config_settings.py#L94
Should i do a new auth_signup_multi_website module then? It is a more general approach and allows to use built-in methods

Copy link
Collaborator

Choose a reason for hiding this comment

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

new module auth_signup_multi_website should be fine.
FYI: odoo 13 already support this feature

@trojikman trojikman added this to the 11.0 milestone Jul 3, 2020
@trojikman trojikman removed the 11.0 label Jul 3, 2020
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.

None yet

3 participants