-
-
Notifications
You must be signed in to change notification settings - Fork 791
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
[MIG] project_task_code: Migration to 17.0 #1355
Open
nedaszilinskas
wants to merge
68
commits into
OCA:17.0
Choose a base branch
from
nedaszilinskas:17.0-mig-project_task_code
base: 17.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
3aea8a9
[MOD] changing from odoomrp to avanzosc
oihane 3d95b9b
[FIX] Code error when copying a task
oihane 3fcb280
[IMP] <project_task_code> adapted to OCA
oihane e25ec21
[IMP] <project_task_code> Added docstring to pre and post init-hooks
oihane 4646b44
[UPD] prefix versions with 8.0
sbidoul 2078811
[MIG] Make modules uninstallable
pedrobaeza 598bbee
[MIG] Rename manifest files
pedrobaeza 97a3d6a
project_task_code module
cubells e31a72c
[MIG] project_task_code: Migrate to 10.0
08c022a
Requested README changes
acbbd63
Requested XML change
c03a69f
OCA Transbot updated translations from Transifex
oca-transbot 626ebd1
[MIG] project_task_code: Migration to 11.0
rodrigets d8deb94
[IMP] Implements name_get() in 'project.task'
rodrigets dac5159
remove obsolete .pot files [ci skip]
sbidoul 49378a3
[UPD] Update project_task_code.pot
oca-travis 51524a4
[MIG] project_task_code: Migration to 12.0
bouvyd ab5f6cc
[MIG] project_task_code: Migration to 12.0 (fix)
alexey-pelykh 6917936
[UPD] Update project_task_code.pot
oca-travis 249b818
Update translation files
oca-transbot 97b2de4
[FIX] project_task_code: invalid variable
alexey-pelykh a9b1e57
Translated using Weblate (Galician)
mvrodriguez 107d1c2
[ADD] icon.png
OCA-git-bot d0ea98b
[FIX][12.0] project_task_code missing api.multi
tbaden e833b29
[UPD] README.rst
OCA-git-bot 9ece6e6
[13.0][MIG] project_task_code
Saran440 4c8647c
[UPD] Update project_task_code.pot
oca-travis 9797233
Update translation files
oca-transbot f0f72b2
pre-commit update
OCA-git-bot e3f4dd3
[UPD] Brainbean Apps => CorporateHub
alexey-pelykh 0dd9d38
[UPD] README.rst
OCA-git-bot 68169cc
[14.0][MIG]project_task_code
Yoshiro009 f4fde64
[UPD] Update project_task_code.pot
oca-travis 521c6e4
[UPD] README.rst
OCA-git-bot 6ad7bf7
Added translation using Weblate (Spanish (Argentina))
ibuioli bb79e25
Translated using Weblate (Spanish (Argentina))
ibuioli 98e3212
Added translation using Weblate (French (France))
Yvesldff 3c5287e
Translated using Weblate (French (France))
Yvesldff 6734f9a
Translated using Weblate (Spanish (Mexico))
alan196 f68cc56
Translated using Weblate (Swedish)
simonstromb 037d2d2
[MIG] project_task_code : Migrate project_task_code.
bizzappdev 6c15de2
[UPD] Update project_task_code.pot
cadf070
[UPD] README.rst
OCA-git-bot e796e64
Translated using Weblate (Catalan)
Noel000 e4c541f
[FIX] project_task_code: in place argument modification
gurneyalex 31b88b8
project_task_code 15.0.1.0.2
OCA-git-bot baf5708
[15.0][FIX] project_task_code: Fix null value in column code, that vi…
yankinmax 60a1f1e
project_task_code 15.0.1.0.3
OCA-git-bot 9a7f482
[IMP] update dotfiles [ci skip]
OCA-git-bot df701df
[FIX] project_task_code: Make sequence avalaible for all companies
rolandojduartem 2312263
project_task_code 15.0.1.0.4
OCA-git-bot bb88d1a
[MIG] project_task_code: Migration to 16.0
kg-ucs d274f00
[FIX] project_task_code: unique code in company
robinkeunen e2ef06e
[UPD] Update project_task_code.pot
86e7bbd
[BOT] post-merge updates
OCA-git-bot a501aaa
Update translation files
weblate eda7fbc
Translated using Weblate (Italian)
mymage c5ec7c3
Translated using Weblate (Spanish)
Ivorra78 2e0bafb
Translated using Weblate (Spanish (Argentina))
ibuioli a2546ec
[16.0][FIX]project_task_code: fix view kanban
DemchukM cef941d
Translated using Weblate (Italian)
mymage decf975
[BOT] post-merge updates
OCA-git-bot 0870475
Translated using Weblate (Portuguese (Brazil))
e4475f3
[IMP] project_task_code Search by code in x2m
ivs-cetmix 2cb60eb
[BOT] post-merge updates
OCA-git-bot f2723dc
[IMP] project_task_code: pre-commit auto fixes
680712a
[MIG] project_task_code: Migration to 17.0
0b3e71f
[IMP] project_task_code: pre-commit auto fixes
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 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 |
---|---|---|
|
@@ -89,6 +89,7 @@ Contributors | |
- Saran Lim. <[email protected]> | ||
- Tharathip Chaweewongphan <[email protected]> | ||
- Ruchir Shukla <[email protected]> | ||
- Nedas Žilinskas <[email protected]> | ||
|
||
Maintainers | ||
----------- | ||
|
This file contains 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 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 |
---|---|---|
@@ -1,30 +1,27 @@ | ||
# Copyright 2016 Tecnativa <[email protected]> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
from odoo import SUPERUSER_ID, api | ||
|
||
|
||
def pre_init_hook(cr): | ||
def pre_init_hook(env): | ||
""" | ||
With this pre-init-hook we want to avoid error when creating the UNIQUE | ||
code constraint when the module is installed and before the post-init-hook | ||
is launched. | ||
""" | ||
cr.execute("ALTER TABLE project_task ADD COLUMN code character varying;") | ||
cr.execute("UPDATE project_task SET code = id;") | ||
env.cr.execute("ALTER TABLE project_task ADD COLUMN code character varying;") | ||
env.cr.execute("UPDATE project_task SET code = id;") | ||
|
||
|
||
def post_init_hook(cr, registry): | ||
def post_init_hook(env): | ||
""" | ||
This post-init-hook will update all existing task assigning them the | ||
corresponding sequence code. | ||
""" | ||
env = api.Environment(cr, SUPERUSER_ID, dict()) | ||
task_obj = env["project.task"] | ||
sequence_obj = env["ir.sequence"] | ||
tasks = task_obj.search([], order="id") | ||
for task_id in tasks.ids: | ||
cr.execute( | ||
env.cr.execute( | ||
"UPDATE project_task SET code = %s WHERE id = %s;", | ||
( | ||
sequence_obj.next_by_code("project.task"), | ||
|
This file contains 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 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 |
---|---|---|
|
@@ -9,3 +9,4 @@ | |
- Saran Lim. \<<[email protected]>\> | ||
- Tharathip Chaweewongphan \<<[email protected]>\> | ||
- Ruchir Shukla \<<[email protected]>\> | ||
- Nedas Žilinskas \<<[email protected]>\> |
This file contains 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 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 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.
This revert is weird. I don't think it works.
16.0 has a
t-if= / t-else=
, same as 17.0