Skip to content

Commit

Permalink
added migration script based 13.0 and removed unrequired ones
Browse files Browse the repository at this point in the history
  • Loading branch information
fredzamoabg authored and TheMule71 committed May 8, 2021
1 parent a8df230 commit 1c19fc3
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 89 deletions.
2 changes: 1 addition & 1 deletion l10n_it_fatturapa_in/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

{
"name": "ITA - Fattura elettronica - Ricezione",
"version": "14.0.2.1.3",
"version": "14.0.1.0.0",
"development_status": "Beta",
"category": "Localization/Italy",
"summary": "Ricezione fatture elettroniche",
Expand Down
13 changes: 0 additions & 13 deletions l10n_it_fatturapa_in/migrations/12.0.1.15.0/post-migration.py

This file was deleted.

51 changes: 0 additions & 51 deletions l10n_it_fatturapa_in/migrations/12.0.2.0.0/post-migration.py

This file was deleted.

24 changes: 0 additions & 24 deletions l10n_it_fatturapa_in/migrations/12.0.2.0.0/pre-migration.py

This file was deleted.

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 l10n_it_fatturapa_in/migrations/13.0.1.0.0/post-migration.py
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;
""",
)

0 comments on commit 1c19fc3

Please sign in to comment.