Skip to content

Commit

Permalink
[MIG] website_sale_barcode_search: Migration to 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sbiosca-s73 committed Sep 26, 2024
1 parent 598de62 commit 3e9306a
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 24 deletions.
2 changes: 1 addition & 1 deletion website_sale_barcode_search/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from . import controllers
from . import models
2 changes: 1 addition & 1 deletion website_sale_barcode_search/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "Website Sale Barcode Search",
"category": "E-Commerce",
"summary": "It improve website product search adding search by barcode",
"version": "14.0.1.0.0",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"depends": ["website_sale"],
"author": "Studio73, Odoo Community Association (OCA)",
Expand Down
1 change: 0 additions & 1 deletion website_sale_barcode_search/controllers/__init__.py

This file was deleted.

21 changes: 0 additions & 21 deletions website_sale_barcode_search/controllers/website_sale.py

This file was deleted.

1 change: 1 addition & 0 deletions website_sale_barcode_search/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import product_template
16 changes: 16 additions & 0 deletions website_sale_barcode_search/models/product_template.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2022 Studio73 - Miguel Gandia
# Copyright 2024 Studio73 - Sergi Biosca
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).


from odoo import api, models


class ProductTemplate(models.Model):
_inherit = "product.template"

@api.model
def _search_get_detail(self, website, order, options):
res = super()._search_get_detail(website, order, options)
res["search_fields"].append("barcode")
return res

0 comments on commit 3e9306a

Please sign in to comment.