diff --git a/.idea/easy_migration.iml b/.idea/easy_migration.iml index 15491a6..86e6cc0 100644 --- a/.idea/easy_migration.iml +++ b/.idea/easy_migration.iml @@ -2,7 +2,7 @@ - + diff --git a/.idea/misc.xml b/.idea/misc.xml index 60c0fc9..22e562a 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -5,5 +5,5 @@ - + \ No newline at end of file diff --git a/migration/models/__init__.py b/migration/models/__init__.py index 8d98792..05701c5 100644 --- a/migration/models/__init__.py +++ b/migration/models/__init__.py @@ -1,11 +1,24 @@ # Copyright 2024 Ahmet Yiğit Budak (https://github.com/yibudak) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +from . import account +# from . import analytic # from . import base -# from . import uom +# from . import bus +# from . import calendar +# from . import crm +# from . import digest +# from . import hr +# from . import mail +# from . import payment # from . import product +# from . import project +# from . import purchase +# from . import rating +# from . import resource # from . import sale +# from . import stock +# from . import survey +# from . import uom # from . import utm -# from . import hr -# from . import project -# from . import mail -from . import stock diff --git a/migration/models/account/__init__.py b/migration/models/account/__init__.py new file mode 100644 index 0000000..e848728 --- /dev/null +++ b/migration/models/account/__init__.py @@ -0,0 +1,27 @@ +# Copyright 2024 Ahmet Yiğit Budak (https://github.com/yibudak) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +# from . import account_account +# from . import account_account_tag +# from . import account_bank_statement +# from . import account_bank_statement_line +# from . import account_cash_rounding +# from . import account_full_reconcile +# from . import account_group +# from . import account_incoterms +# from . import account_invoice +# from . import account_journal +# from . import account_move +# from . import account_move_line +# from . import account_partial_reconcile +# from . import account_payment +# from . import account_payment_method +# from . import account_payment_term +# from . import account_payment_term_line +# from . import account_reconcile_model +# from . import account_tag +# from . import account_tax +# from . import account_tax_group +# from . import account_tax_template + diff --git a/migration/models/account/account_account.py b/migration/models/account/account_account.py new file mode 100644 index 0000000..ed8dfd5 --- /dev/null +++ b/migration/models/account/account_account.py @@ -0,0 +1,37 @@ +# Copyright 2024 Ahmet Yiğit Budak (https://github.com/yibudak) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountAccount(BaseMapper): + _name = "account.account" + _OLD_TABLE_NAME = "account_account" + _NEW_TABLE_NAME = "account_account" + + @mapping + def root_id(self, record): + return {"root_id": None} # New Field + + @mapping + def account_type(self, record): + return {"account_type": None} # New Field + + @mapping + def non_trade(self, record): + return {"non_trade": None} # New Field + + @mapping + def is_off_balance(self, record): + return {"is_off_balance": None} # New Field + + @mapping + def include_initial_balance(self, record): + return {"include_initial_balance": None} + + @mapping + def message_main_attachment_id(self, record): + return {"message_main_attachment_id": None} # New to this model + + +models_tree.add(AccountAccount) diff --git a/migration/models/account/account_account_tag.py b/migration/models/account/account_account_tag.py new file mode 100644 index 0000000..57a2164 --- /dev/null +++ b/migration/models/account/account_account_tag.py @@ -0,0 +1,22 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountAccountTag(BaseMapper): + _name = "account.account.tag" + _OLD_TABLE_NAME = "account_account_tag" + _NEW_TABLE_NAME = "account_account_tag" + + @mapping + def tax_negate(self, record): + return {"tax_negate": None} + + @mapping + def country_id(self, record): + return {"country_id": None} + + +models_tree.add(AccountAccountTag) diff --git a/migration/models/account/account_bank_statement.py b/migration/models/account/account_bank_statement.py new file mode 100644 index 0000000..ac83183 --- /dev/null +++ b/migration/models/account/account_bank_statement.py @@ -0,0 +1,23 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountBankStatement(BaseMapper): + _name = "account.bank.statement" + _OLD_TABLE_NAME = "account_bank_statement" + _NEW_TABLE_NAME = "account_bank_statement" + + @mapping + def first_line_index(self, record): + return {"first_line_index": None} # New Field + + @mapping + def is_complete(self, record): + return {"is_complete": None} # New Field + + + +models_tree.add(AccountBankStatement) diff --git a/migration/models/account/account_bank_statement_line.py b/migration/models/account/account_bank_statement_line.py new file mode 100644 index 0000000..94cd261 --- /dev/null +++ b/migration/models/account/account_bank_statement_line.py @@ -0,0 +1,43 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountBankStatementLine(BaseMapper): + _name = "account.bank.statement.line" + _OLD_TABLE_NAME = "account_bank_statement_line" + _NEW_TABLE_NAME = "account_bank_statement_line" + + @mapping + def is_reconciled(self, record): + return {"is_reconciled": None} # New Field + + @mapping + def amount_residual(self, record): + return {"amount_residual": None} # New Field + + @mapping + def payment_ref(self, record): + return {"payment_ref": None} # New Field + + @mapping + def foreign_currency_id(self, record): + return {"foreign_currency_id": None} # New to this model + + @mapping + def internal_index(self, record): + return {"internal_index": None} # New Field + + @mapping + def move_id(self, record): + return {"move_id": None} # New to this model + + @mapping + def transaction_type(self, record): + return {"transaction_type": None} # New Field + + + +models_tree.add(AccountBankStatementLine) diff --git a/migration/models/account/account_cash_rounding.py b/migration/models/account/account_cash_rounding.py new file mode 100644 index 0000000..416cf4e --- /dev/null +++ b/migration/models/account/account_cash_rounding.py @@ -0,0 +1,14 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountCashRounding(BaseMapper): + _name = "account.cash.rounding" + _OLD_TABLE_NAME = "account_cash_rounding" + _NEW_TABLE_NAME = "account_cash_rounding" + + +models_tree.add(AccountCashRounding) diff --git a/migration/models/account/account_full_reconcile.py b/migration/models/account/account_full_reconcile.py new file mode 100644 index 0000000..43d42b8 --- /dev/null +++ b/migration/models/account/account_full_reconcile.py @@ -0,0 +1,14 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountFullReconcile(BaseMapper): + _name = "account.full.reconcile" + _OLD_TABLE_NAME = "account_full_reconcile" + _NEW_TABLE_NAME = "account_full_reconcile" + + +models_tree.add(AccountFullReconcile) diff --git a/migration/models/account/account_group.py b/migration/models/account/account_group.py new file mode 100644 index 0000000..3f37aa5 --- /dev/null +++ b/migration/models/account/account_group.py @@ -0,0 +1,27 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountGroup(BaseMapper): + _name = "account.group" + _OLD_TABLE_NAME = "account_group" + _NEW_TABLE_NAME = "account_group" + + @mapping + def company_id(self, record): + return {"company_id": 1} + + @mapping + def code_prefix_start(self, record): + return {"code_prefix_start": None} + + @mapping + def code_prefix_end(self, record): + return {"code_prefix_end": None} + + + +models_tree.add(AccountGroup) diff --git a/migration/models/account/account_incoterms.py b/migration/models/account/account_incoterms.py new file mode 100644 index 0000000..0468247 --- /dev/null +++ b/migration/models/account/account_incoterms.py @@ -0,0 +1,14 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountIncoterms(BaseMapper): + _name = "account.incoterms" + _OLD_TABLE_NAME = "account_incoterms" + _NEW_TABLE_NAME = "account_incoterms" + + +models_tree.add(AccountIncoterms) diff --git a/migration/models/account/account_invoice.py b/migration/models/account/account_invoice.py new file mode 100644 index 0000000..829b050 --- /dev/null +++ b/migration/models/account/account_invoice.py @@ -0,0 +1,166 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountMove(BaseMapper): + _name = "account.move" + _OLD_TABLE_NAME = "account_invoice" + _NEW_TABLE_NAME = "account_move" + + @mapping + def is_storno(self, record): + return {"is_storno": None} + + @mapping + def amount_residual_signed(self, record): + return {"amount_residual_signed": None} + + @mapping + def auto_post_origin_id(self, record): + return {"auto_post_origin_id": None} + + @mapping + def stock_move_id(self, record): + return {"stock_move_id": None} + + @mapping + def invoice_payment_term_id(self, record): + return {"invoice_payment_term_id": None} # New to this model + + @mapping + def reversed_entry_id(self, record): + return {"reversed_entry_id": None} # New to this model + + @mapping + def is_move_sent(self, record): + return {"is_move_sent": None} #boolean + + @mapping + def tax_cash_basis_origin_move_id(self, record): + return {"tax_cash_basis_origin_move_id": None} # New to this model + + @mapping + def ref(self, record): + return {"ref": None} # New to this model + + @mapping + def invoice_source_email(self, record): + return {"invoice_source_email": None} + + @mapping + def amount_total_in_currency_signed(self, record): + return {"amount_total_in_currency_signed": None} + + @mapping + def move_type(self, record): + return {"move_type": None} #selection # Old Name : type + + @mapping + def amount_residual(self, record): + return {"amount_residual": None} + + @mapping + def invoice_incoterm_id(self, record): + return {"invoice_incoterm_id": None} + + @mapping + def secure_sequence_number(self, record): + return {"secure_sequence_number": None} + + @mapping + def tax_cash_basis_rec_id(self, record): + return {"tax_cash_basis_rec_id": None} + + @mapping + def auto_post_until(self, record): + return {"auto_post_until": None} + + @mapping + def payment_id(self, record): + return {"payment_id": None} + + @mapping + def narration(self, record): + return {"narration": None} + + @mapping + def invoice_origin(self, record): + return {"invoice_origin": None} + + @mapping + def payment_reference(self, record): + return {"payment_reference": None} + + @mapping + def sequence_prefix(self, record): + return {"sequence_prefix": None} # New to this model + + @mapping + def inalterable_hash(self, record): + return {"inalterable_hash": None} + + @mapping + def payment_state(self, record): + return {"payment_state": None} + + @mapping + def invoice_partner_display_name(self, record): + return {"invoice_partner_display_name": None} + + @mapping + def edi_state(self, record): + return {"edi_state": None} + + @mapping + def statement_line_id(self, record): + return {"statement_line_id": None} + + @mapping + def quick_edit_total_amount(self, record): + return {"quick_edit_total_amount": None} + + @mapping + def sequence_number(self, record): + return {"sequence_number": None} + + @mapping + def auto_post(self, record): + return {"auto_post": None} + + @mapping + def always_tax_exigible(self, record): + return {"always_tax_exigible": None} + + @mapping + def posted_before(self, record): + return {"posted_before": None} + + @mapping + def invoice_date_due(self, record): + return {"invoice_date_due": None} + + @mapping + def invoice_user_id(self, record): + return {"invoice_user_id": None} + + @mapping + def invoice_date(self, record): + return {"invoice_date": None} + + @mapping + def qr_code_method(self, record): + return {"qr_code_method": None} + + @mapping + def invoice_cash_rounding_id(self, record): + return {"invoice_cash_rounding_id": None} + + @mapping + def to_check(self, record): + return {"to_check": None} + + +models_tree.add(AccountMove) diff --git a/migration/models/account/account_journal.py b/migration/models/account/account_journal.py new file mode 100644 index 0000000..3970d76 --- /dev/null +++ b/migration/models/account/account_journal.py @@ -0,0 +1,62 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountJournal(BaseMapper): + _name = "account.journal" + _OLD_TABLE_NAME = "account_journal" + _NEW_TABLE_NAME = "account_journal" + + @mapping + def sequence_override_regex(self, record): + return {"sequence_override_regex": None} # New Field + + @mapping + def message_main_attachment_id(self, record): + return {"message_main_attachment_id": None} # New to this model + + @mapping + def sale_activity_note(self, record): + return {"sale_activity_note": None} # New Field + + @mapping + def default_account_id(self, record): + return {"default_account_id": None} # New to this model + + @mapping + def payment_sequence(self, record): + return {"payment_sequence": None} # New Field + + @mapping + def sale_activity_type_id(self, record): + return {"sale_activity_type_id": None} # New to this model + + @mapping + def invoice_reference_type(self, record): + return {"invoice_reference_type": "invoice"} # New Field + + @mapping + def secure_sequence_id(self, record): + return {"secure_sequence_id": None} # New Field + + @mapping + def invoice_reference_model(self, record): + return {"invoice_reference_model": "odoo"} # New Field + + @mapping + def restrict_mode_hash_table(self, record): + return {"restrict_mode_hash_table": None} # New Field + + @mapping + def suspense_account_id(self, record): + return {"suspense_account_id": None} # New Field + + @mapping + def sale_activity_user_id(self, record): + return {"sale_activity_user_id": None} # New Field + + +models_tree.add(AccountJournal) diff --git a/migration/models/account/account_move.py b/migration/models/account/account_move.py new file mode 100644 index 0000000..e2b506a --- /dev/null +++ b/migration/models/account/account_move.py @@ -0,0 +1,214 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountMove(BaseMapper): + _name = "account.move" + _OLD_TABLE_NAME = "account_move" + _NEW_TABLE_NAME = "account_move" + + @mapping + def invoice_partner_display_name(self, record): + return {"invoice_partner_display_name": None} + + @mapping + def source_id(self, record): + return {"source_id": None} # New to the model + + @mapping + def is_move_sent(self, record): + return {"is_move_sent": None} #boolean + + @mapping + def secure_sequence_number(self, record): + return {"secure_sequence_number": None} + + @mapping + def to_check(self, record): + return {"to_check": None} #boolean + + @mapping + def amount_total(self, record): + return {"amount_total": None} + + @mapping + def posted_before(self, record): + return {"posted_before": None} #boolean + + @mapping + def medium_id(self, record): + return {"medium_id": None} # New to the model + + @mapping + def partner_bank_id(self, record): + return {"partner_bank_id": None} # New to the model + + @mapping + def invoice_origin(self, record): + return {"invoice_origin": None} + + @mapping + def team_id(self, record): + return {"team_id": None} # New to this model + + @mapping + def message_main_attachment_id(self, record): + return {"message_main_attachment_id": None} # New to this model + + @mapping + def invoice_date(self, record): + return {"invoice_date": None} # Old Name : date_invoice + + @mapping + def move_type(self, record): + return {"move_type": None} # Old Name : type + + @mapping + def access_token(self, record): + return {"access_token": None} # New to the model + + @mapping + def quick_edit_total_amount(self, record): + return {"quick_edit_total_amount": None} + + @mapping + def inalterable_hash(self, record): + return {"inalterable_hash": None} + + @mapping + def sequence_number(self, record): + return {"sequence_number": None} + + @mapping + def reversed_entry_id(self, record): + return {"reversed_entry_id": None} # New to the model + + @mapping + def invoice_payment_term_id(self, record): + return {"invoice_payment_term_id": None} # New to the model + + @mapping + def invoice_incoterm_id(self, record): + return {"invoice_incoterm_id": None} # New to the model + + @mapping + def edi_state(self, record): + return {"edi_state": None} # New Fields + + @mapping + def campaign_id(self, record): + return {"campaign_id": None} # New to this model + + @mapping + def partner_shipping_id(self, record): + return {"partner_shipping_id": None} # New to this model + + @mapping + def payment_reference(self, record): + return {"payment_reference": None} + + @mapping + def amount_total_signed(self, record): + return {"amount_total_signed": None} + + @mapping + def statement_line_id(self, record): + return {"statement_line_id": None} # New to this model + + @mapping + def always_tax_exigible(self, record): + return {"always_tax_exigible": None} + + @mapping + def invoice_date_due(self, record): + return {"invoice_date_due": None} + + @mapping + def auto_post_origin_id(self, record): + return {"auto_post_origin_id": None} # New to this model + + @mapping + def commercial_partner_id(self, record): + return {"commercial_partner_id": None} # New to this model + + @mapping + def invoice_cash_rounding_id(self, record): + return {"invoice_cash_rounding_id": None} # New to this model + + @mapping + def auto_post_until(self, record): + return {"auto_post_until": None} + + @mapping + def payment_id(self, record): + return {"payment_id": None} # New to this model + + @mapping + def amount_residual(self, record): + return {"amount_residual": None} + + @mapping + def invoice_source_email(self, record): + return {"invoice_source_email": None} + + @mapping + def amount_residual_signed(self, record): + return {"amount_residual_signed": None} + + @mapping + def amount_tax(self, record): + return {"amount_tax": None} + + @mapping + def fiscal_position_id(self, record): + return {"fiscal_position_id": None} # New to this model + + @mapping + def auto_post(self, record): + return {"auto_post": None} #selection + + @mapping + def amount_untaxed(self, record): + return {"amount_untaxed": None} + + @mapping + def payment_state(self, record): + return {"payment_state": None} + + @mapping + def invoice_user_id(self, record): + return {"invoice_user_id": None} + + @mapping + def tax_cash_basis_origin_move_id(self, record): + return {"tax_cash_basis_origin_move_id": None} # New to this model + + @mapping + def is_storno(self, record): + return {"is_storno": None} + + @mapping + def amount_untaxed_signed(self, record): + return {"amount_untaxed_signed": None} + + @mapping + def amount_total_in_currency_signed(self, record): + return {"amount_total_in_currency_signed": None} + + @mapping + def qr_code_method(self, record): + return {"qr_code_method": None} + + @mapping + def amount_tax_signed(self, record): + return {"amount_tax_signed": None} + + @mapping + def sequence_prefix(self, record): + return {"sequence_prefix": None} + + +models_tree.add(AccountMove) diff --git a/migration/models/account/account_move_line.py b/migration/models/account/account_move_line.py new file mode 100644 index 0000000..a475b75 --- /dev/null +++ b/migration/models/account/account_move_line.py @@ -0,0 +1,106 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountMoveLine(BaseMapper): + _name = "account.move.line" + _OLD_TABLE_NAME = "account_move_line" + _NEW_TABLE_NAME = "account_move_line" + + @mapping + def discount_amount_currency(self, record): + return {"discount_amount_currency": None} + + @mapping + def tax_tag_invert(self, record): + return {"tax_tag_invert": None} + + @mapping + def discount_percentage(self, record): + return {"discount_percentage": None} + + @mapping + def group_tax_id(self, record): + return {"group_tax_id": None} # New to this model + + @mapping + def move_name(self, record): + return {"move_name": None} + + @mapping + def account_root_id(self, record): + return {"account_root_id": None} + + @mapping + def price_subtotal(self, record): + return {"price_subtotal": None} + + @mapping + def analytic_distribution(self, record): + return {"analytic_distribution": None} + + @mapping + def discount_balance(self, record): + return {"discount_balance": None} + + @mapping + def price_unit(self, record): + return {"price_unit": None} + + @mapping + def price_total(self, record): + return {"price_total": None} + + @mapping + def tax_group_id(self, record): + return {"tax_group_id": None} # New to this model + + @mapping + def parent_state(self, record): + return {"parent_state": None} + + @mapping + def purchase_line_id(self, record): + return {"purchase_line_id": None} + + @mapping + def matching_number(self, record): + return {"matching_number": None} + + @mapping + def tax_audit(self, record): + return {"tax_audit": None} + + @mapping + def tax_repartition_line_id(self, record): + return {"tax_repartition_line_id": None} # New to this model + + @mapping + def is_downpayment(self, record): + return {"is_downpayment": None} # New to this model + + @mapping + def display_type(self, record): + return {"display_type": None} + + @mapping + def discount(self, record): + return {"discount": None} + + @mapping + def reconcile_model_id(self, record): + return {"reconcile_model_id": None} # New to this model + + @mapping + def discount_date(self, record): + return {"discount_date": None} + + @mapping + def sequence(self, record): + return {"sequence": None} + + +models_tree.add(AccountMoveLine) diff --git a/migration/models/account/account_partial_reconcile.py b/migration/models/account/account_partial_reconcile.py new file mode 100644 index 0000000..015bd2d --- /dev/null +++ b/migration/models/account/account_partial_reconcile.py @@ -0,0 +1,35 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountPartialReconcile(BaseMapper): + _name = "account.partial.reconcile" + _OLD_TABLE_NAME = "account_partial_reconcile" + _NEW_TABLE_NAME = "account_partial_reconcile" + + @mapping + def credit_amount_currency(self, record): + return {"credit_amount_currency": None} + + @mapping + def exchange_move_id(self, record): + return {"exchange_move_id": None} + + @mapping + def debit_currency_id(self, record): + return {"debit_currency_id": None} # New to this model + + @mapping + def credit_currency_id(self, record): + return {"credit_currency_id": None} # New to this model + + @mapping + def debit_amount_currency(self, record): + return {"debit_amount_currency": None} + + + +models_tree.add(AccountPartialReconcile) diff --git a/migration/models/account/account_payment.py b/migration/models/account/account_payment.py new file mode 100644 index 0000000..8f1276b --- /dev/null +++ b/migration/models/account/account_payment.py @@ -0,0 +1,58 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountPayment(BaseMapper): + _name = "account.payment" + _OLD_TABLE_NAME = "account_payment" + _NEW_TABLE_NAME = "account_payment" + + @mapping + def partner_bank_id(self, record): + return {"partner_bank_id": None} # New to this model + + @mapping + def outstanding_account_id(self, record): + return {"outstanding_account_id": None} # New to this model + + @mapping + def is_internal_transfer(self, record): + return {"is_internal_transfer": None} + + @mapping + def destination_account_id(self, record): + return {"destination_account_id": None} # New to this model + + @mapping + def source_payment_id(self, record): + return {"source_payment_id": None} + + @mapping + def is_matched(self, record): + return {"is_matched": None} + + @mapping + def move_id(self, record): + return {"move_id": None} # New to this model + + @mapping + def payment_method_line_id(self, record): + return {"payment_method_line_id": None} # New to this model + + @mapping + def paired_internal_transfer_payment_id(self, record): + return {"paired_internal_transfer_payment_id": None} # New to this model + + @mapping + def amount_company_currency_signed(self, record): + return {"amount_company_currency_signed": None} + + @mapping + def is_reconciled(self, record): + return {"is_reconciled": None} + + +models_tree.add(AccountPayment) diff --git a/migration/models/account/account_payment_method.py b/migration/models/account/account_payment_method.py new file mode 100644 index 0000000..d602b7a --- /dev/null +++ b/migration/models/account/account_payment_method.py @@ -0,0 +1,14 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountPaymentMethod(BaseMapper): + _name = "account.payment.method" + _OLD_TABLE_NAME = "account_payment_method" + _NEW_TABLE_NAME = "account_payment_method" + + +models_tree.add(AccountPaymentMethod) diff --git a/migration/models/account/account_payment_term.py b/migration/models/account/account_payment_term.py new file mode 100644 index 0000000..359f0d3 --- /dev/null +++ b/migration/models/account/account_payment_term.py @@ -0,0 +1,18 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountPaymentTerm(BaseMapper): + _name = "account.payment.term" + _OLD_TABLE_NAME = "account_payment_term" + _NEW_TABLE_NAME = "account_payment_term" + + @mapping + def display_on_invoice(self, record): + return {"display_on_invoice": None} + + +models_tree.add(AccountPaymentTerm) diff --git a/migration/models/account/account_payment_term_line.py b/migration/models/account/account_payment_term_line.py new file mode 100644 index 0000000..b9ba607 --- /dev/null +++ b/migration/models/account/account_payment_term_line.py @@ -0,0 +1,34 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountPaymentTermLine(BaseMapper): + _name = "account.payment.term.line" + _OLD_TABLE_NAME = "account_payment_term_line" + _NEW_TABLE_NAME = "account_payment_term_line" + + @mapping + def end_month(self, record): + return {"end_month": None} + + @mapping + def days_after(self, record): + return {"days_after": None} + + @mapping + def discount_percentage(self, record): + return {"discount_percentage": None} + + @mapping + def discount_days(self, record): + return {"discount_days": None} + + @mapping + def months(self, record): + return {"months": 0} # Required integer with default 0 + + +models_tree.add(AccountPaymentTermLine) diff --git a/migration/models/account/account_reconcile_model.py b/migration/models/account/account_reconcile_model.py new file mode 100644 index 0000000..d73d0cd --- /dev/null +++ b/migration/models/account/account_reconcile_model.py @@ -0,0 +1,78 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountReconcileModel(BaseMapper): + _name = "account.reconcile.model" + _OLD_TABLE_NAME = "account_reconcile_model" + _NEW_TABLE_NAME = "account_reconcile_model" + + @mapping + def to_check(self, record): + return {"to_check": None} #boolean + + @mapping + def match_note_param(self, record): + return {"match_note_param": None} + + @mapping + def match_text_location_reference(self, record): + return {"match_text_location_reference": None} #boolean + + @mapping + def allow_payment_tolerance(self, record): + return {"allow_payment_tolerance": None} #boolean + + @mapping + def past_months_limit(self, record): + return {"past_months_limit": None} # This integer has a default of 18 + + @mapping + def match_text_location_label(self, record): + return {"match_text_location_label": None} #boolean + + @mapping + def payment_tolerance_param(self, record): + return {"payment_tolerance_param": None} + + @mapping + def matching_order(self, record): + return {"matching_order": "old_first"} + + @mapping + def match_transaction_type_param(self, record): + return {"match_transaction_type_param": None} + + @mapping + def payment_tolerance_type(self, record): + return {"payment_tolerance_type": "percentage"} + + @mapping + def active(self, record): + return {"active": None} #boolean + + @mapping + def match_text_location_note(self, record): + return {"match_text_location_note": None} #boolean + + @mapping + def match_note(self, record): + return {"match_note": None} #selection + + @mapping + def decimal_separator(self, record): + return {"decimal_separator": None} + + @mapping + def message_main_attachment_id(self, record): + return {"message_main_attachment_id": None} # New to this model + + @mapping + def match_transaction_type(self, record): + return {"match_transaction_type": None} #selection + + +models_tree.add(AccountReconcileModel) diff --git a/migration/models/account/account_tag.py b/migration/models/account/account_tag.py new file mode 100644 index 0000000..eb1a5e3 --- /dev/null +++ b/migration/models/account/account_tag.py @@ -0,0 +1,23 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountAccountTag(BaseMapper): + _name = "account.account.tag" + _OLD_TABLE_NAME = "account_account_tag" + _NEW_TABLE_NAME = "account_account_tag" + + @mapping + def country_id(self, record): + return {"country_id": None} # New to this model + + @mapping + def tax_negate(self, record): + return {"tax_negate": None} # New Field + + + +models_tree.add(AccountAccountTag) diff --git a/migration/models/account/account_tax.py b/migration/models/account/account_tax.py new file mode 100644 index 0000000..7ff24a0 --- /dev/null +++ b/migration/models/account/account_tax.py @@ -0,0 +1,34 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountTax(BaseMapper): + _name = "account.tax" + _OLD_TABLE_NAME = "account_tax" + _NEW_TABLE_NAME = "account_tax" + + @mapping + def real_amount(self, record): + return {"real_amount": None} # New Field + + @mapping + def country_id(self, record): + return {"country_id": None} # New to this model + + @mapping + def cash_basis_transition_account_id(self, record): + return {"cash_basis_transition_account_id": None} # New Field + + @mapping + def is_base_affected(self, record): + return {"is_base_affected": None} # New Field + + @mapping + def tax_scope(self, record): + return {"tax_scope": None} # New Field + + +models_tree.add(AccountTax) diff --git a/migration/models/account/account_tax_group.py b/migration/models/account/account_tax_group.py new file mode 100644 index 0000000..fc0a9fc --- /dev/null +++ b/migration/models/account/account_tax_group.py @@ -0,0 +1,22 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountTaxGroup(BaseMapper): + _name = "account.tax.group" + _OLD_TABLE_NAME = "account_tax_group" + _NEW_TABLE_NAME = "account_tax_group" + + @mapping + def preceding_subtotal(self, record): + return {"preceding_subtotal": None} + + @mapping + def country_id(self, record): + return {"country_id": None} # New to this model + + +models_tree.add(AccountTaxGroup) diff --git a/migration/models/account/account_tax_template.py b/migration/models/account/account_tax_template.py new file mode 100644 index 0000000..8103a9e --- /dev/null +++ b/migration/models/account/account_tax_template.py @@ -0,0 +1,26 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountTaxTemplate(BaseMapper): + _name = "account.tax.template" + _OLD_TABLE_NAME = "account_tax_template" + _NEW_TABLE_NAME = "account_tax_template" + + @mapping + def tax_scope(self, record): + return {"tax_scope": None} + + @mapping + def is_base_affected(self, record): + return {"is_base_affected": None} #boolean + + @mapping + def cash_basis_transition_account_id(self, record): + return {"cash_basis_transition_account_id": None} + + +models_tree.add(AccountTaxTemplate) diff --git a/migration/models/analytic/__init__.py b/migration/models/analytic/__init__.py new file mode 100644 index 0000000..f01bc99 --- /dev/null +++ b/migration/models/analytic/__init__.py @@ -0,0 +1,7 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +# from . import analytic_account +# from . import analytic_distribution_model +# from . import analytic_line diff --git a/migration/models/analytic/analytic_account.py b/migration/models/analytic/analytic_account.py new file mode 100644 index 0000000..9f27112 --- /dev/null +++ b/migration/models/analytic/analytic_account.py @@ -0,0 +1,22 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountAnalyticAccount(BaseMapper): + _name = "account.analytic.account" + _OLD_TABLE_NAME = "account_analytic_account" + _NEW_TABLE_NAME = "account_analytic_account" + + # @mapping + # def plan_id(self, record): + # return {"plan_id": None} # Required Many2one field # New to this model + + @mapping + def root_plan_id(self, record): + return {"root_plan_id": None} # New to this model + + +models_tree.add(AccountAnalyticAccount) diff --git a/migration/models/analytic/analytic_distribution_model.py b/migration/models/analytic/analytic_distribution_model.py new file mode 100644 index 0000000..151a9bd --- /dev/null +++ b/migration/models/analytic/analytic_distribution_model.py @@ -0,0 +1,18 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountAnalyticDistributionModel(BaseMapper): + _name = "account.analytic.distribution.model" + _OLD_TABLE_NAME = "account_analytic_distribution" + _NEW_TABLE_NAME = "account_analytic_distribution_model" + + # @mapping + # def .(self, record): + # return {".": None} + + +models_tree.add(AccountAnalyticDistributionModel) diff --git a/migration/models/analytic/analytic_line.py b/migration/models/analytic/analytic_line.py new file mode 100644 index 0000000..e57d36c --- /dev/null +++ b/migration/models/analytic/analytic_line.py @@ -0,0 +1,18 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class AccountAnalyticLine(BaseMapper): + _name = "account.analytic.line" + _OLD_TABLE_NAME = "account_analytic_line" + _NEW_TABLE_NAME = "account_analytic_line" + + # @mapping + # def .(self, record): + # return {".": None} + + +models_tree.add(AccountAnalyticLine) diff --git a/migration/models/base/__init__.py b/migration/models/base/__init__.py index f0e5db1..b03af72 100644 --- a/migration/models/base/__init__.py +++ b/migration/models/base/__init__.py @@ -1,15 +1,16 @@ # Copyright 2024 Ahmet Yiğit Budak (https://github.com/yibudak) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # Todo: enable all models +from . import ir_attachment +from . import ir_filters +from . import ir_logging +from . import ir_sequence +from . import res_bank from . import res_country from . import res_country_state from . import res_currency from . import res_currency_rate -from . import res_bank -from . import ir_sequence -from . import ir_attachment -from . import res_users -from . import res_partner -from . import ir_logging from . import res_lang -from . import ir_filters +from . import res_partner +from . import res_users + diff --git a/migration/models/bus/__init__.py b/migration/models/bus/__init__.py new file mode 100644 index 0000000..533c06a --- /dev/null +++ b/migration/models/bus/__init__.py @@ -0,0 +1,6 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +from . import bus +from . import bus_presence \ No newline at end of file diff --git a/migration/models/bus/bus.py b/migration/models/bus/bus.py new file mode 100644 index 0000000..de1cbfe --- /dev/null +++ b/migration/models/bus/bus.py @@ -0,0 +1,14 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class ImBus(BaseMapper): + _name = "bus.bus" + _OLD_TABLE_NAME = "bus_bus" + _NEW_TABLE_NAME = "bus_bus" + + +models_tree.add(ImBus) diff --git a/migration/models/bus/bus_presence.py b/migration/models/bus/bus_presence.py new file mode 100644 index 0000000..1281c7f --- /dev/null +++ b/migration/models/bus/bus_presence.py @@ -0,0 +1,18 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class BusPresence(BaseMapper): + _name = "bus.presence" + _OLD_TABLE_NAME = "bus_presence" + _NEW_TABLE_NAME = "bus_presence" + + @mapping + def guest_id(self, record): + return {"guest_id": None} # New to this model + + +models_tree.add(BusPresence) diff --git a/migration/models/calendar/__init__.py b/migration/models/calendar/__init__.py new file mode 100644 index 0000000..d28b19f --- /dev/null +++ b/migration/models/calendar/__init__.py @@ -0,0 +1,8 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +from . import calendar_alarm +from . import calendar_attendee +from . import calendar_event +from . import calendar_event_type \ No newline at end of file diff --git a/migration/models/calendar/calendar_alarm.py b/migration/models/calendar/calendar_alarm.py new file mode 100644 index 0000000..90964c2 --- /dev/null +++ b/migration/models/calendar/calendar_alarm.py @@ -0,0 +1,26 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class Alarm(BaseMapper): + _name = "calendar.alarm" + _OLD_TABLE_NAME = "calendar_alarm" + _NEW_TABLE_NAME = "calendar_alarm" + + @mapping + def body(self, record): + return {"body": None} # New Field + + @mapping + def alarm_type(self, record): + return {"alarm_type": 'email'} # Old Name : type + + @mapping + def mail_template_id(self, record): + return {"mail_template_id": None} # New Field + + +models_tree.add(Alarm) diff --git a/migration/models/calendar/calendar_attendee.py b/migration/models/calendar/calendar_attendee.py new file mode 100644 index 0000000..aa337e9 --- /dev/null +++ b/migration/models/calendar/calendar_attendee.py @@ -0,0 +1,14 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class Attendee(BaseMapper): + _name = "calendar.attendee" + _OLD_TABLE_NAME = "calendar_attendee" + _NEW_TABLE_NAME = "calendar_attendee" + + +models_tree.add(Attendee) diff --git a/migration/models/calendar/calendar_event.py b/migration/models/calendar/calendar_event.py new file mode 100644 index 0000000..b796878 --- /dev/null +++ b/migration/models/calendar/calendar_event.py @@ -0,0 +1,35 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class Meeting(BaseMapper): + _name = "calendar.event" + _OLD_TABLE_NAME = "calendar_event" + _NEW_TABLE_NAME = "calendar_event" + + @mapping + def recurrence_id(self, record): + return {"recurrence_id": None} # New Field + + @mapping + def follow_recurrence(self, record): + return {"follow_recurrence": None} # New Field + + @mapping + def videocall_channel_id(self, record): + return {"videocall_channel_id": None} # New to this model + + @mapping + def access_token(self, record): + return {"access_token": None} + + @mapping + def videocall_location(self, record): + return {"videocall_location": None} # New Field + + + +models_tree.add(Meeting) diff --git a/migration/models/calendar/calendar_event_type.py b/migration/models/calendar/calendar_event_type.py new file mode 100644 index 0000000..31e4562 --- /dev/null +++ b/migration/models/calendar/calendar_event_type.py @@ -0,0 +1,18 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class MeetingType(BaseMapper): + _name = "calendar.event.type" + _OLD_TABLE_NAME = "calendar_event_type" + _NEW_TABLE_NAME = "calendar_event_type" + + @mapping + def color(self, record): + return {"color": None} + + +models_tree.add(MeetingType) diff --git a/migration/models/digest/__init__.py b/migration/models/digest/__init__.py new file mode 100644 index 0000000..80378ee --- /dev/null +++ b/migration/models/digest/__init__.py @@ -0,0 +1,5 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import digest +from . import digest_tip \ No newline at end of file diff --git a/migration/models/digest/digest.py b/migration/models/digest/digest.py new file mode 100644 index 0000000..eb95836 --- /dev/null +++ b/migration/models/digest/digest.py @@ -0,0 +1,14 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class Digest(BaseMapper): + _name = "digest.digest" + _OLD_TABLE_NAME = "digest_digest" + _NEW_TABLE_NAME = "digest_digest" + + +models_tree.add(Digest) diff --git a/migration/models/digest/digest_tip.py b/migration/models/digest/digest_tip.py new file mode 100644 index 0000000..8d4b4b9 --- /dev/null +++ b/migration/models/digest/digest_tip.py @@ -0,0 +1,18 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class DigestTip(BaseMapper): + _name = "digest.tip" + _OLD_TABLE_NAME = "digest_tip" + _NEW_TABLE_NAME = "digest_tip" + + @mapping + def name(self, record): + return {"name": None} + + +models_tree.add(DigestTip) diff --git a/migration/models/hr/__init__.py b/migration/models/hr/__init__.py index 641d4fc..49ba7c6 100644 --- a/migration/models/hr/__init__.py +++ b/migration/models/hr/__init__.py @@ -1,8 +1,10 @@ # Copyright 2024 Ahmet Yiğit Budak (https://github.com/yibudak) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + from . import hr_department from . import hr_employee -from . import hr_job from . import hr_employee_category +from . import hr_job + # Todo: Add missing field mappings diff --git a/migration/models/mail/__init__.py b/migration/models/mail/__init__.py index e810668..ac225d3 100644 --- a/migration/models/mail/__init__.py +++ b/migration/models/mail/__init__.py @@ -1,7 +1,9 @@ # Copyright 2024 Ahmet Yiğit Budak (https://github.com/yibudak) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from . import mail_message -from . import mail_template + from . import mail_activity -from . import mail_followers from . import mail_activity_type +from . import mail_followers +from . import mail_message +from . import mail_template + diff --git a/migration/models/payment/__init__.py b/migration/models/payment/__init__.py new file mode 100644 index 0000000..176e885 --- /dev/null +++ b/migration/models/payment/__init__.py @@ -0,0 +1,6 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import payment_icon +from . import payment_token +from . import payment_transaction diff --git a/migration/models/payment/payment_icon.py b/migration/models/payment/payment_icon.py new file mode 100644 index 0000000..e712dcf --- /dev/null +++ b/migration/models/payment/payment_icon.py @@ -0,0 +1,18 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class PaymentIcon(BaseMapper): + _name = "payment.icon" + _OLD_TABLE_NAME = "payment_icon" + _NEW_TABLE_NAME = "payment_icon" + + @mapping + def sequence(self, record): + return {"sequence": None} + + +models_tree.add(PaymentIcon) diff --git a/migration/models/payment/payment_token.py b/migration/models/payment/payment_token.py new file mode 100644 index 0000000..9bedc5a --- /dev/null +++ b/migration/models/payment/payment_token.py @@ -0,0 +1,14 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class PaymentToken(BaseMapper): + _name = "payment.token" + _OLD_TABLE_NAME = "payment_token" + _NEW_TABLE_NAME = "payment_token" + + +models_tree.add(PaymentToken) diff --git a/migration/models/payment/payment_transaction.py b/migration/models/payment/payment_transaction.py new file mode 100644 index 0000000..b085137 --- /dev/null +++ b/migration/models/payment/payment_transaction.py @@ -0,0 +1,14 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class PaymentTransaction(BaseMapper): + _name = "payment.transaction" + _OLD_TABLE_NAME = "payment_transaction" + _NEW_TABLE_NAME = "payment_transaction" + + +models_tree.add(PaymentTransaction) diff --git a/migration/models/product/__init__.py b/migration/models/product/__init__.py index 9391889..9ef2da3 100644 --- a/migration/models/product/__init__.py +++ b/migration/models/product/__init__.py @@ -1,8 +1,9 @@ # Copyright 2024 Ahmet Yiğit Budak (https://github.com/yibudak) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + from . import product_attribute -from . import product_category from . import product_attribute_value +from . import product_category from . import product_packaging from . import product_pricelist from . import product_pricelist_item @@ -10,4 +11,5 @@ from . import product_supplierinfo from . import product_template from . import product_template_attribute_line -# from . import product_template_attribute_value +from . import product_template_attribute_value + diff --git a/migration/models/project/__init__.py b/migration/models/project/__init__.py index 62a722a..d9cb17d 100644 --- a/migration/models/project/__init__.py +++ b/migration/models/project/__init__.py @@ -1,8 +1,10 @@ # Copyright 2024 Ahmet Yiğit Budak (https://github.com/yibudak) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + from . import project_project +from . import project_tags from . import project_task from . import project_task_type -from . import project_tags + # Todo: Add missing field mapping to project models diff --git a/migration/models/purchase/__init__.py b/migration/models/purchase/__init__.py new file mode 100644 index 0000000..e05dff9 --- /dev/null +++ b/migration/models/purchase/__init__.py @@ -0,0 +1,6 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +from . import purchase_order +from . import purchase_order_line diff --git a/migration/models/purchase/purchase_order.py b/migration/models/purchase/purchase_order.py new file mode 100644 index 0000000..76999cc --- /dev/null +++ b/migration/models/purchase/purchase_order.py @@ -0,0 +1,46 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class PurchaseOrder(BaseMapper): + _name = "purchase.order" + _OLD_TABLE_NAME = "purchase_order" + _NEW_TABLE_NAME = "purchase_order" + + @mapping + def priority(self, record): + return {"priority": None} # New to this model + + @mapping + def mail_reception_confirmed(self, record): + return {"mail_reception_confirmed": None} # New Field + + @mapping + def effective_date(self, record): + return {"effective_date": None} # New to this model + + @mapping + def receipt_status(self, record): + return {"receipt_status": None} # New Field + + @mapping + def date_calendar_start(self, record): + return {"date_calendar_start": None} # New Field + + @mapping + def currency_rate(self, record): + return {"currency_rate": None} # New to this model + + @mapping + def mail_reminder_confirmed(self, record): + return {"mail_reminder_confirmed": None} # New Field + + @mapping + def incoterm_location(self, record): + return {"incoterm_location": None} # New Field + + +models_tree.add(PurchaseOrder) diff --git a/migration/models/purchase/purchase_order_line.py b/migration/models/purchase/purchase_order_line.py new file mode 100644 index 0000000..3b7041b --- /dev/null +++ b/migration/models/purchase/purchase_order_line.py @@ -0,0 +1,51 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class PurchaseOrderLine(BaseMapper): + _name = "purchase.order.line" + _OLD_TABLE_NAME = "purchase_order_line" + _NEW_TABLE_NAME = "purchase_order_line" + + @mapping + def product_packaging_qty(self, record): + return {"product_packaging_qty": None} # New Field + + @mapping + def propagate_cancel(self, record): + return {"propagate_cancel": None} # New Field + + @mapping + def qty_received_manual(self, record): + return {"qty_received_manual": None} # New Field + + @mapping + def analytic_distribution(self, record): + return {"analytic_distribution": None} # New to this model + + @mapping + def product_description_variants(self, record): + return {"product_description_variants": None} # New Field + + @mapping + def product_packaging_id(self, record): + return {"product_packaging_id": None} # New Field + + @mapping + def display_type(self, record): + return {"display_type": None} # New to the model + + @mapping + def qty_to_invoice(self, record): + return {"qty_to_invoice": None} # New to the model + + @mapping + def qty_received_method(self, record): + return {"qty_received_method": None} # New Field + + + +models_tree.add(PurchaseOrderLine) diff --git a/migration/models/rating/__init__.py b/migration/models/rating/__init__.py new file mode 100644 index 0000000..312b1a6 --- /dev/null +++ b/migration/models/rating/__init__.py @@ -0,0 +1,4 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from . import rating \ No newline at end of file diff --git a/migration/models/rating/rating.py b/migration/models/rating/rating.py new file mode 100644 index 0000000..e5ddf25 --- /dev/null +++ b/migration/models/rating/rating.py @@ -0,0 +1,14 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class Rating(BaseMapper): + _name = "rating.rating" + _OLD_TABLE_NAME = "rating_rating" + _NEW_TABLE_NAME = "rating_rating" + + +models_tree.add(Rating) diff --git a/migration/models/resource/__init__.py b/migration/models/resource/__init__.py new file mode 100644 index 0000000..a35ae96 --- /dev/null +++ b/migration/models/resource/__init__.py @@ -0,0 +1,5 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +from . import resource diff --git a/migration/models/resource/resource.py b/migration/models/resource/resource.py new file mode 100644 index 0000000..3ca2f42 --- /dev/null +++ b/migration/models/resource/resource.py @@ -0,0 +1,22 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class ResourceCalendar(BaseMapper): + _name = "resource.calendar" + _OLD_TABLE_NAME = "resource_calendar" + _NEW_TABLE_NAME = "resource_calendar" + + @mapping + def two_weeks_calendar(self, record): + return {"two_weeks_calendar": None} # New Field + + @mapping + def active(self, record): + return {"active": None} + + +models_tree.add(ResourceCalendar) diff --git a/migration/models/sale/__init__.py b/migration/models/sale/__init__.py index 5a4e841..ce94f57 100644 --- a/migration/models/sale/__init__.py +++ b/migration/models/sale/__init__.py @@ -1,4 +1,5 @@ # Copyright 2024 Ahmet Yiğit Budak (https://github.com/yibudak) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + from . import sale_order from . import sale_order_line diff --git a/migration/models/stock/__init__.py b/migration/models/stock/__init__.py index 4695abb..1b86be0 100644 --- a/migration/models/stock/__init__.py +++ b/migration/models/stock/__init__.py @@ -1,6 +1,8 @@ # Copyright 2024 Ahmet Yiğit Budak (https://github.com/yibudak) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + # from . import product_removal # from . import product_putaway # from . import stock_fixed_putaway_strat from . import stock_inventory +from . import stock_warehouse diff --git a/migration/models/stock/stock_warehouse.py b/migration/models/stock/stock_warehouse.py new file mode 100644 index 0000000..b9c5511 --- /dev/null +++ b/migration/models/stock/stock_warehouse.py @@ -0,0 +1,25 @@ +# Copyright 2024 Ahmet Yiğit Budak (https://github.com/yibudak) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class StockWarehouse(BaseMapper): + _name = "stock.warehouse" + _OLD_TABLE_NAME = "stock_warehouse" + _NEW_TABLE_NAME = "stock_warehouse" + + @mapping + def sequence(self, record): + return {"sequence": 0} # New Field + + @mapping + def return_type_id(self, record): + return {"return_type_id": None} # New Field + + @mapping + def delivery_steps(self, record): + return {"manufacture_mto_pull_id": None} # New Field + + +models_tree.add(StockWarehouse) diff --git a/migration/models/survey/__init__.py b/migration/models/survey/__init__.py new file mode 100644 index 0000000..47bffe3 --- /dev/null +++ b/migration/models/survey/__init__.py @@ -0,0 +1,7 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + + +from . import survey_question +from . import survey_survey +from . import survey_user_input diff --git a/migration/models/survey/survey_question.py b/migration/models/survey/survey_question.py new file mode 100644 index 0000000..58a1f6a --- /dev/null +++ b/migration/models/survey/survey_question.py @@ -0,0 +1,18 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class SurveyQuestion(BaseMapper): + _name = "survey.question" + _OLD_TABLE_NAME = "survey_question" + _NEW_TABLE_NAME = "survey_question" + + # @mapping + # def .(self, record): + # return {".": None} + + +models_tree.add(SurveyQuestion) diff --git a/migration/models/survey/survey_survey.py b/migration/models/survey/survey_survey.py new file mode 100644 index 0000000..f6e0d2a --- /dev/null +++ b/migration/models/survey/survey_survey.py @@ -0,0 +1,18 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class Survey(BaseMapper): + _name = "survey.survey" + _OLD_TABLE_NAME = "survey_survey" + _NEW_TABLE_NAME = "survey_survey" + + # @mapping + # def .(self, record): + # return {".": None} + + +models_tree.add(Survey) diff --git a/migration/models/survey/survey_user_input.py b/migration/models/survey/survey_user_input.py new file mode 100644 index 0000000..be415e6 --- /dev/null +++ b/migration/models/survey/survey_user_input.py @@ -0,0 +1,18 @@ +# Copyright 2024 Yousef Sheta (https://github.com/TrueYouface) +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + +from migration import models_tree +from migration.libs.migration_mapper import BaseMapper, mapping + + +class SurveyUserInput(BaseMapper): + _name = "survey.user_input" + _OLD_TABLE_NAME = "survey_user_input" + _NEW_TABLE_NAME = "survey_user_input" + + # @mapping + # def .(self, record): + # return {".": None} + + +models_tree.add(SurveyUserInput) diff --git a/migration/models/uom/__init__.py b/migration/models/uom/__init__.py index c9cffb3..329a2ac 100644 --- a/migration/models/uom/__init__.py +++ b/migration/models/uom/__init__.py @@ -1,4 +1,6 @@ # Copyright 2024 Ahmet Yiğit Budak (https://github.com/yibudak) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from . import uom_uom + from . import uom_category +from . import uom_uom + diff --git a/migration/models/utm/__init__.py b/migration/models/utm/__init__.py index 78f85ce..3f2f1cc 100644 --- a/migration/models/utm/__init__.py +++ b/migration/models/utm/__init__.py @@ -1,5 +1,6 @@ # Copyright 2024 Ahmet Yiğit Budak (https://github.com/yibudak) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). + from . import utm_campaign from . import utm_medium from . import utm_source