diff --git a/.copier-answers.yml b/.copier-answers.yml index f413811a..63aa4b12 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -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: [] diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 497268be..cd433f96 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -13,7 +13,7 @@ jobs: pre-commit: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions/setup-python@v2 with: python-version: "2.7" @@ -27,6 +27,15 @@ jobs: 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)" diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml deleted file mode 100644 index 1693a125..00000000 --- a/.github/workflows/stale.yml +++ /dev/null @@ -1,69 +0,0 @@ -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. diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7031ce8f..a552be31 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 @@ -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 @@ -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' }} diff --git a/.gitignore b/.gitignore index 9c283fd4..2b045db3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ __pycache__/ *.py[cod] /.venv /.pytest_cache +/.ruff_cache # C extensions *.so @@ -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 diff --git a/.oca_hooks.cfg b/.oca_hooks.cfg new file mode 100644 index 00000000..1f3e3e42 --- /dev/null +++ b/.oca_hooks.cfg @@ -0,0 +1,2 @@ +[MESSAGES_CONTROL] +disable=xml-deprecated-data-node,xml-deprecated-tree-attribute diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3c5d3eef..6e65030a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ exclude: | # You don't usually want a bot to modify your legal texts (LICENSE.*|COPYING.*) default_language_version: - python: python3 + python: python3.6 repos: - repo: https://github.com/oca/maintainer-tools rev: ab1d7f6 diff --git a/.pylintrc b/.pylintrc index fedf0ae6..f930a16a 100644 --- a/.pylintrc +++ b/.pylintrc @@ -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 @@ -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, diff --git a/.pylintrc-mandatory b/.pylintrc-mandatory index de3fd6ca..4df6dbf0 100644 --- a/.pylintrc-mandatory +++ b/.pylintrc-mandatory @@ -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_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 @@ -57,7 +57,7 @@ enable=anomalous-backslash-in-string, eval-referenced, license-allowed, manifest-author-string, - manifest-required-author, + manifest-required-key, manifest-version-format diff --git a/README.md b/README.md index aaa46417..aff8979b 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ This part will be replaced when running the oca-gen-addons-table script from OCA This repository is licensed under [AGPL-3.0](LICENSE). -However, each module can have a totally different license, as long as they adhere to Quartile Limited +However, each module can have a totally different license, as long as they adhere to policy. Consult each module's `__manifest__.py` file, which contains a `license` key that explains its license. diff --git a/abstract_report_xlsx/__manifest__.py b/abstract_report_xlsx/__manifest__.py index ef62671a..800a389e 100644 --- a/abstract_report_xlsx/__manifest__.py +++ b/abstract_report_xlsx/__manifest__.py @@ -8,7 +8,7 @@ "summary": "", "version": "10.0.1.0.0", "category": "Reporting", - "website": "https://www.odoo-asia.com/", + "website": "https://www.quartile.co", "author": "Quartile Limited", "license": "AGPL-3", "installable": True, diff --git a/account_analytic_default_product_category/__manifest__.py b/account_analytic_default_product_category/__manifest__.py index 8d48eb08..13b548cd 100644 --- a/account_analytic_default_product_category/__manifest__.py +++ b/account_analytic_default_product_category/__manifest__.py @@ -3,16 +3,17 @@ # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). { 'name': 'Account Analytic Default Product Category', - 'summary':"""""", + 'summary': """""", 'version': '10.0.1.0.0', 'category': 'Accounting & Finance', - 'description': """ + 'description': """ * Add 'Analytic Account' to Product Category -* If no corresponding Analytic Defaults, automatically propose Analytic Account of Product Category on Invoice lines +* If no corresponding Analytic Defaults, automatically propose +Analytic Account of Product Category on Invoice lines * Do not propose it on Purchase Order lines """, - 'author': 'Rooms For (Hong Kong) Limited T/A OSCG', - 'website': 'https://www.odoo-asia.com', + 'author': 'Quartile Limited', + 'website': 'https://www.quartile.co', 'license': 'LGPL-3', 'depends': [ 'account', diff --git a/account_analytic_default_product_category/models/account_analytic_default.py b/account_analytic_default_product_category/models/account_analytic_default.py index b87474cf..84f2eeb8 100644 --- a/account_analytic_default_product_category/models/account_analytic_default.py +++ b/account_analytic_default_product_category/models/account_analytic_default.py @@ -8,7 +8,6 @@ class AccountAnalyticDefault(models.Model): _inherit = "account.analytic.default" - @api.model def account_get(self, product_id=None, partner_id=None, user_id=None, date=None, company_id=None): diff --git a/account_bank_statement_adj/__manifest__.py b/account_bank_statement_adj/__manifest__.py index cc6e8c36..0be95603 100644 --- a/account_bank_statement_adj/__manifest__.py +++ b/account_bank_statement_adj/__manifest__.py @@ -5,7 +5,7 @@ 'name': 'Clear move_name when unreconciling bank statement line', 'version': '10.0.1.0.0', 'author': 'Quartile Limited', - 'website': 'https://www.odoo-asia.com', + 'website': 'https://www.quartile.co', 'category': 'Account', 'license': "LGPL-3", 'description': """ diff --git a/account_bank_statement_adj/models/account_bank_statement.py b/account_bank_statement_adj/models/account_bank_statement.py index 3129286d..97595158 100644 --- a/account_bank_statement_adj/models/account_bank_statement.py +++ b/account_bank_statement_adj/models/account_bank_statement.py @@ -2,7 +2,7 @@ # Copyright 2017 Quartile Limited # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import models, fields, api +from odoo import models, api class AccountBankStatementLine(models.Model): diff --git a/account_invoice_line_view/__manifest__.py b/account_invoice_line_view/__manifest__.py index 1b6203de..2f437273 100644 --- a/account_invoice_line_view/__manifest__.py +++ b/account_invoice_line_view/__manifest__.py @@ -11,7 +11,7 @@ """, "version": "10.0.1.0.0", "category": "Account", - "website": "https://www.odoo-asia.com/", + "website": "https://www.quartile.co", "author": "Quartile Limited", "license": "LGPL-3", "application": False, diff --git a/account_invoice_line_view/models/account_invoice_line.py b/account_invoice_line_view/models/account_invoice_line.py index 25ba5248..0d567a86 100644 --- a/account_invoice_line_view/models/account_invoice_line.py +++ b/account_invoice_line_view/models/account_invoice_line.py @@ -63,7 +63,6 @@ class AccountInoviceLine(models.Model): string='Customer', store=True ) - @api.multi @api.depends('invoice_id.name', 'invoice_id.reference') diff --git a/account_payment_cancel_adj/models/account_payment.py b/account_payment_cancel_adj/models/account_payment.py index a55e54d1..a970c43e 100644 --- a/account_payment_cancel_adj/models/account_payment.py +++ b/account_payment_cancel_adj/models/account_payment.py @@ -2,13 +2,12 @@ # Copyright 2018 Quartile Limited # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import api, fields, models +from odoo import api, models class AccountPayment(models.Model): _inherit = 'account.payment' - @api.multi def cancel(self): super(AccountPayment, self).cancel() diff --git a/account_view_adjust/__manifest__.py b/account_view_adjust/__manifest__.py index 0258f854..1d6bc3a2 100644 --- a/account_view_adjust/__manifest__.py +++ b/account_view_adjust/__manifest__.py @@ -3,7 +3,7 @@ # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). { 'name': 'Adjustments on Accounting Views', - 'summary':"""""", + 'summary': """""", 'version': '10.0.1.2.0', 'category': 'Accounting', 'description': """ diff --git a/account_view_adjust/models/account_invoice.py b/account_view_adjust/models/account_invoice.py index 42350b27..c8d6ef93 100644 --- a/account_view_adjust/models/account_invoice.py +++ b/account_view_adjust/models/account_invoice.py @@ -3,7 +3,7 @@ # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). from odoo.exceptions import UserError -from odoo import models, fields, api, _ +from odoo import models, api, _ class AccountInovice(models.Model): diff --git a/mail_force_email/__manifest__.py b/mail_force_email/__manifest__.py index 34beef39..b6ed3824 100644 --- a/mail_force_email/__manifest__.py +++ b/mail_force_email/__manifest__.py @@ -5,7 +5,7 @@ 'name': 'Email Template with Force Sending', 'version': '10.0.1.0.0', 'author': 'Quartile Limited', - 'website': 'https://www.odoo-asia.com', + 'website': 'https://www.quartile.co', 'category': 'Mail', 'license': "LGPL-3", 'description': """ diff --git a/mail_force_email/models/res_partner.py b/mail_force_email/models/res_partner.py index c6416d08..e3ac6da2 100644 --- a/mail_force_email/models/res_partner.py +++ b/mail_force_email/models/res_partner.py @@ -12,22 +12,28 @@ class Partner(models.Model): # if force_email is enabled in used template, send email to partner # regardless of partner's notify_email setting @api.multi - def _notify(self, message, force_send=False, send_after_commit=True, user_signature=True): + def _notify( + self, message, force_send=False, send_after_commit=True, user_signature=True + ): message_sudo = message.sudo() - email_channels = message.channel_ids.filtered(lambda channel: channel.email_send) + email_channels = message.channel_ids.filtered( + lambda channel: channel.email_send + ) # adjust start (QTL) domain = [ '|', ('id', 'in', self.ids), ('channel_ids', 'in', email_channels.ids), - ('email', '!=', message_sudo.author_id and message_sudo.author_id.email or message.email_from) + ('email', '!=', message_sudo.author_id + and message_sudo.author_id.email + or message.email_from) ] layout = self._context.get('custom_layout', False) if not (layout and self.env.ref(layout).force_email): domain.append(('notify_email', '!=', 'none')) self.sudo().search(domain)._notify_by_email(message, force_send=force_send, - send_after_commit=send_after_commit, - user_signature=user_signature) + send_after_commit=send_after_commit, + user_signature=user_signature) # adjust end (QTL) self._notify_by_chat(message) return True diff --git a/mrp_block_inventory_post/models/mrp_production.py b/mrp_block_inventory_post/models/mrp_production.py index 25450f2c..e4f435cb 100644 --- a/mrp_block_inventory_post/models/mrp_production.py +++ b/mrp_block_inventory_post/models/mrp_production.py @@ -13,7 +13,8 @@ class MrpProduction(models.Model): def post_inventory(self): for order in self: if order.move_raw_ids.filtered( - lambda x: x.state not in ['assigned', 'done', 'cancel']): + lambda x: x.state not in ['assigned', 'done', 'cancel'] + ): raise UserError(_( "Please make sure that stock is reserved for all " "components before posting inventory." diff --git a/mrp_change_source_location/models/mrp_production.py b/mrp_change_source_location/models/mrp_production.py index 2023484c..8b41d0f1 100644 --- a/mrp_change_source_location/models/mrp_production.py +++ b/mrp_change_source_location/models/mrp_production.py @@ -2,7 +2,7 @@ # Copyright 2018 Quartile Limited # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import models, fields, api +from odoo import models class MrpProduction(models.Model): diff --git a/mrp_change_source_location/wizard/change_source_location_wizard.py b/mrp_change_source_location/wizard/change_source_location_wizard.py index 83a857a8..b9d5bdd3 100644 --- a/mrp_change_source_location/wizard/change_source_location_wizard.py +++ b/mrp_change_source_location/wizard/change_source_location_wizard.py @@ -2,7 +2,7 @@ # Copyright 2018 Quartile Limited # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import models, fields, api +from odoo import models, fields class ChangeSourceLocationWizard(models.TransientModel): diff --git a/mrp_default_location/__manifest__.py b/mrp_default_location/__manifest__.py index 16a5107e..9490edac 100644 --- a/mrp_default_location/__manifest__.py +++ b/mrp_default_location/__manifest__.py @@ -8,7 +8,7 @@ """, "version": "10.0.1.0.0", "category": "Manufacturing", - "website": "https://www.odoo-asia.com/", + "website": "https://www.quartile.co", "author": "Quartile Limited", "license": "LGPL-3", "installable": True, diff --git a/mrp_specsheet_py3o/__manifest__.py b/mrp_specsheet_py3o/__manifest__.py index 4ae6cfa7..774148ad 100644 --- a/mrp_specsheet_py3o/__manifest__.py +++ b/mrp_specsheet_py3o/__manifest__.py @@ -16,6 +16,7 @@ """, 'author': 'Quartile Limited', + 'website': 'https://www.quartile.co', 'depends': [ 'report_py3o', 'mrp', diff --git a/payment_paypal_multiwebsite_support/__manifest__.py b/payment_paypal_multiwebsite_support/__manifest__.py index 7799bc86..f4ef3c79 100644 --- a/payment_paypal_multiwebsite_support/__manifest__.py +++ b/payment_paypal_multiwebsite_support/__manifest__.py @@ -5,7 +5,7 @@ 'name': 'Extend PayPal Acquirer to support multi-website', 'version': '10.0.1.0.0', 'author': 'Quartile Limited', - 'website': 'https://www.odoo-asia.com', + 'website': 'https://www.quartile.co', 'category': 'Accounting', 'license': "AGPL-3", 'description': """ diff --git a/payment_paypal_multiwebsite_support/models/payment.py b/payment_paypal_multiwebsite_support/models/payment.py index 97836ea1..de39aa83 100644 --- a/payment_paypal_multiwebsite_support/models/payment.py +++ b/payment_paypal_multiwebsite_support/models/payment.py @@ -6,7 +6,7 @@ from odoo.addons.payment_paypal.controllers.main import PaypalController from odoo.http import request -from odoo import models, fields, api +from odoo import models, api class AcquirerPaypal(models.Model): @@ -19,7 +19,7 @@ def paypal_form_generate_values(self, values): base_url = '' if request.httprequest.environ.get('wsgi.url_scheme'): base_url += request.httprequest.environ.get('wsgi.url_scheme') + \ - '://' + '://' base_url += request.httprequest.environ.get('HTTP_HOST', '') paypal_tx_values.update({ 'paypal_return': '%s' % urlparse.urljoin(base_url, diff --git a/product_configurator/__manifest__.py b/product_configurator/__manifest__.py index 4f75285a..ecfbfe8a 100755 --- a/product_configurator/__manifest__.py +++ b/product_configurator/__manifest__.py @@ -4,9 +4,9 @@ 'version': '10.0.1.0.0', 'category': 'Generic Modules/Base', 'summary': 'Base for product configuration interface modules', - 'author': 'Pledra', + 'author': 'Pledra, Quartile Limited', 'license': 'AGPL-3', - 'website': 'http://www.pledra.com/', + 'website': 'https://www.quartile.co', 'depends': ['sale_stock'], "data": [ 'data/menu_configurable_product.xml', diff --git a/product_configurator_adj/models/stock_move.py b/product_configurator_adj/models/stock_move.py index a5b784ad..0fe00e7d 100644 --- a/product_configurator_adj/models/stock_move.py +++ b/product_configurator_adj/models/stock_move.py @@ -6,7 +6,7 @@ class StockMove(models.Model): _inherit = 'stock.move' - #product_id = fields.Many2one(domain=[('config_ok', '=', False)]) + # product_id = fields.Many2one(domain=[('config_ok', '=', False)]) # remove domain because configurable product cannot be selected in stock # moves (inventory transfer), otherwise. product_id = fields.Many2one(domain=[]) diff --git a/product_configurator_mrp/__manifest__.py b/product_configurator_mrp/__manifest__.py index e2006252..276cbdf3 100644 --- a/product_configurator_mrp/__manifest__.py +++ b/product_configurator_mrp/__manifest__.py @@ -4,9 +4,9 @@ 'version': '10.0.1.0.0', 'category': 'Manufacturing', 'summary': 'BOM Support for configurable products', - 'author': 'Pledra', + 'author': 'Pledra, Quartile Limited', 'license': 'AGPL-3', - 'website': 'http://www.pledra.com/', + 'website': 'https://www.quartile.co', 'depends': [ 'mrp', 'product_configurator' diff --git a/product_configurator_mrp_ext/models/product_product.py b/product_configurator_mrp_ext/models/product_product.py index 3fd3684f..dc55e8dc 100644 --- a/product_configurator_mrp_ext/models/product_product.py +++ b/product_configurator_mrp_ext/models/product_product.py @@ -21,7 +21,8 @@ def configurator_default_bom_variant(self): def get_product_from_value_set(self): self.ensure_one() res = [] - categs = dict(self.env['product.template']._fields['part_categ' + categs = dict(self.env['product.template']._fields[ + 'part_categ' ].selection).keys() # return one mapped product per part category. # records with bigger number of attribute values should get the diff --git a/product_configurator_mrp_ext/models/product_template.py b/product_configurator_mrp_ext/models/product_template.py index a1e090d2..575bad03 100644 --- a/product_configurator_mrp_ext/models/product_template.py +++ b/product_configurator_mrp_ext/models/product_template.py @@ -9,7 +9,6 @@ class ProductTemplate(models.Model): _inherit = "product.template" - attribute_value_set_ids = fields.One2many( comodel_name='product.attribute.value.set', inverse_name='product_tmpl_id', diff --git a/product_configurator_mrp_ext/models/product_template_hook_create_get_variant.py b/product_configurator_mrp_ext/models/product_template_hook_create_get_variant.py index 4f540e7f..57445b19 100644 --- a/product_configurator_mrp_ext/models/product_template_hook_create_get_variant.py +++ b/product_configurator_mrp_ext/models/product_template_hook_create_get_variant.py @@ -4,7 +4,7 @@ # Copyright 2017 Quartile Limited # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). -from odoo import models, api +from odoo import models, api, _ from odoo.exceptions import ValidationError from odoo.addons.product_configurator_mrp.models.product import ProductTemplate diff --git a/product_configurator_wizard/__manifest__.py b/product_configurator_wizard/__manifest__.py index 0252ae89..eaec8a84 100644 --- a/product_configurator_wizard/__manifest__.py +++ b/product_configurator_wizard/__manifest__.py @@ -4,9 +4,9 @@ 'version': '10.0.1.0.0', 'category': 'Generic Modules/Base', 'summary': 'Back-end Product Configurator', - 'author': 'Pledra', + 'author': 'Pledra, Quartile Limited', 'license': 'AGPL-3', - 'website': 'http://www.pledra.com/', + 'website': 'https://www.quartile.co', 'depends': ['sale', 'product_configurator'], "data": [ 'wizard/product_configurator_view.xml', diff --git a/product_description_adj/__manifest__.py b/product_description_adj/__manifest__.py index 7c19fd5a..98f61924 100644 --- a/product_description_adj/__manifest__.py +++ b/product_description_adj/__manifest__.py @@ -5,7 +5,7 @@ 'name': 'Remove Internal Reference', 'version': '10.0.1.1.0', 'author': 'Quartile Limited', - 'website': 'https://www.odoo-asia.com', + 'website': 'https://www.quartile.co', 'category': 'Product', 'license': "LGPL-3", 'description': """ diff --git a/product_description_adj/models/product.py b/product_description_adj/models/product.py index 64534d51..39a5da2a 100644 --- a/product_description_adj/models/product.py +++ b/product_description_adj/models/product.py @@ -2,7 +2,7 @@ # Copyright 2017 Quartile Limited # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import api, fields, models +from odoo import api, models class ProductProduct(models.Model): diff --git a/product_description_adj/models/sale_order_line.py b/product_description_adj/models/sale_order_line.py index 2bc04df0..969788cf 100644 --- a/product_description_adj/models/sale_order_line.py +++ b/product_description_adj/models/sale_order_line.py @@ -2,7 +2,7 @@ # Copyright 2017 Quartile Limited # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import api, fields, models, _ +from odoo import api, models class SaleOrderLine(models.Model): diff --git a/product_pricelist_multiwebsite_support/__manifest__.py b/product_pricelist_multiwebsite_support/__manifest__.py index ffff67cb..234d866c 100644 --- a/product_pricelist_multiwebsite_support/__manifest__.py +++ b/product_pricelist_multiwebsite_support/__manifest__.py @@ -5,7 +5,7 @@ 'name': 'Adjust _website_price method to support multi-website', 'version': '10.0.1.0.0', 'author': 'Quartile Limited', - 'website': 'https://www.odoo-asia.com', + 'website': 'https://www.quartile.co', 'category': 'Website', 'license': "AGPL-3", 'description': """ diff --git a/product_pricelist_multiwebsite_support/models/product_hook_website_price.py b/product_pricelist_multiwebsite_support/models/product_hook_website_price.py index 2cef0a63..d6a1e71c 100644 --- a/product_pricelist_multiwebsite_support/models/product_hook_website_price.py +++ b/product_pricelist_multiwebsite_support/models/product_hook_website_price.py @@ -3,10 +3,11 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo.http import request -from odoo import models, fields, api +from odoo import models from odoo.tools import float_is_zero from odoo.addons.website_sale.models.product import Product + # Monkey Patching # Overwrite the original _website_price in wabsite_sale # i.e. https://github.com/odoo/odoo/blob/10.0/addons/website_sale/models @@ -30,14 +31,33 @@ def _website_price(self): context = dict(self._context, pricelist=pricelist.id, partner=partner) self2 = self.with_context(context) if self._context != context else self - ret = self.env.user.has_group('sale.group_show_price_subtotal') and 'total_excluded' or 'total_included' + group_price_subtotal = self.env.user.has_group('sale.group_show_price_subtotal') + ret = group_price_subtotal and 'total_excluded' or 'total_included' for p, p2 in zip(self, self2): - taxes = partner.property_account_position_id.map_tax(p.taxes_id.sudo().filtered(lambda x: x.company_id == company_id)) - p.website_price = taxes.compute_all(p2.price, pricelist.currency_id, quantity=qty, product=p2, partner=partner)[ret] - price_without_pricelist = taxes.compute_all(p.list_price, pricelist.currency_id)[ret] - p.website_price_difference = False if float_is_zero(price_without_pricelist - p.website_price, precision_rounding=pricelist.currency_id.rounding) else True - p.website_public_price = taxes.compute_all(p2.lst_price, quantity=qty, product=p2, partner=partner)[ret] + taxes = partner.property_account_position_id.map_tax( + p.taxes_id.sudo().filtered(lambda x: x.company_id == company_id) + ) + p.website_price = taxes.compute_all( + p2.price, + pricelist.currency_id, + quantity=qty, product=p2, + partner=partner + )[ret] + price_without_pricelist = taxes.compute_all( + p.list_price, + pricelist.currency_id + )[ret] + p.website_price_difference = False if float_is_zero( + price_without_pricelist - p.website_price, + precision_rounding=pricelist.currency_id.rounding + ) else True + p.website_public_price = taxes.compute_all( + p2.lst_price, + quantity=qty, + product=p2, + partner=partner + )[ret] class ProductHookWebsitePrice(models.AbstractModel): diff --git a/product_procurement_plan/__manifest__.py b/product_procurement_plan/__manifest__.py index ce7fb612..0c44ea89 100644 --- a/product_procurement_plan/__manifest__.py +++ b/product_procurement_plan/__manifest__.py @@ -6,6 +6,7 @@ 'version': '10.0.1.2.0', 'category': 'Product', "author": "Quartile Limited", + 'website': "https://www.quartile.co", "license": "AGPL-3", "depends": [ "purchase", diff --git a/product_procurement_plan/models/product_product.py b/product_procurement_plan/models/product_product.py index 99183198..000a49a0 100644 --- a/product_procurement_plan/models/product_product.py +++ b/product_procurement_plan/models/product_product.py @@ -71,4 +71,4 @@ def _compute_proc_lt_adj(self): def _compute_qty_variance(self): for product in self: product.qty_suggested = product.avg_qty_adj * product.proc_lt_adj - product.qty_variance = product.qty_available + product.incoming_qty - product.qty_suggested + product.qty_variance = product.qty_available + product.incoming_qty - product.qty_suggested # noqa: E501 diff --git a/product_procurement_plan/models/stock_config_settings.py b/product_procurement_plan/models/stock_config_settings.py index b7c7a957..ede08a28 100644 --- a/product_procurement_plan/models/stock_config_settings.py +++ b/product_procurement_plan/models/stock_config_settings.py @@ -7,7 +7,7 @@ class StockConfigSettings(models.TransientModel): _inherit = "stock.config.settings" - + procurement_calc_months = fields.Integer( related='company_id.procurement_calc_months', string="No. of Months for Procurement Calc.", diff --git a/product_procurement_plan/wizard/product_procurement.py b/product_procurement_plan/wizard/product_procurement.py index 34ca39ce..4a701324 100644 --- a/product_procurement_plan/wizard/product_procurement.py +++ b/product_procurement_plan/wizard/product_procurement.py @@ -66,7 +66,10 @@ def _get_sorted_parent_products(self, products): bom_line_products = [product for product in bom_line_products] # Add lower-level products in the stack according to the BOM structure. for product in bom_line_products: - bom_lines = self.env["mrp.bom.line"].search([("product_id", "=", product.id)]) + bom_lines = self.env["mrp.bom.line"].search([ + ("product_id", "=", product.id) + ] + ) if not bom_lines and product not in sorted_parent_products: sorted_parent_products += product for bom_line in bom_lines: @@ -118,7 +121,7 @@ def _update_qty_dict(self, qty_dict, sorted_parent_products, adjust=False): Note that qty_dict gets updated with new elements as the loop proceeds """ for prod in sorted_parent_products: - if not prod.id in qty_dict: + if prod.id not in qty_dict: continue bom = self.env["mrp.bom"]._bom_find(product=prod) for line in bom.bom_line_ids: @@ -198,7 +201,7 @@ def _get_leadtime_data(self, sorted_products): produce_products += product bom = self.env["mrp.bom"]._bom_find(product=product) for line in bom.bom_line_ids: - if not line.product_id in sorted_products: + if line.product_id not in sorted_products: sorted_products.append(line.product_id) return buy_prod_dict, produce_products @@ -230,7 +233,9 @@ def _update_lt_info_from_moves(self, moves, lt_accum, num_recs): def _update_lt_info_from_invoice_lines(self, invoice_lines, lt_accum, num_recs): for line in invoice_lines: date_invoice = datetime.strptime(line.invoice_id.date_invoice, DATE_FORMAT) - order_date = datetime.strptime(line.purchase_line_id.order_id.date_order, DATETIME_FORMAT) + order_date = datetime.strptime( + line.purchase_line_id.order_id.date_order, DATETIME_FORMAT + ) lt_accum += (date_invoice - order_date).days num_recs += 1 return lt_accum, num_recs @@ -247,7 +252,8 @@ def _update_buy_prod_procure_lt(self, buy_prod_dict, from_date): if product.type == "service": invoice_lines = self.env["account.invoice.line"].search( [("product_id", "=", product.id), ("purchase_line_id", "!=", False)] - ).filtered(lambda x: x.invoice_id.state in ("open", "paid") and x.invoice_id.date_invoice >= from_date) + ).filtered(lambda x: x.invoice_id.state in ("open", "paid") + and x.invoice_id.date_invoice >= from_date) lt_accum, num_recs = self._update_lt_info_from_invoice_lines( invoice_lines, lt_accum, num_recs ) diff --git a/product_type_default/__manifest__.py b/product_type_default/__manifest__.py index 685cfa9f..8a1ad13e 100644 --- a/product_type_default/__manifest__.py +++ b/product_type_default/__manifest__.py @@ -3,14 +3,14 @@ # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). { 'name': 'Product Type Default', - 'summary':"""""", + 'summary': """""", 'version': '10.0.1.0.0', 'category': 'Sales', 'description': """ * Propose product type from product category """, - 'author': 'Rooms For (Hong Kong) Limited T/A OSCG', - 'website': 'https://www.odoo-asia.com', + 'author': 'Quartile Limited', + 'website': 'https://www.quartile.co', 'license': 'LGPL-3', 'depends': [ 'product', diff --git a/product_type_default/models/product_category.py b/product_type_default/models/product_category.py index fd108271..24dcac3d 100644 --- a/product_type_default/models/product_category.py +++ b/product_type_default/models/product_category.py @@ -2,7 +2,7 @@ # Copyright 2017 Rooms For (Hong Kong) Limited T/A OSCG # License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). -from odoo import models, fields, _ +from odoo import models, fields class ProductCategory(models.Model): diff --git a/product_type_default/models/product_template.py b/product_type_default/models/product_template.py index f40f4352..9830f3b9 100644 --- a/product_type_default/models/product_template.py +++ b/product_type_default/models/product_template.py @@ -8,7 +8,6 @@ class ProductTemplate(models.Model): _inherit = "product.template" - @api.onchange('categ_id') def onchange_categ_id(self): if self.categ_id: diff --git a/product_view_adj/__manifest__.py b/product_view_adj/__manifest__.py index 3b711043..222a552a 100755 --- a/product_view_adj/__manifest__.py +++ b/product_view_adj/__manifest__.py @@ -8,7 +8,7 @@ 'summary': '', 'author': 'Quartile Limited', 'license': 'AGPL-3', - 'website': 'https://www.odoo-asia.com', + 'website': 'https://www.quartile.co', 'depends': [ 'product_configurator', ], diff --git a/purchase_order_price_unchange/__manifest__.py b/purchase_order_price_unchange/__manifest__.py index 9edf958e..e9358081 100644 --- a/purchase_order_price_unchange/__manifest__.py +++ b/purchase_order_price_unchange/__manifest__.py @@ -5,7 +5,7 @@ "name": "Purchase Order Price Unchange", "version": "10.0.1.0.0", "category": "Sales", - "website": "https://www.quartile.co/", + "website": "https://www.quartile.co", "author": "Quartile Limited", "license": "AGPL-3", "installable": True, diff --git a/purchase_received_qty_adj/__manifest__.py b/purchase_received_qty_adj/__manifest__.py index 130f5d0d..9ff9ced7 100644 --- a/purchase_received_qty_adj/__manifest__.py +++ b/purchase_received_qty_adj/__manifest__.py @@ -1,13 +1,13 @@ # -*- coding: utf-8 -*- # Copyright 2017 Quartile Limited -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'Showing actual received quantity of Purchase Order', 'version': '10.0.1.0.0', 'author': 'Quartile Limited', - 'website': 'https://www.odoo-asia.com', + 'website': 'https://www.quartile.co', 'category': 'Purchase', - 'license': "LGPL-3", + 'license': "AGPL-3", 'description': """ - Add new field qty_received_net - Computes the actual quantity received that excluding the quantity in @@ -15,8 +15,8 @@ - Add transfer reference to stock move tree view """, 'depends': [ - 'purchase', 'purchase_stock_picking_return_invoicing', + 'purchase_open_qty', ], 'data': [ 'views/purchase_order_view.xml', diff --git a/purchase_received_qty_adj/models/purchase_order_line.py b/purchase_received_qty_adj/models/purchase_order_line.py index 7c6a2e19..99bb4734 100644 --- a/purchase_received_qty_adj/models/purchase_order_line.py +++ b/purchase_received_qty_adj/models/purchase_order_line.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- # Copyright 2017 Quartile Limited -# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl). +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import models, fields, api import odoo.addons.decimal_precision as dp @@ -23,4 +23,4 @@ class PurchaseOrderLine(models.Model): @api.depends('qty_received', 'qty_returned') def _compute_qty_received_adj(self): for line in self: - line.qty_received_net = line.qty_received - line.qty_returned + line.qty_received_net = line.qty_received - line.qty_returned diff --git a/purchase_received_qty_adj/views/purchase_order_view.xml b/purchase_received_qty_adj/views/purchase_order_view.xml index 310d4f39..24a58f7b 100644 --- a/purchase_received_qty_adj/views/purchase_order_view.xml +++ b/purchase_received_qty_adj/views/purchase_order_view.xml @@ -3,10 +3,10 @@ purchase.order.form purchase.order - + + position="attributes"> True - + Auto Update Customer Pricelist