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

[18.0][MIG] queue_job_batch, test_queue_job_batch: Migration to 18.0 #733

Open
wants to merge 47 commits into
base: 18.0
Choose a base branch
from

Conversation

yankinmax
Copy link

@yankinmax yankinmax commented Jan 8, 2025

HELP IS NEEDED

I’ve started the migration and JS code analysis.

The “messaging” JS code was heavily refactored starting v17 with this commit:

I’m not familiar with the module and don’t know how it’s expected to work.

I’ve checked the JS changes and write some pseudo code:

https://github.com/OCA/queue/pull/733/files#diff-bc23bdd925614b2acfed835f19bb33416f7a6f4ee37a15938971d2c309aa2a0e

ping @ivantodorovich

etobella and others added 30 commits January 8, 2025 08:44
[UPD] Update queue_job_batch.pot
* incorrect sintax in security rule
* change missleading name of security rule
standard migration and some little ux improvements: now hide
button is a fa-check button that on click just marks as read
the batch, do not navigate to it and updates immediately
the systray.

[UPD] Update queue_job_batch.pot
[UPD] Update queue_job_batch.pot
[UPD] Update test_queue_job_batch.pot
Copy link
Contributor

@florentx florentx left a comment

Choose a reason for hiding this comment

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

LG

"company_id": company_id,
}
)
return self.sudo().create(vals).with_user(self.env.uid)
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if this syntax can be better:

Suggested change
return self.sudo().create(vals).with_user(self.env.uid)
return self.sudo().create(vals).sudo(False)

Comment on lines +90 to +93
company_id = self.env.user.company_id.id

if "company_id" in self.env.context:
company_id = self.env.context["company_id"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Can also be:

Suggested change
company_id = self.env.user.company_id.id
if "company_id" in self.env.context:
company_id = self.env.context["company_id"]
company_id = self.env.context.get("company_id", self.env.user.company_id.id)

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.