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

[FW][FIX][14.0][accounting][l10n_lu] Notify account manager one by one #3119912 #109170

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented Jan 5, 2023

Description of the issue/feature this PR addresses:
Traceback during update of Odoo accounting.

  File "/home/francois/.virtualenvs/odoo-abitare14/lib/python3.8/site-packages/odoo/addons/l10n_lu/migrations/2.1/post-migrate_update_taxes.py", line 6, in migrate
    update_taxes_from_templates(cr, 'l10n_lu.lu_2011_chart_1')
  File "/home/francois/.virtualenvs/odoo-abitare14/lib/python3.8/site-packages/odoo/addons/account/models/chart_template.py", line 156, in update_taxes_from_templates
    _notify_accountant_managers(outdated_taxes)
  File "/home/francois/.virtualenvs/odoo-abitare14/lib/python3.8/site-packages/odoo/addons/account/models/chart_template.py", line 131, in _notify_accountant_managers
    partner_managers_ids.message_post(
  File "/home/francois/.virtualenvs/odoo-abitare14/lib/python3.8/site-packages/odoo/addons/rating/models/mail_thread.py", line 14, in message_post
    message = super(MailThread, self).message_post(**kwargs)
  File "/home/francois/.virtualenvs/odoo-abitare14/lib/python3.8/site-packages/odoo/addons/mail/models/mail_thread.py", line 1823, in message_post
    self.ensure_one()  # should always be posted on a record, use message_notify if no record
  File "/home/francois/.virtualenvs/odoo-abitare14/lib/python3.8/site-packages/odoo/models.py", line 5028, in ensure_one
    raise ValueError("Expected singleton: %s" % self)

Current behavior before PR:
NA

Desired behavior after PR is merged:
The update should work.

To reproduce, you just need to have a previous version of l10n_lu module and more than 1 account manager.
Then update your Odoo and you'll have the traceback.

Ticket #3119912


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

Forward-Port-Of: #109062

@robodoo
Copy link
Contributor

robodoo commented Jan 5, 2023

@fw-bot
Copy link
Contributor Author

fw-bot commented Jan 5, 2023

This PR targets saas-15.3 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label Jan 5, 2023
@C3POdoo C3POdoo added the RD research & development, internal work label Jan 5, 2023
@fw-bot
Copy link
Contributor Author

fw-bot commented Jan 5, 2023

@acsonefho @william-andre the next pull request (#109176) is in conflict. You can merge the chain up to here by saying

@fw-bot r+

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@william-andre
Copy link
Contributor

@fw-bot r+

robodoo pushed a commit that referenced this pull request Jan 5, 2023
closes #109170

X-original-commit: 7f62a1b
Signed-off-by: William André (wan) <wan@odoo.com>
@robodoo robodoo temporarily deployed to merge January 5, 2023 13:25 Inactive
@robodoo robodoo closed this Jan 5, 2023
@fw-bot fw-bot deleted the saas-15.3-14.0-notify_account_manager_one_by_one-JovM-fw branch January 19, 2023 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwardport This PR was created by @fw-bot RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants