diff --git a/hotel_channel_connector/models/product_pricelist/common.py b/hotel_channel_connector/models/product_pricelist/common.py index 618ff04e0..920fea2d6 100644 --- a/hotel_channel_connector/models/product_pricelist/common.py +++ b/hotel_channel_connector/models/product_pricelist/common.py @@ -35,7 +35,7 @@ class ChannelProductPricelist(models.Model): if self.external_id: with self.backend_id.work_on(self._name) as work: exporter = work.component(usage='product.pricelist.exporter') - exporter.rename_plan(self) + exporter.update_plan_name(self) @job(default_channel='root.channel') @api.multi diff --git a/hotel_channel_connector_wubook/models/product_pricelist/common.py b/hotel_channel_connector_wubook/models/product_pricelist/common.py index d00034cf9..a979e0e87 100644 --- a/hotel_channel_connector_wubook/models/product_pricelist/common.py +++ b/hotel_channel_connector_wubook/models/product_pricelist/common.py @@ -18,5 +18,5 @@ class ProductPricelistAdapter(Component): def delete_plan(self, external_id): return super(ProductPricelistAdapter, self).delete_plan(external_id) - def rename_plan(self, external_id, new_name): - return super(ProductPricelistAdapter, self).rename_plan(external_id, new_name) + def update_plan_name(self, external_id, new_name): + return super(ProductPricelistAdapter, self).update_plan_name(external_id, new_name) diff --git a/hotel_channel_connector_wubook/models/product_pricelist/exporter.py b/hotel_channel_connector_wubook/models/product_pricelist/exporter.py index 4ca694f9d..055e1f147 100644 --- a/hotel_channel_connector_wubook/models/product_pricelist/exporter.py +++ b/hotel_channel_connector_wubook/models/product_pricelist/exporter.py @@ -10,12 +10,12 @@ class ProductPricelistExporter(Component): _inherit = 'channel.product.pricelist.exporter' @api.model - def rename_plan(self, binding): + def update_plan_name(self, binding): try: binding.with_context({ 'connector_no_export': True, }).write({'sync_date': fields.Datetime.now()}) - return self.backend_adapter.rename_plan( + return self.backend_adapter.update_plan_name( binding.external_id, binding.name) except ChannelConnectorError as err: