Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
3
3adentaire_website_payment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Le Filament
3A Dentaire
3adentaire_website_payment
Commits
fe4e5cd7
Commit
fe4e5cd7
authored
11 months ago
by
Rémi - Le Filament
Browse files
Options
Downloads
Patches
Plain Diff
[MIG] migration scripts for keeping fields on account.move
parent
97216963
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
__manifest__.py
+3
-3
3 additions, 3 deletions
__manifest__.py
migrations/13.0.1.0.1/post-migration.py
+19
-0
19 additions, 0 deletions
migrations/13.0.1.0.1/post-migration.py
models/__init__.py
+1
-4
1 addition, 4 deletions
models/__init__.py
models/account_move.py
+1
-1
1 addition, 1 deletion
models/account_move.py
with
24 additions
and
8 deletions
__manifest__.py
+
3
−
3
View file @
fe4e5cd7
{
"
name
"
:
"
3A Dentaire - Account Invoice Online
"
,
"
summary
"
:
"
Option de paiement en ligne
"
,
"
version
"
:
"
1
2
.0.1.0.1
"
,
"
version
"
:
"
1
3
.0.1.0.1
"
,
"
author
"
:
"
Le Filament
"
,
"
license
"
:
"
AGPL-3
"
,
"
application
"
:
False
,
...
...
@@ -11,7 +11,7 @@
"
account_payment
"
,
],
"
data
"
:
[
"
views/account_invoice.xml
"
,
"
templates/account_portal_templates.xml
"
#
"views/account_invoice.xml",
#
"templates/account_portal_templates.xml"
]
}
This diff is collapsed.
Click to expand it.
migrations/13.0.1.0.1/post-migration.py
0 → 100644
+
19
−
0
View file @
fe4e5cd7
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from
openupgradelib
import
openupgrade
def
update_account_move_is_payment_online
(
cr
):
openupgrade
.
logged_query
(
cr
,
"""
UPDATE account_move am
SET is_payment_online = ai.is_payment_online
FROM account_invoice ai
WHERE am.old_invoice_id = ai.id
"""
)
@openupgrade.migrate
(
use_env
=
True
)
def
migrate
(
env
,
version
):
update_account_move_is_payment_online
(
env
.
cr
)
This diff is collapsed.
Click to expand it.
models/__init__.py
+
1
−
4
View file @
fe4e5cd7
# © 2020 Le Filament (<http://www.le-filament.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from
.
import
account_invoice
from
.
import
account_move
This diff is collapsed.
Click to expand it.
models/account_
invoic
e.py
→
models/account_
mov
e.py
+
1
−
1
View file @
fe4e5cd7
...
...
@@ -5,6 +5,6 @@ from odoo import fields, models
class
AccountInvoiceOnline
(
models
.
Model
):
_inherit
=
'
account.
invoic
e
'
_inherit
=
'
account.
mov
e
'
is_payment_online
=
fields
.
Boolean
(
"
Paiement en ligne
"
,
default
=
True
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment