-
-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added migration script based 13.0 and removed unrequired ones
- Loading branch information
1 parent
a8df230
commit 1c19fc3
Showing
6 changed files
with
52 additions
and
89 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
13 changes: 0 additions & 13 deletions
13
l10n_it_fatturapa_in/migrations/12.0.1.15.0/post-migration.py
This file was deleted.
Oops, something went wrong.
51 changes: 0 additions & 51 deletions
51
l10n_it_fatturapa_in/migrations/12.0.2.0.0/post-migration.py
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
l10n_it_fatturapa_in/migrations/12.0.2.0.0/pre-migration.py
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
l10n_it_fatturapa_in/migrations/13.0.1.0.0/noupdate_changes.xml
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,8 @@ | ||
<?xml version='1.0' encoding='utf-8' ?> | ||
<odoo> | ||
<record id="fatturapa_in_multi_company_rule" model="ir.rule"> | ||
<field | ||
name="domain_force" | ||
>['|',('company_id','=',False),('company_id','in',company_ids)]</field> | ||
</record> | ||
</odoo> |
43 changes: 43 additions & 0 deletions
43
l10n_it_fatturapa_in/migrations/13.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,43 @@ | ||
# Copyright 2021 Alfredo Zamora - Agile Business Group | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). | ||
|
||
from openupgradelib import openupgrade | ||
|
||
|
||
def migrate(cr, installed_version): | ||
openupgrade.load_data( | ||
cr, "l10n_it_fatturapa_in", "migrations/13.0.1.0.0/noupdate_changes.xml" | ||
) | ||
|
||
openupgrade.logged_query( | ||
cr, | ||
""" | ||
update account_move | ||
set | ||
fatturapa_attachment_in_id = inv.fatturapa_attachment_in_id, | ||
inconsistencies = inv.inconsistencies, | ||
e_invoice_amount_untaxed = inv.e_invoice_amount_untaxed, | ||
e_invoice_amount_tax = inv.e_invoice_amount_tax, | ||
e_invoice_amount_total = inv.e_invoice_amount_total, | ||
e_invoice_reference = inv.e_invoice_reference, | ||
e_invoice_date_invoice = inv.e_invoice_date_invoice, | ||
e_invoice_force_validation = inv.e_invoice_force_validation, | ||
e_invoice_received_date = inv.e_invoice_received_date | ||
from account_invoice inv | ||
where | ||
account_move.id = inv.move_id; | ||
""", | ||
) | ||
|
||
openupgrade.logged_query( | ||
cr, | ||
""" | ||
update einvoice_line | ||
set | ||
invoice_id = am.id | ||
from account_invoice inv | ||
join account_move am on am.id = inv.move_id | ||
where | ||
invoice_id = inv.id; | ||
""", | ||
) |