Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
31 additions
and
14 deletions.
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 |
---|---|---|
@@ -1,3 +1,16 @@ | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
|
||
from . import models | ||
|
||
from odoo import api, SUPERUSER_ID | ||
|
||
|
||
def _assign_account_payment_method_unece_id(cr, registry): | ||
env = api.Environment(cr, SUPERUSER_ID, {}) | ||
code_means_30 = env.ref('account_payment_unece.payment_means_30') | ||
manual_out = env.ref('account.account_payment_method_manual_out') | ||
manual_in = env.ref('account.account_payment_method_manual_in') | ||
(manual_out + manual_in).write({ | ||
'unece_id': code_means_30.id, | ||
'unece_code': code_means_30.code, | ||
}) |
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 was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
account_payment_unece/migrations/12.0.1.0.0/openupgrade_analysis.txt
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
---Fields in module 'account_payment_unece'--- | ||
---XML records in module 'account_payment_unece'--- | ||
---nothing has changed in this module-- |
4 changes: 4 additions & 0 deletions
4
account_payment_unece/migrations/12.0.1.0.0/openupgrade_analysis_work.txt
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
---Fields in module 'account_payment_unece'--- | ||
---XML records in module 'account_payment_unece'--- | ||
---nothing has changed in this module-- | ||
# NOTHING TO DO |
9 changes: 9 additions & 0 deletions
9
account_payment_unece/migrations/12.0.1.0.0/post-migration.py
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright 2019 Eficent <http://www.eficent.com> | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
from openupgradelib import openupgrade | ||
from odoo.addons.account_payment_unece import _assign_account_payment_method_unece_id | ||
|
||
|
||
@openupgrade.migrate() | ||
def migrate(env, version): | ||
_assign_account_payment_method_unece_id(env.cr, env.registry) |