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: Migration to 13.0 #337

Open
wants to merge 46 commits into
base: 13.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
19909cd
[REF] dotfiles: copier template 1.20
dreispt Apr 27, 2024
cdd263b
Rename magentoerpconnect to connector_magento
guewen Jun 20, 2017
319f04f
Restructure files, split large python files
guewen Jun 21, 2017
14ead7a
Fix views
guewen Jun 21, 2017
875e326
Collection.work_on is now a context manager
guewen Jun 23, 2017
4923821
Add a base listener and use it in partner export
guewen Jun 23, 2017
fdaade5
Rewrite tests using new API and vcr.py
guewen Jun 30, 2017
36bc2d5
Update documentation
guewen Jul 11, 2017
033dcc5
Various fixes
guewen Jul 11, 2017
18c8841
Add dependency on product_multi_category
guewen Jul 12, 2017
c43503d
Manage multi-company backend
Jul 12, 2017
4555e7f
Fix Pylint warnings
guewen Jul 12, 2017
41514c4
Remove deprecated select for index creation
guewen Jul 13, 2017
8cb151e
[FIX] pass http credentials to backedn component if required
Jul 21, 2017
a3c310b
[FIX] change user on backend otherwise import sale order will be done…
Jul 26, 2017
fe2f696
[CHG]review product aggregation by backend to improve performance
Jul 26, 2017
8350522
Apply fiscal position
guewen Aug 15, 2017
f5e0de9
Remove related_action from import_batch
guewen Aug 18, 2017
dc2eb1b
Allow service type product based on 'giftcard' type in Magento.
jaredkipe Aug 21, 2017
4d74976
Change return value matching with the comment
guewen Sep 21, 2017
7c78b38
Fix failing test
guewen Sep 21, 2017
828380b
Listen for new `on_picking_dropship_done` event.
jaredkipe Oct 23, 2017
9bf7691
Add new wizard to read data from magento
lmignon Nov 23, 2017
23c0fd8
OCA Transbot updated translations from Transifex
oca-transbot Mar 3, 2018
0b01b96
[MIG] connector_magento to v11
hugosantosred Mar 6, 2018
fef5729
[MIG] connector_magento to v11
sebalix Apr 17, 2019
b7a0c54
[MIG] connector_magento: Migration to 12.0
sebalix Apr 18, 2019
fbcd021
[ADD] Magento2 compatibility
StefanRijnhart May 8, 2020
1dff6f3
[UPD] Update connector_magento.pot
oca-travis Jul 2, 2020
cc30b70
Update translation files
oca-transbot Aug 16, 2020
59e33dc
[IMP] Set a pricelist based on the currency of the order
StefanRijnhart Oct 28, 2020
2563ef8
[FIX] Redundant error handling
StefanRijnhart Nov 5, 2020
24d5514
[IMP] Mute logging related to checkpoint notifications in tests
StefanRijnhart Nov 26, 2020
85de514
connector_magento 12.0.1.1.1
OCA-git-bot Dec 3, 2020
bd8cdcc
[UPD] Update connector_magento.pot
oca-travis Dec 3, 2020
ee85502
connector_magento 12.0.1.1.2
OCA-git-bot Dec 3, 2020
e830072
Update translation files
oca-transbot Dec 3, 2020
b88a4c3
[FIX] Incorrect discount handling
StefanRijnhart Dec 3, 2020
8da9728
[UPD] Update connector_magento.pot
oca-travis Dec 3, 2020
3f089d9
connector_magento 12.0.1.1.3
OCA-git-bot Dec 3, 2020
eae34cd
Update translation files
oca-transbot Dec 3, 2020
efcc09b
connector_magento 12.0.1.1.4
OCA-git-bot Feb 8, 2021
dc24ef1
[IMP] : black, isort, prettier
bizzappdev Nov 11, 2020
f53584b
[MIG] connector_magento: Migration to 13.0
bizzappdev Nov 5, 2020
8970fce
[FIX] mapping
DarkoNikolovski Mar 10, 2021
f4d0b60
[REF] connector_magento: lint fixes
dreispt Apr 27, 2024
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
23 changes: 23 additions & 0 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.20
_src_path: gh:oca/oca-addons-repo-template
ci: GitHub
convert_readme_fragments_to_markdown: false
generate_requirements_txt: true
github_check_license: true
github_ci_extra_env: {}
github_enable_codecov: true
github_enable_makepot: true
github_enable_stale_action: true
github_enforce_dev_status_compatibility: true
include_wkhtmltopdf: false
odoo_test_flavor: Both
odoo_version: 13.0
org_name: Odoo Community Association (OCA)
org_slug: OCA
rebel_module_groups: []
repo_description: ''
repo_name: Magento eCommerce Connector
repo_slug: connector-magento
repo_website: https://github.com/OCA/connector-magento

12 changes: 10 additions & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
env:
browser: true
es6: true

# See https://github.com/OCA/odoo-community.org/issues/37#issuecomment-470686449
parserOptions:
ecmaVersion: 2017
ecmaVersion: 2019

overrides:
- files:
- "**/*.esm.js"
parserOptions:
sourceType: module

# Globals available in Odoo that shouldn't produce errorings
globals:
Expand All @@ -14,7 +21,8 @@ globals:
moment: readonly
odoo: readonly
openerp: readonly
Promise: readonly
owl: readonly
luxon: readonly

# Styling is handled by Prettier, so we only need to enable AST rules;
# see https://github.com/OCA/maintainer-quality-tools/pull/618#issuecomment-558576890
Expand Down
4 changes: 3 additions & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
max-line-length = 80
max-line-length = 88
max-complexity = 16
# B = bugbear
# B9 = bugbear opinionated (incl line length)
Expand All @@ -8,3 +8,5 @@ select = C,E,F,W,B,B9
# E501: flake8 line length (covered by bugbear B950)
# W503: line break before binary operator (black behaviour)
ignore = E203,E501,W503
per-file-ignores=
__init__.py:F401
46 changes: 46 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: pre-commit

on:
pull_request:
branches:
- "13.0*"
push:
branches:
- "13.0"
- "13.0-ocabot-*"

jobs:
pre-commit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Get python version
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files --show-diff-on-failure --color=always
env:
# Consider valid a PR that changes README fragments but doesn't
# change the README.rst file itself. It's not really a problem
# because the bot will update it anyway after merge. This way, we
# lower the barrier for functional contributors that want to fix the
# readme fragments, while still letting developers get README
# auto-generated (which also helps functionals when using runboat).
# DOCS https://pre-commit.com/#temporarily-disabling-hooks
SKIP: oca-gen-addon-readme
- name: Check that all files generated by pre-commit are in git
run: |
newfiles="$(git ls-files --others --exclude-from=.gitignore)"
if [ "$newfiles" != "" ] ; then
echo "Please check-in the following files:"
echo "$newfiles"
exit 1
fi
69 changes: 69 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Mark stale issues and pull requests

on:
schedule:
- cron: "0 12 * * 0"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Stale PRs and issues policy
uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
# General settings.
ascending: true
remove-stale-when-updated: true
# Pull Requests settings.
# 120+30 day stale policy for PRs
# * Except PRs marked as "no stale"
days-before-pr-stale: 120
days-before-pr-close: 30
exempt-pr-labels: "no stale"
stale-pr-label: "stale"
stale-pr-message: >
There hasn't been any activity on this pull request in the past 4 months, so
it has been marked as stale and it will be closed automatically if no
further activity occurs in the next 30 days.
If you want this PR to never become stale, please ask a PSC member to apply
the "no stale" label.
# Issues settings.
# 180+30 day stale policy for open issues
# * Except Issues marked as "no stale"
days-before-issue-stale: 180
days-before-issue-close: 30
exempt-issue-labels: "no stale,needs more information"
stale-issue-label: "stale"
stale-issue-message: >
There hasn't been any activity on this issue in the past 6 months, so it has
been marked as stale and it will be closed automatically if no further
activity occurs in the next 30 days.
If you want this issue to never become stale, please ask a PSC member to
apply the "no stale" label.
# 15+30 day stale policy for issues pending more information
# * Issues that are pending more information
# * Except Issues marked as "no stale"
- name: Needs more information stale issues policy
uses: actions/stale@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
ascending: true
only-labels: "needs more information"
exempt-issue-labels: "no stale"
days-before-stale: 15
days-before-close: 30
days-before-pr-stale: -1
days-before-pr-close: -1
remove-stale-when-updated: true
stale-issue-label: "stale"
stale-issue-message: >
This issue needs more information and there hasn't been any activity
recently, so it has been marked as stale and it will be closed automatically
if no further activity occurs in the next 30 days.
If you think this is a mistake, please ask a PSC member to remove the "needs
more information" label.
69 changes: 69 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: tests

on:
pull_request:
branches:
- "13.0*"
push:
branches:
- "13.0"
- "13.0-ocabot-*"

jobs:
unreleased-deps:
runs-on: ubuntu-latest
name: Detect unreleased dependencies
steps:
- uses: actions/checkout@v3
- run: |
for reqfile in requirements.txt test-requirements.txt ; do
if [ -f ${reqfile} ] ; then
result=0
# reject non-comment lines that contain a / (i.e. URLs, relative paths)
grep "^[^#].*/" ${reqfile} || result=$?
if [ $result -eq 0 ] ; then
echo "Unreleased dependencies found in ${reqfile}."
exit 1
fi
fi
done
test:
runs-on: ubuntu-20.04
container: ${{ matrix.container }}
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- container: ghcr.io/oca/oca-ci/py3.6-odoo13.0:latest
name: test with Odoo
- container: ghcr.io/oca/oca-ci/py3.6-ocb13.0:latest
name: test with OCB
makepot: "true"
services:
postgres:
image: postgres:9.6
env:
POSTGRES_USER: odoo
POSTGRES_PASSWORD: odoo
POSTGRES_DB: odoo
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install addons and dependencies
run: oca_install_addons
- name: Check licenses
run: manifestoo -d . check-licenses
- name: Check development status
run: manifestoo -d . check-dev-status --default-dev-status=Beta
- name: Initialize test db
run: oca_init_test_database
- name: Run tests
run: oca_run_tests
- uses: codecov/codecov-action@v1
- name: Update .pot files
run: oca_export_and_push_pot https://x-access-token:${{ secrets.GIT_PUSH_TOKEN }}@github.com/${{ github.repository }}
if: ${{ matrix.makepot == 'true' && github.event_name == 'push' && github.repository_owner == 'OCA' }}
21 changes: 20 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
/.venv
/.pytest_cache
/.ruff_cache

# C extensions
*.so
Expand All @@ -13,14 +16,14 @@ build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
*.eggs

# Installer logs
pip-log.txt
Expand All @@ -40,6 +43,19 @@ coverage.xml
# Pycharm
.idea

# Eclipse
.settings

# Visual Studio cache/options directory
.vs/
.vscode

# OSX Files
.DS_Store

# Django stuff:
*.log

# Mr Developer
.mr.developer.cfg
.project
Expand All @@ -54,3 +70,6 @@ docs/_build/
# Backup files
*~
*.swp

# OCA rules
!static/lib/
1 change: 1 addition & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ known_odoo=odoo
known_odoo_addons=odoo.addons
sections=FUTURE,STDLIB,THIRDPARTY,ODOO,ODOO_ADDONS,FIRSTPARTY,LOCALFOLDER
default_section=THIRDPARTY
ensure_newline_before_comments = True
2 changes: 2 additions & 0 deletions .oca_hooks.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[MESSAGES_CONTROL]
disable=xml-deprecated-data-node,xml-deprecated-tree-attribute
Loading
Loading