-
-
Notifications
You must be signed in to change notification settings - Fork 209
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Listen for new
on_picking_dropship_done
event.
Add Rewards and StoreCredit payment methods. (Travis Bump)
- Loading branch information
1 parent
2980ffa
commit 8145a35
Showing
5 changed files
with
91 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ | |
from . import exporter | ||
from . import mapper | ||
from . import deleter | ||
from . import line_builder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# -*- coding: utf-8 -*- | ||
# © 2017 Hibou Corp. | ||
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). | ||
|
||
""" | ||
Line Builders for Magento psudo-payment methods (Store Credit, Rewards...). | ||
""" | ||
|
||
from odoo.addons.component.core import Component | ||
|
||
|
||
class StoreCreditLineBuilder(Component): | ||
""" Return values for a Store Credit line """ | ||
|
||
_name = 'magento.order.line.builder.store_credit' | ||
_inherit = 'ecommerce.order.line.builder' | ||
_usage = 'order.line.builder.magento.store_credit' | ||
|
||
def __init__(self, work_context): | ||
super(StoreCreditLineBuilder, self).__init__(work_context) | ||
self.product_ref = ('connector_magento', | ||
'product_product_store_credit') | ||
self.sign = -1 | ||
self.sequence = 991 | ||
|
||
|
||
class RewardsLineBuilder(Component): | ||
""" Return values for a Rewards line """ | ||
|
||
_name = 'magento.order.line.builder.rewards' | ||
_inherit = 'ecommerce.order.line.builder' | ||
_usage = 'order.line.builder.magento.rewards' | ||
|
||
def __init__(self, work_context): | ||
super(RewardsLineBuilder, self).__init__(work_context) | ||
self.product_ref = ('connector_magento', | ||
'product_product_rewards') | ||
self.sign = -1 | ||
self.sequence = 992 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters