Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG][13.0] connector_magento #317

Open
wants to merge 44 commits into
base: 13.0
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
f708cec
Rename magentoerpconnect to connector_magento
guewen Jun 20, 2017
4235883
Restructure files, split large python files
guewen Jun 21, 2017
d0e37e4
Fix views
guewen Jun 21, 2017
a7c20c8
Collection.work_on is now a context manager
guewen Jun 23, 2017
ae453b7
Add a base listener and use it in partner export
guewen Jun 23, 2017
bf167e4
Rewrite tests using new API and vcr.py
guewen Jun 30, 2017
5a4f515
Update documentation
guewen Jul 11, 2017
2df1daa
Various fixes
guewen Jul 11, 2017
3c5c497
Add dependency on product_multi_category
guewen Jul 12, 2017
0cb6172
Manage multi-company backend
Jul 12, 2017
ff6e381
Fix Pylint warnings
guewen Jul 12, 2017
98f6ba2
Remove deprecated select for index creation
guewen Jul 13, 2017
aa67342
[FIX] pass http credentials to backedn component if required
Jul 21, 2017
d799320
[FIX] change user on backend otherwise import sale order will be done…
Jul 26, 2017
f9c7a4b
[CHG]review product aggregation by backend to improve performance
Jul 26, 2017
1834a94
Apply fiscal position
guewen Aug 15, 2017
860ddb6
Remove related_action from import_batch
guewen Aug 18, 2017
0e561c4
Allow service type product based on 'giftcard' type in Magento.
jaredkipe Aug 21, 2017
441d14e
Change return value matching with the comment
guewen Sep 21, 2017
da7bcfd
Fix failing test
guewen Sep 21, 2017
f0ba4be
Listen for new `on_picking_dropship_done` event.
jaredkipe Oct 23, 2017
eecbd22
Add new wizard to read data from magento
lmignon Nov 23, 2017
bdda141
OCA Transbot updated translations from Transifex
oca-transbot Mar 3, 2018
8a9ad05
[MIG] connector_magento to v11
hugosantosred Mar 6, 2018
e396491
[MIG] connector_magento to v11
sebalix Apr 17, 2019
edc334d
[MIG] connector_magento: Migration to 12.0
sebalix Apr 18, 2019
553f350
[ADD] Magento2 compatibility
StefanRijnhart May 8, 2020
5115041
[UPD] Update connector_magento.pot
oca-travis Jul 2, 2020
e8c53b0
Update translation files
oca-transbot Aug 16, 2020
483d4e7
[IMP] Set a pricelist based on the currency of the order
StefanRijnhart Oct 28, 2020
9e64cd1
[FIX] Redundant error handling
StefanRijnhart Nov 5, 2020
6fbc2c0
[IMP] Mute logging related to checkpoint notifications in tests
StefanRijnhart Nov 26, 2020
72b7d6e
connector_magento 12.0.1.1.1
OCA-git-bot Dec 3, 2020
133a317
[UPD] Update connector_magento.pot
oca-travis Dec 3, 2020
408485b
connector_magento 12.0.1.1.2
OCA-git-bot Dec 3, 2020
b9dbdfc
Update translation files
oca-transbot Dec 3, 2020
06bef57
[FIX] Incorrect discount handling
StefanRijnhart Dec 3, 2020
79e750c
[UPD] Update connector_magento.pot
oca-travis Dec 3, 2020
b601287
connector_magento 12.0.1.1.3
OCA-git-bot Dec 3, 2020
8bbc54d
Update translation files
oca-transbot Dec 3, 2020
ab59fab
connector_magento 12.0.1.1.4
OCA-git-bot Feb 8, 2021
19829a3
[IMP] : black, isort, prettier
bizzappdev Nov 11, 2020
9a735fe
[MIG] connector_magento: Migration to 13.0
bizzappdev Nov 5, 2020
747cde7
[FIX] mapping
DarkoNikolovski Mar 10, 2021
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
Prev Previous commit
Next Next commit
Various fixes
  • Loading branch information
guewen authored and bizzappdev committed Mar 9, 2021
commit 2df1daa7597b36d80837fd75ddb153e089e19781
7 changes: 6 additions & 1 deletion connector_magento/components/backend_adapter.py
Original file line number Diff line number Diff line change
@@ -6,13 +6,18 @@
import logging
import xmlrpclib

import magento as magentolib
from odoo.addons.component.core import AbstractComponent
from odoo.addons.queue_job.exception import RetryableJobError
from odoo.addons.connector.exception import NetworkRetryableError
from datetime import datetime

_logger = logging.getLogger(__name__)

try:
import magento as magentolib
except ImportError:
_logger.debug("Cannot import 'magento'")


MAGENTO_DATETIME_FORMAT = '%Y-%m-%d %H:%M:%S'

6 changes: 2 additions & 4 deletions connector_magento/models/sale_order/importer.py
Original file line number Diff line number Diff line change
@@ -145,9 +145,9 @@ def _add_shipping_line(self, map_record, values):
record = map_record.source
amount_incl = float(record.get('base_shipping_incl_tax') or 0.0)
amount_excl = float(record.get('shipping_amount') or 0.0)
if not (amount_incl or amount_excl):
return values
line_builder = self.component(usage='order.line.builder.shipping')
# add even if the price is 0, otherwise odoo will add a shipping
# line in the order when we ship the picking
if self.options.tax_include:
discount = float(record.get('shipping_discount_amount') or 0.0)
line_builder.price_unit = (amount_incl - discount)
@@ -249,11 +249,9 @@ def shipping_method(self, record):
result = {'carrier_id': carrier.id}
else:
# FIXME: a mapper should not have any side effects
fake_partner = self.env['res.partner'].search([], limit=1)
product = self.env.ref(
'connector_ecommerce.product_product_shipping')
carrier = self.env['delivery.carrier'].create({
'partner_id': fake_partner.id,
'product_id': product.id,
'name': ifield,
'magento_code': ifield})