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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ exclude: |
^shopinvader_search_engine/|
^shopinvader_search_engine_assortment/|
^shopinvader_search_engine_image/|
^shopinvader_search_engine_product_brand/|
^shopinvader_search_engine_product_brand_image/|
^shopinvader_search_engine_product_media/|
^shopinvader_search_engine_product_multi_price/|
Expand Down
Empty file removed requirements.txt
Empty file.
29 changes: 15 additions & 14 deletions shopinvader_search_engine_product_brand/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@ Shopinvader Search Engine Product Brand
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-shopinvader%2Fodoo--shopinvader-lightgray.png?logo=github
:target: https://github.com/shopinvader/odoo-shopinvader/tree/16.0/shopinvader_search_engine_product_brand
:alt: shopinvader/odoo-shopinvader
.. |badge3| image:: https://img.shields.io/badge/github-shopinvader%2Fodoo--shopinvader--search--engine-lightgray.png?logo=github
:target: https://github.com/shopinvader/odoo-shopinvader-search-engine/tree/18.0/shopinvader_search_engine_product_brand
:alt: shopinvader/odoo-shopinvader-search-engine

|badge1| |badge2| |badge3|

This module makes your *product.brand* model exportable to a search engine. It
defines an register a specific serializer for this model to be used when configuring
your indexes into odoo. This serializer is based on a Pydantic model defined
by the *shopinvader_product_brand* module.
This module makes your *product.brand* model exportable to a search
engine. It defines an register a specific serializer for this model to
be used when configuring your indexes into odoo. This serializer is
based on a Pydantic model defined by the *shopinvader_product_brand*
module.

.. IMPORTANT::
This is an alpha version, the data model and design can change at any time without warning.
Expand All @@ -40,29 +41,29 @@ by the *shopinvader_product_brand* module.
Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/shopinvader/odoo-shopinvader/issues>`_.
Bugs are tracked on `GitHub Issues <https://github.com/shopinvader/odoo-shopinvader-search-engine/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/shopinvader/odoo-shopinvader/issues/new?body=module:%20shopinvader_search_engine_product_brand%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
`feedback <https://github.com/shopinvader/odoo-shopinvader-search-engine/issues/new?body=module:%20shopinvader_search_engine_product_brand%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
~~~~~~~
-------

* ACSONE SA/NV

Contributors
~~~~~~~~~~~~
------------

* Marie Lejeune <marie.lejeune@acsone.eu>
- Marie Lejeune <marie.lejeune@acsone.eu>

Maintainers
~~~~~~~~~~~
-----------

This module is part of the `shopinvader/odoo-shopinvader <https://github.com/shopinvader/odoo-shopinvader/tree/16.0/shopinvader_search_engine_product_brand>`_ project on GitHub.
This module is part of the `shopinvader/odoo-shopinvader-search-engine <https://github.com/shopinvader/odoo-shopinvader-search-engine/tree/18.0/shopinvader_search_engine_product_brand>`_ project on GitHub.

You are welcome to contribute.
6 changes: 2 additions & 4 deletions shopinvader_search_engine_product_brand/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,20 @@
# @author Marie LEJEUNE <marie.lejeune@acsone.eu>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).


{
"name": "Shopinvader Search Engine Product Brand",
"summary": "Shopinvader Search Engine Product Brand",
"version": "16.0.1.0.1",
"version": "18.0.1.0.0",
"category": "Shopinvader",
"website": "https://github.com/shopinvader/odoo-shopinvader-search-engine",
"author": " ACSONE SA/NV",
"license": "AGPL-3",
"application": False,
"installable": False,
"installable": True,
"depends": [
"shopinvader_product_brand",
"shopinvader_search_engine",
],
"data": [],
"demo": [],
"development_status": "Alpha",
}
6 changes: 4 additions & 2 deletions shopinvader_search_engine_product_brand/models/se_index.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright 2023 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo import api, fields, models
from odoo.exceptions import ValidationError

from ..tools.brand_serializer import ProductBrandShopinvaderSerializer
Expand Down Expand Up @@ -28,7 +28,9 @@ def _check_model(self):
se_index.serializer_type == "shopinvader_brand_exports"
and se_index.model_id != brand_model
):
raise ValidationError(_("'Serializer Type' must match 'Model'"))
raise ValidationError(
self.env._("'Serializer Type' must match 'Model'")
)

def _get_serializer(self):
self.ensure_one()
Expand Down
3 changes: 3 additions & 0 deletions shopinvader_search_engine_product_brand/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Marie Lejeune \<marie.lejeune@acsone.eu\>

This file was deleted.

5 changes: 5 additions & 0 deletions shopinvader_search_engine_product_brand/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
This module makes your *product.brand* model exportable to a search
engine. It defines an register a specific serializer for this model to
be used when configuring your indexes into odoo. This serializer is
based on a Pydantic model defined by the *shopinvader_product_brand*
module.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
Expand All @@ -9,10 +8,11 @@

/*
:Author: David Goodger (goodger@python.org)
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -275,7 +275,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: grey; } /* line numbers */
pre.code .ln { color: gray; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -301,7 +301,7 @@
span.pre {
white-space: pre }

span.problematic {
span.problematic, pre.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -369,11 +369,12 @@ <h1 class="title">Shopinvader Search Engine Product Brand</h1>
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:05a360fa699673ac8c07d357ae6d1d9bda733e7ac4a64d71935a5a18f349e4c6
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/shopinvader/odoo-shopinvader/tree/16.0/shopinvader_search_engine_product_brand"><img alt="shopinvader/odoo-shopinvader" src="https://img.shields.io/badge/github-shopinvader%2Fodoo--shopinvader-lightgray.png?logo=github" /></a></p>
<p>This module makes your <em>product.brand</em> model exportable to a search engine. It
defines an register a specific serializer for this model to be used when configuring
your indexes into odoo. This serializer is based on a Pydantic model defined
by the <em>shopinvader_product_brand</em> module.</p>
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Alpha" src="https://img.shields.io/badge/maturity-Alpha-red.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/shopinvader/odoo-shopinvader-search-engine/tree/18.0/shopinvader_search_engine_product_brand"><img alt="shopinvader/odoo-shopinvader-search-engine" src="https://img.shields.io/badge/github-shopinvader%2Fodoo--shopinvader--search--engine-lightgray.png?logo=github" /></a></p>
<p>This module makes your <em>product.brand</em> model exportable to a search
engine. It defines an register a specific serializer for this model to
be used when configuring your indexes into odoo. This serializer is
based on a Pydantic model defined by the <em>shopinvader_product_brand</em>
module.</p>
<div class="admonition important">
<p class="first admonition-title">Important</p>
<p class="last">This is an alpha version, the data model and design can change at any time without warning.
Expand All @@ -394,10 +395,10 @@ <h1 class="title">Shopinvader Search Engine Product Brand</h1>
</div>
<div class="section" id="bug-tracker">
<h1><a class="toc-backref" href="#toc-entry-1">Bug Tracker</a></h1>
<p>Bugs are tracked on <a class="reference external" href="https://github.com/shopinvader/odoo-shopinvader/issues">GitHub Issues</a>.
<p>Bugs are tracked on <a class="reference external" href="https://github.com/shopinvader/odoo-shopinvader-search-engine/issues">GitHub Issues</a>.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
<a class="reference external" href="https://github.com/shopinvader/odoo-shopinvader/issues/new?body=module:%20shopinvader_search_engine_product_brand%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<a class="reference external" href="https://github.com/shopinvader/odoo-shopinvader-search-engine/issues/new?body=module:%20shopinvader_search_engine_product_brand%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
<p>Do not contact contributors directly about support or help with technical issues.</p>
</div>
<div class="section" id="credits">
Expand All @@ -416,7 +417,7 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
<p>This module is part of the <a class="reference external" href="https://github.com/shopinvader/odoo-shopinvader/tree/16.0/shopinvader_search_engine_product_brand">shopinvader/odoo-shopinvader</a> project on GitHub.</p>
<p>This module is part of the <a class="reference external" href="https://github.com/shopinvader/odoo-shopinvader-search-engine/tree/18.0/shopinvader_search_engine_product_brand">shopinvader/odoo-shopinvader-search-engine</a> project on GitHub.</p>
<p>You are welcome to contribute.</p>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@


class TestBrandBinding(TestBindingIndexBase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.brand = cls.env["product.brand"].create({"name": "Test Brand"})
def setup_records(self, backend=None):
rv = super().setup_records(backend=backend)
self.brand = self.env["product.brand"].create({"name": "Test Brand"})
# create index for brand
cls.brand_index = cls.env["se.index"].create(
self.brand_index = self.env["se.index"].create(
{
"name": "brand",
"backend_id": cls.backend.id,
"model_id": cls.env.ref("product_brand.model_product_brand").id,
"backend_id": self.backend.id,
"model_id": self.env.ref("product_brand.model_product_brand").id,
"serializer_type": "shopinvader_brand_exports",
}
)
cls.brand_binding = cls.brand._add_to_index(cls.brand_index)
self.brand_binding = self.brand._add_to_index(self.brand_index)
return rv

def test_product_brand(self):
brand = self.brand_binding._contextualize(self.brand_binding)
Expand Down
9 changes: 9 additions & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
odoo-test-helper
vcrpy-unittest

odoo-addon-product_category_name_translatable @ git+https://github.com/OCA/product-attribute@refs/pull/2130/head#subdirectory=product_category_name_translatable
odoo-addon-shopinvader_product @ git+https://github.com/shopinvader/odoo-shopinvader-catalog@refs/pull/2/head#subdirectory=shopinvader_product
odoo-addon-shopinvader_product_seo @ git+https://github.com/shopinvader/odoo-shopinvader-catalog@refs/pull/5/head#subdirectory=shopinvader_product_seo

odoo-addon-shopinvader_search_engine @ git+https://github.com/shopinvader/odoo-shopinvader-search-engine@refs/pull/2/head#subdirectory=shopinvader_search_engine

odoo-addon-shopinvader_base_url @ git+https://github.com/shopinvader/odoo-shopinvader-catalog@refs/pull/1/head#subdirectory=shopinvader_base_url
odoo-addon-shopinvader_product_brand @ git+https://github.com/shopinvader/odoo-shopinvader-catalog@refs/pull/6/head#subdirectory=shopinvader_product_brand
Loading