Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/easy_migration.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 18 additions & 5 deletions migration/models/__init__.py
Original file line number Diff line number Diff line change
@@ -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
27 changes: 27 additions & 0 deletions migration/models/account/__init__.py
Original file line number Diff line number Diff line change
@@ -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

37 changes: 37 additions & 0 deletions migration/models/account/account_account.py
Original file line number Diff line number Diff line change
@@ -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)
22 changes: 22 additions & 0 deletions migration/models/account/account_account_tag.py
Original file line number Diff line number Diff line change
@@ -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)
23 changes: 23 additions & 0 deletions migration/models/account/account_bank_statement.py
Original file line number Diff line number Diff line change
@@ -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)
43 changes: 43 additions & 0 deletions migration/models/account/account_bank_statement_line.py
Original file line number Diff line number Diff line change
@@ -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)
14 changes: 14 additions & 0 deletions migration/models/account/account_cash_rounding.py
Original file line number Diff line number Diff line change
@@ -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)
14 changes: 14 additions & 0 deletions migration/models/account/account_full_reconcile.py
Original file line number Diff line number Diff line change
@@ -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)
27 changes: 27 additions & 0 deletions migration/models/account/account_group.py
Original file line number Diff line number Diff line change
@@ -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)
14 changes: 14 additions & 0 deletions migration/models/account/account_incoterms.py
Original file line number Diff line number Diff line change
@@ -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)
Loading