Skip to content

Commit

Permalink
3860-upd-dotfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
liuhehe1995 committed Dec 1, 2023
1 parent 7305226 commit 33ef756
Show file tree
Hide file tree
Showing 325 changed files with 956 additions and 245 deletions.
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.19.2
_src_path: https://github.com/OCA/oca-addons-repo-template.git
ci: GitHub
dependency_installation_mode: PIP
convert_readme_fragments_to_markdown: true
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_slug: qrtl
rebel_module_groups: []
repo_description: PCI Custom
repo_name: null
repo_description: ''
repo_name: PCI Custom
repo_slug: pci-custom
repo_website: https://www.quartile.co
travis_apt_packages: []
travis_apt_sources: []

11 changes: 10 additions & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
# runs-on: ubuntu-latest
# name: Detect unreleased dependencies
# steps:
# - uses: actions/checkout@v2
# - uses: actions/checkout@v3
# - run: |
# for reqfile in requirements.txt test-requirements.txt ; do
# if [ -f ${reqfile} ] ; then
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' }}
1 change: 1 addition & 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 Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.8
repos:
- repo: https://github.com/oca/maintainer-tools
rev: ab1d7f6
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@

<!-- /!\ do not modify above this line -->

# None
# PCI Custom


PCI Custom

<!-- /!\ do not modify below this line -->

Expand Down
2 changes: 1 addition & 1 deletion abstract_report_xlsx/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
11 changes: 6 additions & 5 deletions account_analytic_default_product_category/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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': 'Rooms For (Hong Kong) Limited T/A OSCG,Quartile Limited',
'website': 'https://www.quartile.co',
'license': 'LGPL-3',
'depends': [
'account',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion account_bank_statement_adj/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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': """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion account_invoice_line_view/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion account_invoice_line_view/models/account_invoice_line.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ class AccountInoviceLine(models.Model):
string='Customer',
store=True
)


@api.multi
@api.depends('invoice_id.name', 'invoice_id.reference')
Expand Down
3 changes: 1 addition & 2 deletions account_payment_cancel_adj/models/account_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion account_view_adjust/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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': """
Expand Down
2 changes: 1 addition & 1 deletion account_view_adjust/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Quartile Limited
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo.osv import expression
from odoo import models, api
from odoo.addons.product.models.product_attribute import ProductAttributeLine


# """
# Odoo's original method completely overrides `args` which disables whatever
# domain passed to this method, and therefore is not desiable.
# We will fix it by extending args instead of overriding it.
# Ref: https://github.com/odoo/odoo/pull/26133
# """
@api.model
def name_search(self, name='', args=None, operator='ilike', limit=100):
# TDE FIXME: currently overriding the domain; however as it includes a
# search on a m2o and one on a m2m, probably this will quickly become
# difficult to compute - check if performance optimization is required
if name and operator in ('=', 'ilike', '=ilike', 'like', '=like'):
# Correctly indented comment block
# args = ['|', ('attribute_id', operator, name),
# ('value_ids', operator, name)]
# QTL del
args = args or [] # QTL add
domain = [
'|',
('attribute_id', operator, name),
('value_ids', operator, name)
] # QTL add
search_result = self.search(expression.AND([domain, args]), limit=limit)
return search_result.name_get() # QTL add
return super(ProductAttributeLine, self).name_search(
name=name, args=args, operator=operator, limit=limit
)


class ProductAttributeLineHookNameSearch(models.AbstractModel):
_name = "product.attribute.line.hook.name.search"
_description = "Provide hook point for name_search method"

def _register_hook(self):
ProductAttributeLine.name_search = name_search
return super(ProductAttributeLineHookNameSearch, self).\
_register_hook()
2 changes: 1 addition & 1 deletion mail_force_email/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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': """
Expand Down
23 changes: 17 additions & 6 deletions mail_force_email/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,33 @@ 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)
self.sudo().search(domain)._notify_by_email(
message, force_send=force_send,
send_after_commit=send_after_commit,
user_signature=user_signature
)
# adjust end (QTL)
self._notify_by_chat(message)
return True
2 changes: 1 addition & 1 deletion mrp_block_inventory_post/models/mrp_production.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ 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."
Expand Down
20 changes: 20 additions & 0 deletions mrp_bom_component_menu/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Copyright 2017 Eficent Business and IT Consulting Services, S.L.
# (<http://www.eficent.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "MRP BOM Component Menu",
"version": "10.0.1.0.0",
"category": "Manufacturing",
"website": "https://www.quartile.co",
"author": "Eficent,Quartile Limited,"
"Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,
"depends": [
"mrp",
],
"data": [
"views/mrp_bom_component_view.xml",
],
}
2 changes: 1 addition & 1 deletion mrp_change_source_location/models/mrp_production.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion mrp_default_location/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions mrp_specsheet_py3o/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
'version': '10.0.1.0.1',
'category': 'Manufacturing',
'license': 'AGPL-3',
'website': 'https://www.quartile.co',
'summary': 'py3o spec sheet report',
'description': """
Spec Sheet Report Py3o
Expand Down
Loading

0 comments on commit 33ef756

Please sign in to comment.