Skip to content

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

Closed
yankinmax wants to merge 47 commits into
OCA:18.0from
yankinmax:18.0-mig-queue_job_batch
Closed

[18.0][MIG] queue_job_batch, test_queue_job_batch: Migration to 18.0#733
yankinmax wants to merge 47 commits into
OCA:18.0from
yankinmax:18.0-mig-queue_job_batch

Conversation

@yankinmax

@yankinmaxyankinmax commented Jan 8, 2025

Copy link
Copy Markdown
Contributor

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

etobellaand 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

@florentxflorentx 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.

LG

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

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.

I wonder if this syntax can be better:

Suggested change
returnself.sudo().create(vals).with_user(self.env.uid)
returnself.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
Copy Markdown
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"inself.env.context:
company_id=self.env.context["company_id"]
company_id=self.env.context.get("company_id", self.env.user.company_id.id)

@ivantodorovich

Copy link
Copy Markdown
Contributor

This PR is still under development.
With the current state the systray widget is broken.
I'll update this PR once we finish it

@ivantodorovich

Copy link
Copy Markdown
Contributor

Sign up for freeto 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.

15 participants

@yankinmax@ivantodorovich@florentx@simahawk@etobella@LoisRForgeFlow@OCA-git-bot@qgroulard@ypapouin@anothingguy@amh-mw@JasminSForgeFlow@Ivorra78@mymage@weblate