Skip to content
Open
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
8 changes: 6 additions & 2 deletions connector_magento/models/sale_order/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ def _add_store_credit_line(self, map_record, values):
amount = float(record['customer_balance_amount'])
if amount == 0.0:
return values
line_builder = self.component(usage='order.line.builder.magento.store_credit')
line_builder = self.component(
usage='order.line.builder.magento.store_credit'
)
line_builder.price_unit = amount
line = (0, 0, line_builder.get_line())
values['order_line'].append(line)
Expand All @@ -233,7 +235,9 @@ def _add_rewards_line(self, map_record, values):
amount = float(record['reward_currency_amount'])
if amount == 0.0:
return values
line_builder = self.component(usage='order.line.builder.magento.rewards')
line_builder = self.component(
usage='order.line.builder.magento.rewards'
)
line_builder.price_unit = amount
line = (0, 0, line_builder.get_line())
values['order_line'].append(line)
Expand Down