Skip to content

Commit

Permalink
Split: Rename module
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienbeau committed Aug 23, 2023
1 parent cbb9be4 commit e442266
Show file tree
Hide file tree
Showing 359 changed files with 698 additions and 648 deletions.
File renamed without changes.
1 change: 1 addition & 0 deletions setup/shopinvader_restapi/odoo/addons/shopinvader_restapi
File renamed without changes.
1 change: 0 additions & 1 deletion setup/shopinvader_v1_base/odoo/addons/shopinvader_v1_base

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion shopinvader/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
"license": "AGPL-3",
"application": True,
"installable": True,
"depends": ["shopinvader_v1_base", "shopinvader_v1_product"],
"depends": ["shopinvader_restapi", "shopinvader_product_binding"],
}
4 changes: 2 additions & 2 deletions shopinvader/migrations/14.0.5.14.1/post-migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ def _upgrade_shopinvader_model_access(env):
Upgrade the "shopinvader partner binding edit" access rights
(as it's not update)
"""
sec_group = env.ref("shopinvader_v1_base.group_shopinvader_partner_binding")
env.ref("shopinvader_v1_base.access_shopinvader_partner_edit").write(
sec_group = env.ref("shopinvader_restapi.group_shopinvader_partner_binding")
env.ref("shopinvader_restapi.access_shopinvader_partner_edit").write(
{
"group_id": sec_group.id,
}
Expand Down
8 changes: 4 additions & 4 deletions shopinvader/models/ir_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,14 @@ def mapped_xml_id(xmlid):
_logger.warning(
f"Old name for shopinvader is used: {xmlid} \n"
"Please rename module ref to "
"shopinvader_v1_product"
"shopinvader_product_binding"
)
xmlid = f"shopinvader_v1_product.{name}"
xmlid = f"shopinvader_product_binding.{name}"
elif name in SHOPINVADER_V1_BASE_XMLID:
xmlid = f"shopinvader_v1_base.{name}"
xmlid = f"shopinvader_restapi.{name}"
_logger.warning(
f"Old name for shopinvader is used: {xmlid} \n"
"Please rename module ref to shopinvader_v1_base"
"Please rename module ref to shopinvader_restapi"
)
return xmlid

Expand Down
5 changes: 4 additions & 1 deletion shopinvader_algolia/data/ir_export_product.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
<record id="ir_exp_shopinvader_hierarchical_categories" model="ir.exports.line">
<field name="name">hierarchical_categories</field>
<field name="target">hierarchical_categories:hierarchicalCategories</field>
<field name="export_id" ref="shopinvader_v1_product.ir_exp_shopinvader_variant" />
<field
name="export_id"
ref="shopinvader_product_binding.ir_exp_shopinvader_variant"
/>
</record>

</odoo>
19 changes: 14 additions & 5 deletions shopinvader_algolia/demo/backend_demo.xml
Original file line number Diff line number Diff line change
@@ -1,26 +1,35 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>

<record id="shopinvader_v1_base.backend_1" model="shopinvader.backend">
<record id="shopinvader_restapi.backend_1" model="shopinvader.backend">
<field name="se_backend_id" ref="connector_algolia.se_algolia_demo_se_backend" />
</record>

<record id="index_1" model="se.index">
<field name="backend_id" ref="connector_algolia.se_algolia_demo_se_backend" />
<field name="name">algolia-product</field>
<field name="lang_id" ref="base.lang_en" />
<field name="model_id" ref="shopinvader_v1_product.model_shopinvader_variant" />
<field name="exporter_id" ref="shopinvader_v1_product.ir_exp_shopinvader_variant" />
<field
name="model_id"
ref="shopinvader_product_binding.model_shopinvader_variant"
/>
<field
name="exporter_id"
ref="shopinvader_product_binding.ir_exp_shopinvader_variant"
/>
</record>

<record id="index_2" model="se.index">
<field name="backend_id" ref="connector_algolia.se_algolia_demo_se_backend" />
<field name="name">algolia-category</field>
<field name="lang_id" ref="base.lang_en" />
<field name="model_id" ref="shopinvader_v1_product.model_shopinvader_category" />
<field
name="model_id"
ref="shopinvader_product_binding.model_shopinvader_category"
/>
<field
name="exporter_id"
ref="shopinvader_v1_product.ir_exp_shopinvader_category"
ref="shopinvader_product_binding.ir_exp_shopinvader_category"
/>
</record>

Expand Down
8 changes: 4 additions & 4 deletions shopinvader_algolia/tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from odoo.addons.connector_algolia.components.adapter import AlgoliaAdapter
from odoo.addons.connector_search_engine.tests.test_all import TestBindingIndexBase
from odoo.addons.shopinvader_v1_base.tests.common import _install_lang_odoo
from odoo.addons.shopinvader_restapi.tests.common import _install_lang_odoo

try:
from vcr_unittest import VCRMixin
Expand All @@ -30,7 +30,7 @@ def setUpClass(cls):
cls.backend_specific.algolia_api_key = os.environ.get(
"ALGOLIA_API_KEY", "FAKE_KEY"
)
cls.shopinvader_backend = cls.env.ref("shopinvader_v1_base.backend_1")
cls.shopinvader_backend = cls.env.ref("shopinvader_restapi.backend_1")
cls.shopinvader_backend.bind_all_product()
cls.shopinvader_backend.bind_all_category()
cls.index_product = cls.env.ref("shopinvader_algolia.index_1")
Expand Down Expand Up @@ -112,8 +112,8 @@ def test_30_export_all_categories(self):

def test_facet_settings(self):
_install_lang_odoo(self.env, "base.lang_fr")
filter1 = self.env.ref("shopinvader_v1_product.product_filter_1")
filter2 = self.env.ref("shopinvader_v1_product.product_filter_2")
filter1 = self.env.ref("shopinvader_product_binding.product_filter_1")
filter2 = self.env.ref("shopinvader_product_binding.product_filter_2")
attr1 = filter1.variant_attribute_id
attr2 = filter2.variant_attribute_id
attr1.with_context(lang="fr_FR").name = attr1.name + " FR"
Expand Down
4 changes: 2 additions & 2 deletions shopinvader_algolia/views/shopinvader_variant_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
<field name="model">shopinvader.variant</field>
<field
name="inherit_id"
ref="shopinvader_v1_product.shopinvader_variant_tree_view"
ref="shopinvader_product_binding.shopinvader_variant_tree_view"
/>
<field name="arch" type="xml">
<field name="name" position="after">
Expand All @@ -25,7 +25,7 @@ License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
<field name="model">shopinvader.variant</field>
<field
name="inherit_id"
ref="shopinvader_v1_product.shopinvader_variant_form_view"
ref="shopinvader_product_binding.shopinvader_variant_form_view"
/>
<field name="arch" type="xml">
<field name="date_syncronized" position="after">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<field name="is_assortment" eval="True" />
</record>

<record id="shopinvader_v1_base.backend_1" model="shopinvader.backend">
<record id="shopinvader_restapi.backend_1" model="shopinvader.backend">
<field name="product_assortment_id" ref="shopinvader_assortment1" />
<field name="product_manual_binding" eval="False" />
<field name="category_binding_level">3</field>
Expand Down
2 changes: 1 addition & 1 deletion shopinvader_assortment/tests/test_product_auto_bind.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class TestProductAutoBind(TransactionCase):
def setUp(self):
super().setUp()
self.backend = self.env.ref("shopinvader_v1_base.backend_1").with_context(
self.backend = self.env.ref("shopinvader_restapi.backend_1").with_context(
bind_products_immediately=True
)
self.variant_obj = self.env["shopinvader.variant"]
Expand Down
4 changes: 2 additions & 2 deletions shopinvader_assortment/views/shopinvader_backend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<field name="model">shopinvader.backend</field>
<field
name="inherit_id"
ref="shopinvader_v1_product.shopinvader_backend_view_form"
ref="shopinvader_product_binding.shopinvader_backend_view_form"
/>
<field name="arch" type="xml">
<button
Expand All @@ -20,7 +20,7 @@
>{'invisible': [('product_manual_binding', '=', False)]}</attribute>
</button>
<button
name="%(shopinvader_v1_product.shopinvader_category_binding_wizard_act_window)d"
name="%(shopinvader_product_binding.shopinvader_category_binding_wizard_act_window)d"
position="attributes"
>
<attribute
Expand Down
4 changes: 2 additions & 2 deletions shopinvader_auth_api_key/demo/shopinvader_backend_demo.xml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?>
<odoo>

<record id="shopinvader_v1_base.backend_1" model="shopinvader.backend">
<record id="shopinvader_restapi.backend_1" model="shopinvader.backend">
<field name="auth_api_key_id" ref="auth_api_key_1" />
</record>

<record id="shopinvader_v1_base.backend_2" model="shopinvader.backend">
<record id="shopinvader_restapi.backend_2" model="shopinvader.backend">
<field name="auth_api_key_id" ref="auth_api_key_2" />
</record>

Expand Down
8 changes: 4 additions & 4 deletions shopinvader_auth_api_key/tests/test_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@

from odoo.tools import mute_logger

from odoo.addons.shopinvader_v1_base.tests.common import ShopinvaderRestCase
from odoo.addons.shopinvader_restapi.tests.common import ShopinvaderRestCase


@unittest.skipIf(os.getenv("SKIP_HTTP_CASE"), "HTTP case disabled.")
class ShopinvaderControllerCase(ShopinvaderRestCase):
def setUp(self, *args, **kwargs):
super(ShopinvaderControllerCase, self).setUp(*args, **kwargs)
self.url = self.base_url + "/shopinvader/addresses"
self.partner = self.env.ref("shopinvader_v1_base.partner_1")
self.address_1 = self.env.ref("shopinvader_v1_base.partner_1_address_1")
self.address_2 = self.env.ref("shopinvader_v1_base.partner_1_address_2")
self.partner = self.env.ref("shopinvader_restapi.partner_1")
self.address_1 = self.env.ref("shopinvader_restapi.partner_1_address_1")
self.address_2 = self.env.ref("shopinvader_restapi.partner_1_address_2")

def test_get_addresses_with_correct_api_key_and_partner(self):
result = requests.get(
Expand Down
6 changes: 3 additions & 3 deletions shopinvader_auth_api_key/tests/test_shopinvader_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

from odoo.tools import mute_logger

from odoo.addons.shopinvader_v1_base.tests import common
from odoo.addons.shopinvader_restapi.tests import common


class TestShopinvaderBackend(common.CommonCase):
@mute_logger("odoo.sql_db")
def test_api_key_unique(self):
backend1 = self.env.ref("shopinvader_v1_base.backend_1")
backend2 = self.env.ref("shopinvader_v1_base.backend_2")
backend1 = self.env.ref("shopinvader_restapi.backend_1")
backend2 = self.env.ref("shopinvader_restapi.backend_2")

with self.assertRaises(IntegrityError), self.env.cr.savepoint():
backend2.write(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<field name="model">shopinvader.backend</field>
<field
name="inherit_id"
ref="shopinvader_v1_product.shopinvader_backend_view_form"
ref="shopinvader_product_binding.shopinvader_backend_view_form"
/>
<field name="model">shopinvader.backend</field>
<field name="arch" type="xml">
Expand Down
2 changes: 1 addition & 1 deletion shopinvader_auth_jwt/views/shopinvader_backend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<field name="model">shopinvader.backend</field>
<field
name="inherit_id"
ref="shopinvader_v1_product.shopinvader_backend_view_form"
ref="shopinvader_product_binding.shopinvader_backend_view_form"
/>
<field name="arch" type="xml">
<group name="auth" position="inside">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2018 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.addons.shopinvader_v1_product.tests.common import ProductCommonCase
from odoo.addons.shopinvader_product_binding.tests.common import ProductCommonCase
from odoo.addons.storage_image_product.tests.common import ProductImageCommonCase


Expand All @@ -17,7 +17,7 @@ def setUpClass(cls):
"groups_id": [
(
4,
cls.env.ref("shopinvader_v1_base.group_shopinvader_manager").id,
cls.env.ref("shopinvader_restapi.group_shopinvader_manager").id,
)
]
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2018 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.addons.shopinvader_v1_product.tests.common import ProductCommonCase
from odoo.addons.shopinvader_product_binding.tests.common import ProductCommonCase
from odoo.addons.storage_image_product.tests.common import ProductImageCommonCase


Expand All @@ -18,7 +18,7 @@ def setUpClass(cls):
"groups_id": [
(
4,
cls.env.ref("shopinvader_v1_base.group_shopinvader_manager").id,
cls.env.ref("shopinvader_restapi.group_shopinvader_manager").id,
)
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<field name="model">shopinvader.backend</field>
<field
name="inherit_id"
ref="shopinvader_v1_product.shopinvader_backend_view_form"
ref="shopinvader_product_binding.shopinvader_backend_view_form"
/>
<field name="priority" eval="90" />
<field name="arch" type="xml">
Expand Down
2 changes: 1 addition & 1 deletion shopinvader_cart_expiry/data/queue_job_function_data.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
>
<field name="model_id" ref="model_shopinvader_backend" />
<field name="method">manage_cart_expiry</field>
<field name="channel_id" ref="shopinvader_v1_base.channel_shopinvader" />
<field name="channel_id" ref="shopinvader_restapi.channel_shopinvader" />
</record>
</odoo>
6 changes: 3 additions & 3 deletions shopinvader_cart_expiry/tests/test_cart_expiry.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from odoo import fields

from odoo.addons.shopinvader_v1_base.tests.test_cart import CartCase
from odoo.addons.shopinvader_restapi.tests.test_cart import CartCase


class TestCartExpiry(CartCase):
Expand All @@ -17,8 +17,8 @@ class TestCartExpiry(CartCase):
def setUp(self):
super().setUp()
self.sale_obj = self.env["sale.order"]
self.partner = self.env.ref("shopinvader_v1_base.partner_1")
self.sale = self.cart = self.env.ref("shopinvader_v1_base.sale_order_1")
self.partner = self.env.ref("shopinvader_restapi.partner_1")
self.sale = self.cart = self.env.ref("shopinvader_restapi.sale_order_1")
self.cart.write({"last_external_update_date": fields.Datetime.now()})
self.so_date = self.cart.last_external_update_date
self.shopinvader_session = {"cart_id": self.cart.id}
Expand Down
2 changes: 1 addition & 1 deletion shopinvader_cart_expiry/views/shopinvader_backend.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<field name="model">shopinvader.backend</field>
<field
name="inherit_id"
ref="shopinvader_v1_product.shopinvader_backend_view_form"
ref="shopinvader_product_binding.shopinvader_backend_view_form"
/>
<field name="priority" eval="90" />
<field name="arch" type="xml">
Expand Down
2 changes: 1 addition & 1 deletion shopinvader_category_image_for_product/data/ir_export.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<field name="name">image_categories</field>
<field
name="export_id"
ref="shopinvader_v1_product.ir_exp_shopinvader_variant"
ref="shopinvader_product_binding.ir_exp_shopinvader_variant"
/>
</record>
</odoo>
2 changes: 1 addition & 1 deletion shopinvader_contact_address_default/tests/test_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# @author Iván Todorovich <[email protected]>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo.addons.shopinvader_v1_base.tests.test_address import CommonAddressCase
from odoo.addons.shopinvader_restapi.tests.test_address import CommonAddressCase


class TestAddress(CommonAddressCase):
Expand Down
2 changes: 1 addition & 1 deletion shopinvader_contact_company/tests/test_address.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# @author Sébastien BEAU <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo.addons.shopinvader_v1_base.tests.test_address import (
from odoo.addons.shopinvader_restapi.tests.test_address import (
AddressTestCase,
CommonAddressCase,
)
Expand Down
2 changes: 1 addition & 1 deletion shopinvader_customer_activity/tests/test_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

from odoo import fields

from odoo.addons.shopinvader_v1_base.tests.test_cart import CommonConnectedCartCase
from odoo.addons.shopinvader_restapi.tests.test_cart import CommonConnectedCartCase


class TestCartService(CommonConnectedCartCase):
Expand Down
2 changes: 1 addition & 1 deletion shopinvader_customer_activity/views/res_partner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<record id="res_partner_view_form" model="ir.ui.view">
<field name="model">res.partner</field>
<field name="inherit_id" ref="shopinvader_v1_base.res_partner_view_form" />
<field name="inherit_id" ref="shopinvader_restapi.res_partner_view_form" />
<field name="arch" type="xml">
<field name="sync_date" position="before">
<field name="first_active_date" optional="hide" />
Expand Down
4 changes: 2 additions & 2 deletions shopinvader_customer_activity/views/shopinvader_partner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<field name="model">shopinvader.partner</field>
<field
name="inherit_id"
ref="shopinvader_v1_base.shopinvader_partner_view_form"
ref="shopinvader_restapi.shopinvader_partner_view_form"
/>
<field name="arch" type="xml">
<field name="sync_date" position="before">
Expand All @@ -24,7 +24,7 @@
<field name="model">shopinvader.partner</field>
<field
name="inherit_id"
ref="shopinvader_v1_base.shopinvader_partner_view_tree"
ref="shopinvader_restapi.shopinvader_partner_view_tree"
/>
<field name="arch" type="xml">
<field name="sync_date" position="before">
Expand Down
Loading

0 comments on commit e442266

Please sign in to comment.