Skip to content

Commit 747cde7

Browse files
DarkoNikolovskibizzappdev
authored andcommitted
[FIX] mapping
1 parent 9a735fe commit 747cde7

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

connector_magento/models/partner/importer.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,15 @@ class BaseAddressImportMapper(AbstractComponent):
294294

295295
@mapping
296296
def state(self, record):
297-
if not record.get("region"):
297+
region = record.get("region")
298+
if isinstance(region, dict):
299+
region = region.get("region")
300+
301+
if not region:
298302
return
303+
299304
state = self.env["res.country.state"].search(
300-
[("name", "=ilike", record["region"])], limit=1,
305+
[("name", "=ilike", region)], limit=1,
301306
)
302307
if state:
303308
return {"state_id": state.id}

connector_magento/wizards/magento_binding_backend_read.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _get_magento_binding_model(self):
6161
_logger.info(
6262
"No component registry for database %s. "
6363
"Probably because the Odoo registry has not been built "
64-
"yet."
64+
"yet." % (self.env.cr.dbname)
6565
)
6666
return []
6767
component_classes = components_registry.lookup(

oca_dependencies.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
connector
2+
connector-ecommerce
3+
e-commerce
4+
product-attribute
5+
sale-workflow
6+
server-tools
7+
bank-payment
8+
partner-contact

0 commit comments

Comments
 (0)