Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
17 changes: 8 additions & 9 deletions .copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
# Do NOT update manually; changes here will be overwritten by Copier
_commit: v1.14.1
_commit: v1.24
_src_path: https://github.com/OCA/oca-addons-repo-template.git
ci: GitHub
dependency_installation_mode: PIP
convert_readme_fragments_to_markdown: false
generate_requirements_txt: true
github_check_license: true
github_ci_extra_env: {}
github_enable_codecov: true
github_enable_codecov: false
github_enable_makepot: false
github_enable_stale_action: true
github_enforce_dev_status_compatibility: true
github_enable_stale_action: false
github_enforce_dev_status_compatibility: false
include_wkhtmltopdf: false
odoo_test_flavor: OCB
odoo_version: 10.0
org_name: Quartile Limited
org_name: ''
org_slug: qrtl
rebel_module_groups: []
repo_description: PCI Custom
repo_name: null
repo_name: ''
repo_slug: pci-custom
repo_website: https://www.quartile.co
travis_apt_packages: []
travis_apt_sources: []

1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# W503 changed by W504 and OCA prefers allow both
# E203: whitespace before ':' (black behaviour and not pep8 compliant)
ignore = E123,E133,E226,E241,E242,F811,F601,W503,W504,E203
select =
max-line-length = 88
per-file-ignores=
__init__.py:F401
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,31 @@ on:

jobs:
pre-commit:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v2
with:
python-version: "2.7"
python-version: "3.8"
- name: Get python version
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v1
- uses: actions/cache@v4
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)"
Expand Down
69 changes: 0 additions & 69 deletions .github/workflows/stale.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
# fi
# done
test:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
container: ${{ matrix.container }}
name: ${{ matrix.name }}
strategy:
Expand All @@ -37,6 +37,7 @@ jobs:
include:
- container: ghcr.io/oca/oca-ci/py2.7-ocb10.0:latest
name: test with OCB
makepot: "false"
services:
postgres:
image: postgres:9.6
Expand All @@ -47,7 +48,7 @@ jobs:
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false
- name: Install addons and dependencies
Expand All @@ -56,11 +57,11 @@ jobs:
run: manifestoo -d . check-licenses
- name: Check development status
run: manifestoo -d . check-dev-status --default-dev-status=Beta
continue-on-error: true
- 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 == 'qrtl' }}
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ __pycache__/
*.py[cod]
/.venv
/.pytest_cache
/.ruff_cache

# C extensions
*.so
Expand All @@ -24,6 +25,15 @@ var/
*.egg
*.eggs

# Debian packages
*.deb

# Redhat packages
*.rpm

# MacOS packages
*.dmg

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
Expand Down
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
15 changes: 7 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ exclude: |
# You don't usually want a bot to modify your legal texts
(LICENSE.*|COPYING.*)
default_language_version:
python: python3
python: python3.8
repos:
- repo: https://github.com/oca/maintainer-tools
rev: ab1d7f6
hooks:
# update the NOT INSTALLABLE ADDONS section above
- id: oca-update-pre-commit-excluded-addons
- id: oca-fix-manifest-website
args: ["https://www.quartile.co"]
# - id: oca-fix-manifest-website
# args: ["https://www.quartile.co"]
- repo: https://github.com/acsone/setuptools-odoo
rev: 3.1.8
hooks:
Expand All @@ -34,13 +34,12 @@ repos:
- requirements.txt
- --header
- "# generated from manifests external_dependencies"
- repo: https://github.com/OCA/mirrors-flake8
rev: v3.4.1
- repo: https://github.com/PyCQA/flake8
rev: 5.0.0
hooks:
- id: flake8
language_version: python2
name: flake8 excluding __init__.py
exclude: __init__\.py
name: flake8
additional_dependencies: ["flake8-bugbear==21.9.2"]
- repo: https://github.com/pre-commit/mirrors-pylint
rev: v2.5.3
hooks:
Expand Down
4 changes: 2 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ score=n

[ODOOLINT]
readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
manifest_required_authors=Quartile Limited
; manifest_required_authors=
manifest_required_keys=license
manifest_deprecated_keys=description,active
license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
Expand Down Expand Up @@ -103,7 +103,7 @@ enable=anomalous-backslash-in-string,
eval-referenced,
license-allowed,
manifest-author-string,
manifest-required-author,
; manifest-required-author,
manifest-required-key,
manifest-version-format,
api-one-deprecated,
Expand Down
4 changes: 2 additions & 2 deletions .pylintrc-mandatory
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ score=n

[ODOOLINT]
readme_template_url="https://github.com/OCA/maintainer-tools/blob/master/template/module/README.rst"
manifest_required_authors=Quartile Limited
<!-- manifest_required_authors= -->
manifest_required_keys=license
manifest_deprecated_keys=description,active
license_allowed=AGPL-3,GPL-2,GPL-2 or any later version,GPL-3,GPL-3 or any later version,LGPL-3
Expand Down Expand Up @@ -57,7 +57,7 @@ enable=anomalous-backslash-in-string,
eval-referenced,
license-allowed,
manifest-author-string,
manifest-required-author,
<!-- manifest-required-author, -->
manifest-required-key,
manifest-version-format

Expand Down
2 changes: 1 addition & 1 deletion .void/stock_shipment_schedule_report/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"summary": "",
"version": "10.0.1.1.0",
"category": "Reporting",
"website": "https://www.odoo-asia.com/",
"website": "https://www.quartile.co",
"author": "Quartile Limited",
"license": "LGPL-3",
"installable": True,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _get_periods(self, dates):
current_date = dates['current_date_utc']
threshold_date = dates['threshold_date_utc']
i = 0
for _ in xrange(7):
for _n in xrange(7):
if i == 0: # for "Shipment on Hold" for the 1st period (period 2)
start = current_date - relativedelta(years=100)
end = current_date
Expand Down Expand Up @@ -86,7 +86,7 @@ def _get_header_periods(self, periods):
end = datetime.strftime(
periods[p]['end'].astimezone(tz) - relativedelta(
days=1), '%Y-%m-%d')
title_vals['p' + `p`] = start + ' ~ ' + end
title_vals['p' + repr(p)] = start + ' ~ ' + end
return title_vals

def _get_product_ids(self, category_id):
Expand All @@ -102,8 +102,11 @@ def _get_product_ids(self, category_id):
for categ in categs:
if categ.child_id:
for child_categ in categ.child_id:
categs.append(child_categ) if child_categ not in \
categs else categs
(
categs.append(child_categ)
if child_categ not in categs
else categs
)
categ_ids = [categ.id for categ in categs]
domain.append(('categ_id', 'in', categ_ids))
if self.website_published:
Expand Down Expand Up @@ -190,7 +193,7 @@ def _get_qty_data(self, products, periods, line_vals):
loc_ids = tuple([l.id for l in self._get_locs()])
loc_ids_str = ', '.join(map(repr, loc_ids))
i = 0
for _ in xrange(7):
for _i in xrange(7):
date_from = fields.Datetime.to_string(periods[i]['start'])
date_to = fields.Datetime.to_string(periods[i]['end'])
in_params = ['NOT IN', loc_ids_str, 'IN', loc_ids_str,
Expand All @@ -207,14 +210,14 @@ def _get_qty_data(self, products, periods, line_vals):
qty_data = dict(
Counter(move_qty_data) + Counter(quote_qty_data))
for k, v in qty_data.iteritems():
line_vals[k][type + `i`] = v
line_vals[k][type + repr(i)] = v
i += 1
for prod in line_vals:
i = 2 # start from period "2" (period until threshold date)
for _ in xrange(5):
line_vals[prod]['bal' + `i`] \
= line_vals[prod]['bal' + `i - 1`] + line_vals[prod][
'in' + `i`] - line_vals[prod]['out' + `i`]
for _i in xrange(5):
line_vals[prod]['bal' + repr(i)] \
= line_vals[prod]['bal' + repr(i - 1)] + line_vals[prod][
'in' + repr(i)] - line_vals[prod]['out' + repr(i)]
i += 1
res.append(line_vals)
return res
Expand Down Expand Up @@ -243,11 +246,11 @@ def _get_lines(self, periods, category_id):
'bal1': qoh,
'in0': 0.0, 'out0': 0.0,
'in1': 0.0, 'out1': 0.0,
'in2': 0.0, 'out2': 0.0, 'bal2': 0.0, # first period in output
'in3': 0.0, 'out3': 0.0, 'bal3': 0.0, # second period in output
'in4': 0.0, 'out4': 0.0, 'bal4': 0.0, # third period in output
'in5': 0.0, 'out5': 0.0, 'bal5': 0.0, # fourth period in output
'in6': 0.0, 'out6': 0.0, 'bal6': 0.0, # fifth period in output
'in2': 0.0, 'out2': 0.0, 'bal2': 0.0, # first period in output
'in3': 0.0, 'out3': 0.0, 'bal3': 0.0, # second period in output
'in4': 0.0, 'out4': 0.0, 'bal4': 0.0, # third period in output
'in5': 0.0, 'out5': 0.0, 'bal5': 0.0, # fourth period in output
'in6': 0.0, 'out6': 0.0, 'bal6': 0.0, # fifth period in output
}
lines = self._get_qty_data(products, periods, line_vals)
for line in lines: # only append values (without key) to form the list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from datetime import datetime

from odoo import models, fields, api, _
from odoo import fields, _
from odoo.addons.abstract_report_xlsx.reports \
import stock_abstract_report_xlsx
from odoo.report import report_sxw
Expand Down Expand Up @@ -187,6 +187,7 @@ def _generate_report_content(self, workbook, report):
for line in report.line_ids:
self.write_line(line)


ShipmentScheduleXlsx(
'report.stock_shipment_schedule_report.shipment_schedule_report',
'shipment.schedule.report',
Expand Down
2 changes: 1 addition & 1 deletion .void/website_product_configurator/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
'name': "Website Product Configurator",
'version': '10.0.1.0.0',
'summary': """Configure products in e-shop""",
'author': "Pledra",
'author': "Pledra, Quartile Limited",
'license': 'AGPL-3',
'website': 'http://www.pledra.com/',
'category': 'website',
Expand Down
Loading
Loading