Skip to content

[19.0] [MIG] mail_template_multi_company : Migration to 19.0#990

Open
stferraro wants to merge 23 commits into
OCA:19.0from
Jenrax-git:19.0-mig-mail_template_multi_company
Open

[19.0] [MIG] mail_template_multi_company : Migration to 19.0#990
stferraro wants to merge 23 commits into
OCA:19.0from
Jenrax-git:19.0-mig-mail_template_multi_company

Conversation

@stferraro

Copy link
Copy Markdown

No description provided.

sbejaoui and others added 22 commits March 6, 2026 14:25
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: multi-company-15.0/multi-company-15.0-mail_template_multi_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-15-0/multi-company-15-0-mail_template_multi_company/
Currently translated at 100.0% (2 of 2 strings)

Translation: multi-company-16.0/multi-company-16.0-mail_template_multi_company
Translate-URL: https://translation.odoo-community.org/projects/multi-company-16-0/multi-company-16-0-mail_template_multi_company/it/
@stferraro

Copy link
Copy Markdown
Author

Hi, @BhaveshHeliconia please check this review and approve

@stferraro stferraro force-pushed the 19.0-mig-mail_template_multi_company branch from 43e6b47 to 22b3bfd Compare May 5, 2026 22:17
"name": "Restricted User",
"login": "restricted_user",
"email": "restricted_user@example.com",
"group_ids": [(6, 0, [self.env.ref("base.group_user").id])],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
"group_ids": [(6, 0, [self.env.ref("base.group_user").id])],
"group_ids": [Command.set([self.env.ref("base.group_user").id])],

@BhaveshHeliconia

Copy link
Copy Markdown
Contributor

@stferraro could you please update the PR title to: [19.0][MIG] mail_template_multi_company: Migration to 19.0

@stferraro stferraro changed the title 19.0 mig mail template multi company [19.0] [MIG] mail_template_multi_company : Migration to 19.0 May 6, 2026
@stferraro stferraro force-pushed the 19.0-mig-mail_template_multi_company branch from 22b3bfd to 920c8b1 Compare May 6, 2026 12:20
@stferraro stferraro requested a review from BhaveshHeliconia May 6, 2026 12:26

@BhaveshHeliconia BhaveshHeliconia left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code review LGTM!

@Karla-Villegas Karla-Villegas left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approved!

@OCA-git-bot

Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

@Yusuke1998 Yusuke1998 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM!

@stferraro

Copy link
Copy Markdown
Author

@OCA-git-bot ping .

@nivels-rig

Copy link
Copy Markdown

it seems that this module has some limitations and bugs in multi-company setups (especially with the "Send by Email" button), it falls back to the standard/global template instead of picking the company-specific one. Will this be improved?

notes: company_id = record.company_id (or current company) and fall back only if none exists.

@stferraro

Copy link
Copy Markdown
Author

Hi, @nivels-rig Thanks for the suggestion! We'll keep this migration scoped to porting the existing behavior. Once this PR is approved, we'll open a separate [IMP] PR to implement company-aware template selection — filtering the template dropdown by the record's company and discarding wrong-company defaults in default_get.

@nivels-rig

Copy link
Copy Markdown

not yet merged?

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.