Skip to content

[17.0][FIX] mail_activity_team: singleton in _compute_activity_team_id()#1569

Merged
OCA-git-bot merged 1 commit into
OCA:17.0from
corporatehub:17.0-fix-mail_activity_team-singleton
Feb 12, 2025
Merged

[17.0][FIX] mail_activity_team: singleton in _compute_activity_team_id()#1569
OCA-git-bot merged 1 commit into
OCA:17.0from
corporatehub:17.0-fix-mail_activity_team-singleton

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Otherwise:

Traceback (most recent call last):
  File "/home/odoo/src/odoo/odoo/service/server.py", line 1326, in preload_registries
    registry = Registry.new(dbname, update_module=update_module)
  File "<decorator-gen-16>", line 2, in new
  File "/home/odoo/src/odoo/odoo/tools/func.py", line 87, in locked
    return func(inst, *args, **kwargs)
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 110, in new
    odoo.modules.load_modules(registry, force_demo, status, update_module)
  File "/home/odoo/src/odoo/odoo/modules/loading.py", line 481, in load_modules
    processed_modules += load_marked_modules(env, graph,
  File "/home/odoo/src/odoo/odoo/modules/loading.py", line 365, in load_marked_modules
    loaded, processed = load_module_graph(
  File "/home/odoo/src/odoo/odoo/modules/loading.py", line 206, in load_module_graph
    registry.init_models(env.cr, model_names, {'module': package.name}, new_install)
  File "/home/odoo/src/odoo/odoo/modules/registry.py", line 582, in init_models
    func()
  File "/home/odoo/src/odoo/odoo/addons/base/models/ir_model.py", line 1948, in _reflect_relation
    self.env.invalidate_all()
  File "/home/odoo/src/odoo/odoo/api.py", line 711, in invalidate_all
    self.flush_all()
  File "/home/odoo/src/odoo/odoo/api.py", line 721, in flush_all
    self._recompute_all()
  File "/home/odoo/src/odoo/odoo/api.py", line 717, in _recompute_all
    self[field.model_name]._recompute_field(field)
  File "/home/odoo/src/odoo/odoo/models.py", line 6949, in _recompute_field
    field.recompute(records)
  File "/home/odoo/src/odoo/odoo/fields.py", line 1367, in recompute
    apply_except_missing(self.compute_value, recs)
  File "/home/odoo/src/odoo/odoo/fields.py", line 1340, in apply_except_missing
    func(records)
  File "/home/odoo/src/odoo/odoo/fields.py", line 1389, in compute_value
    records._compute_field_value(self)
  File "/home/odoo/src/odoo/odoo/models.py", line 4913, in _compute_field_value
    fields.determine(field.compute, self)
  File "/home/odoo/src/odoo/odoo/fields.py", line 102, in determine
    return needle(*args)
  File "/home/odoo/src/user/mail_activity_team/wizard/mail_activity_schedule.py", line 29, in _compute_activity_team_id
    .with_context(default_res_model=self.sudo().res_model_id.model)
  File "/home/odoo/src/odoo/odoo/fields.py", line 1148, in __get__
    record.ensure_one()
  File "/home/odoo/src/odoo/odoo/models.py", line 5890, in ensure_one
    raise ValueError("Expected singleton: %s" % self)

@alexey-pelykh
Copy link
Copy Markdown
Author

@vvrossem I think you should be most aware of the area

@vvrossem
Copy link
Copy Markdown
Contributor

@imlopes do you mind reviewing this PR? 🙏

@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). 🤖

@imlopes
Copy link
Copy Markdown

imlopes commented Feb 11, 2025

@yajo possible to merge this ?
thanks

Copy link
Copy Markdown
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

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

/ocabot merge patch

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 17.0-ocabot-merge-pr-1569-by-yajo-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit e4aafdd into OCA:17.0 Feb 12, 2025
@OCA-git-bot
Copy link
Copy Markdown
Contributor

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

@alexey-pelykh alexey-pelykh deleted the 17.0-fix-mail_activity_team-singleton branch February 12, 2025 09:47
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.

6 participants