forked from OCA/version-control-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
18.0 yac yet another changes #5
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
Merged
etobella
merged 21 commits into
dixmit:18.0-add-vcp
from
grap:18.0-YAC-yet-another-changes
Mar 2, 2026
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
8333e65
[IMP] [ADD] vpc_odoo: entry menu item for vcp.odoo.module.version
legalsylvain 93f6094
[FIX] vcp_odoo: set readonly on all 'vcp.odoo.xxx' model fields
legalsylvain ff51064
[REF] vcp_odoo: rename vcp.odoo.lib.python into vcp.odoo.python.libra…
legalsylvain e8e895c
[IMP] vcp_odoo: add two new menu entries for vcp.odoo.python.library …
legalsylvain a8081c4
[IMP] vcp_odoo: display on python.library and bin.package form views,…
legalsylvain 7abefa1
[IMP] Allow to unlink modules
legalsylvain 53fbb0a
[IMP] vcp_management: Add a menu entry for the vcp.request.label mode…
legalsylvain 0b9664d
[IMP] vcp_management: add link from vcp.request to vcp.review
legalsylvain cdd28ff
[IMP] vcp_management: add link from vcp.request to vcp.comment
legalsylvain 67e00ac
[IMP] vcp_*: get 'draft' state of pull requests. add a new 'status' f…
legalsylvain b3aae4a
[IMP] vcp_management: allow to delete pull requests
legalsylvain 69af62c
[IMP] vcp_*: fetch html description
legalsylvain 56d3070
[IMP] vcp_* : improve naming of field, renaming information_update in…
legalsylvain d5aabe0
[REF] vcp_* : harmonize actions. put a path in all actions. rename xm…
legalsylvain 54d2275
[IMP] vcp_* : improve naming of field, renaming information_update in…
legalsylvain 75e9fb8
[IMP] vcp_* : improve naming of field, renaming branch_update into sc…
legalsylvain befb1ed
[IMP] vcp_management: explicit limit in dron definition.
legalsylvain d465f9d
[IMP] vcp_management: add a filter to display only active requests. (…
legalsylvain 51a93d8
[IMP] vpc_management: add vcp.repository.branch menu entry
legalsylvain d6aa041
[FIX] vcp_github: do not create a branch when fetching pull request, …
legalsylvain 3520a5a
[FIX] vcp_management: tests now include parameter limit
legalsylvain File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Copyright 2026 Dixmit | ||
| # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
|
||
| from random import randint | ||
|
|
||
| from odoo import _, api, fields, models, tools | ||
| from odoo.exceptions import UserError | ||
|
|
||
|
|
||
| class VcpRequestLabel(models.Model): | ||
| _name = "vcp.request.label" | ||
| _description = "Vcp Request Label" | ||
|
|
||
| name = fields.Char(required=True, readonly=True) | ||
|
|
||
| color = fields.Char(default=lambda x: x._default_color()) | ||
|
|
||
| request_ids = fields.Many2many( | ||
| comodel_name="vcp.request", | ||
| string="Requests", | ||
| readonly=True, | ||
| ) | ||
|
|
||
| _sql_constraints = [("name_uniq", "unique(name)", "Label name must be unique.")] | ||
|
|
||
| def _default_color(self): | ||
| return randint(1, 11) | ||
|
|
||
| @tools.ormcache("name") | ||
| def _get_label(self, name): | ||
| label = self.search([("name", "=", name)], limit=1) | ||
| if not label: | ||
| label = self.sudo().create({"name": name}) | ||
| return label.id | ||
|
|
||
| @api.ondelete(at_uninstall=False) | ||
| def _check_requests(self): | ||
| if self.mapped("request_ids"): | ||
| raise UserError( | ||
| _( | ||
| "You can not delete labels that are related to Requests. " | ||
| "You should first delete the related requests." | ||
| ) | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we set a limit by default, we may change the default interval type (like every 10 minutes of 30 minutes or 1 hours?) what do you think ? (same for other cron)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in that commit, I just "moved" the default. It was "invisible" and in the code, it is now visible and can be changed by UI, changing the "code" of the cron.
See : befb1ed#diff-b554761c27adb312a1ee5d6b213691f187a281132e08f4525ea9b16d7eb7ba1bL43-R43
About the value, I have absolutely no clue, and I think it depends on the context. I used the code to fetch all grap modules. (250, in custom repo). I had no problem, with the value !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we want to use queue, we should set it in a glue module, it is not a required dependancy.