-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7305226
commit 33ef756
Showing
325 changed files
with
956 additions
and
245 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: [] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ __pycache__/ | |
*.py[cod] | ||
/.venv | ||
/.pytest_cache | ||
/.ruff_cache | ||
|
||
# C extensions | ||
*.so | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
fix_product_attribute_line_name_search/models/product_attribute_line_hook_name_search.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.