size int64 0 304k | ext stringclasses 1
value | lang stringclasses 1
value | branch stringclasses 1
value | content stringlengths 0 304k | avg_line_length float64 0 238 | max_line_length int64 0 304k |
|---|---|---|---|---|---|---|
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
457 | py | PYTHON | 15.0 | # Copyright 2023 Quartile Limited
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Website Sales Wishlist Archive Cron",
"version": "15.0.1.0.0",
"author": "Quartile Limited, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/e-commerce",
"category": "Web... | 35.153846 | 457 |
504 | py | PYTHON | 15.0 | # Copyright 2023 Quartile Limited
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class ProductWishlist(models.Model):
_inherit = "product.wishlist"
@api.model
def _process_wishlist_archive(self):
wishlist_records = self.search([("active", "=", True)]... | 31.5 | 504 |
816 | py | PYTHON | 15.0 | # Copyright 2018 Simone Rubino - Agile Business Group
# Copyright 2020 Tecnativa - João Marques
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website sale order type",
"summary": "This module allows sale_order_type to work with website_sale.",
"version": "15.0.1.0.0",
"deve... | 38.809524 | 815 |
2,016 | py | PYTHON | 15.0 | # Copyright 2018 Simone Rubino - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests import HttpCase
class TestFrontend(HttpCase):
def setUp(self):
super(TestFrontend, self).setUp()
self.sale_type_model = self.env["sale.order.type"]
se... | 39.529412 | 2,016 |
938 | py | PYTHON | 15.0 | # Copyright 2018 Simone Rubino - Agile Business Group
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class SaleOrder(models.Model):
_inherit = "sale.order"
_description = "Allowing sale_order_type to work with website_sale."
def _cart_update(
self,
... | 26.8 | 938 |
665 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Invoice Address",
"summary": "Set e-Commerce sale orders invoice address as in backend",
"version": "15.0.1.0.0",
"category": "Website",
"website": "https://github.com/OC... | 35 | 665 |
1,179 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests import common, tagged
@tagged("post_install", "-at_install")
class WebsiteSaleHttpCase(common.HttpCase):
def setUp(self):
super().setUp()
self.partner_company = self.env["res.p... | 39.3 | 1,179 |
902 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class SaleOrder(models.Model):
_inherit = "sale.order"
def write(self, vals):
"""Catch the context from the website write so we ensure the correct
invoice partner ... | 45.1 | 902 |
1,259 | py | PYTHON | 15.0 | # Copyright 2020 David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class Website(models.Model):
_inherit = "website"
def sale_get_order(
self,
force_create=False,
code=None,
update_pricelist=False,
force_pricelist=Fals... | 37.029412 | 1,259 |
708 | py | PYTHON | 15.0 | # © 2020 Solvos Consultoría Informática (<http://www.solvos.es>)
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Website Sale Product Description",
"category": "Website",
"summary": "Shows custom e-Commerce description for products",
"version": "15.0.1.1.0",
"website": "h... | 33.571429 | 705 |
459 | py | PYTHON | 15.0 | # © 2020 Solvos Consultoría Informática (<http://www.solvos.es>)
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import fields, models
from odoo.tools.translate import html_translate
class ProductTemplate(models.Model):
_inherit = "product.template"
public_description = fields.Htm... | 28.5 | 456 |
965 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Attribute Filter Category",
"summary": "Allow group attributes in shop by categories",
"version": "15.0.2.1.0",
"development_status": "Production/Stable",
"category": "... | 35.740741 | 965 |
426 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Pilar Vargas
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade
@openupgrade.migrate()
def migrate(env, version):
openupgrade.logged_query(
env.cr,
"""
DELETE FROM ir_ui_view
WHERE key =
'website_sale_product... | 26.625 | 426 |
2,793 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests import tagged
from odoo.tests.common import HttpCase
@tagged("post_install", "-at_install")
class WebsiteSaleAttributeFilterCategoryHttpCase(HttpCase):
def setUp(self):
super().setUp... | 37.743243 | 2,793 |
331 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductAttributeCategory(models.Model):
_inherit = "product.attribute.category"
website_folded = fields.Boolean(
string="Website folded",
default=T... | 27.583333 | 331 |
1,292 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, http
from odoo.addons.website_sale.controllers.main import WebsiteSale
class ProductAttributeCategory(WebsiteSale):
@http.route()
def shop(self, page=0, category=None, search="", pp... | 44.551724 | 1,292 |
976 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Stock Provisioning Date",
"summary": "Display provisioning date for a product in shop online",
"version": "15.0.1.0.0",
"development_status": "Production/Stable",
"cat... | 37.538462 | 976 |
1,862 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from datetime import datetime, timedelta
from odoo.tests.common import Form, HttpCase
class WebsiteSaleStockProvisioningDate(HttpCase):
def setUp(self):
super().setUp()
product = self.env[... | 34.481481 | 1,862 |
2,026 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
from odoo.tools.misc import format_date
class ProductTemplate(models.Model):
_inherit = "product.template"
show_next_provisioning_date = fields.Boolean(
help="S... | 36.836364 | 2,026 |
738 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductProduct(models.Model):
_inherit = "product.product"
def _get_next_provisioning_date(self, company):
domain = [
("company_id", "=", comp... | 38.842105 | 738 |
630 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Product Sort",
"summary": "Allow to define default sort criteria for e-commerce",
"version": "15.0.1.0.0",
"development_status": "Production/Stable",
"category": "Website... | 39.375 | 630 |
395 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
product_sort_criteria = fields.Selection(
related="website_id.default_product_sort... | 30.384615 | 395 |
888 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
class Website(models.Model):
_inherit = "website"
@api.model
def _get_product_sort_criterias(self):
"""Extend to add more sort criterias"""
ret... | 34.153846 | 888 |
1,012 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# Copyright 2021 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.http import request, route
from odoo.addons.website_sale.controllers.main import WebsiteSale
class WebsiteSale(WebsiteSale):
def _get_search_order(self, ... | 38.923077 | 1,012 |
996 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Product Detail Attribute Image",
"summary": "Display attributes images in shop product detail",
"version": "15.0.1.0.0",
"development_status": "Production/Stable",
"cat... | 35.571429 | 996 |
3,962 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import HttpCase
class WebsiteSaleHttpCase(HttpCase):
def setUp(self):
super().setUp()
self.ProductAttribute = self.env["product.attribute"]
self.ProductAttribu... | 40.020202 | 3,962 |
786 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductAttribute(models.Model):
_inherit = "product.attribute"
website_product_detail_image = fields.Binary(
string="Website detail image",
attachm... | 32.75 | 786 |
657 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import http
from odoo.addons.website_sale.controllers.main import WebsiteSale
class WebsiteSaleProductDetailAttributeImage(WebsiteSale):
@http.route()
def product(self, product, category="", ... | 41.0625 | 657 |
677 | py | PYTHON | 15.0 | # Copyright 2017 LasLabs Inc. <https://laslabs.com/>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
"name": "Website Sale - Hide Empty Categories",
"summary": "Hide any Product Categories that are empty",
"version": "15.0.1.0.0",
"category": "Website",
"website": "https://git... | 37.611111 | 677 |
1,132 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import HttpCase
class UICase(HttpCase):
def setUp(self):
super().setUp()
category_posted = self.env["product.public.category"].create(
{"name": "Category Test Posted"}
)
self.env["p... | 32.342857 | 1,132 |
730 | py | PYTHON | 15.0 | from odoo.tests import common
class TestPublicCategory(common.TransactionCase):
def test_has_product_recursive(self):
category_1 = self.env["product.public.category"].create({"name": "Category 1"})
self.assertFalse(category_1.has_product_recursive)
category_2 = self.env["product.public.... | 33.181818 | 730 |
754 | py | PYTHON | 15.0 | # Copyright 2017 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import api, fields, models
class ProductPublicCategory(models.Model):
_inherit = "product.public.category"
has_product_recursive = fields.Boolean(
string="This category or one of its children... | 34.272727 | 754 |
927 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Tax Toggle",
"summary": "Allow display price in Shop with or without taxes",
"version": "15.0.1.0.0",
"development_status": "Beta",
"category": "Website",
"website"... | 37.08 | 927 |
1,729 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import HttpCase
class WebsiteSaleTaxesToggleHttpCase(HttpCase):
def setUp(self):
super().setUp()
# Get company for Mitchel Admin user
self.user_admin = self.en... | 36.020833 | 1,729 |
1,265 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
from odoo.http import request
from odoo.tools import ormcache
class ResUsers(models.Model):
_inherit = "res.users"
@api.model
def has_group(self, group_ext_id):
... | 36.142857 | 1,265 |
586 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import http
from odoo.http import request
from odoo.addons.website_sale.controllers.main import WebsiteSale
class WebsiteSaleTaxToggle(WebsiteSale):
@http.route(["/website/tax_toggle"], type="js... | 34.470588 | 586 |
1,008 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Alexandre Díaz
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl).
{
"name": "Website Snippet Product Category",
"category": "Website",
"summary": "Adds a new snippet to show e-commerce categories",
"version": "15.0.1.0.0",
"license": "LGPL-3",
"website"... | 35.964286 | 1,007 |
354 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Alexandre Díaz
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductPublicCategory(models.Model):
_inherit = "product.public.category"
published_in_product_category_snippet = fields.Boolean(
"Published in product cat... | 32.090909 | 353 |
834 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Alexandre Díaz
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import http
from odoo.http import request
from odoo.addons.website.controllers.main import QueryURL
class Website(http.Controller):
@http.route(
["/website_sale/render_product_category"],... | 32.038462 | 833 |
832 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp (http://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Cart Expire",
"summary": "Cancel carts without activity after a configurable time",
"version": "15.0.1.1.0",... | 33.24 | 831 |
538 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA (https://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@camptocamp.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import SUPERUSER_ID, api
def migrate(cr, version):
if not version:
return
env = api.Environment(cr, SUPERU... | 31.588235 | 537 |
5,312 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp (http://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import datetime, timedelta
from freezegun import freeze_time
from odoo import fields
from odoo.tests import TransactionCase
cl... | 47.846847 | 5,311 |
1,802 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp (http://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import timedelta
from odoo import api, fields, models
class SaleOrder(models.Model):
_inherit = "sale.order"
cart_expi... | 38.319149 | 1,801 |
404 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp (http://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
cart_expire_delay = ... | 31 | 403 |
2,113 | py | PYTHON | 15.0 | # Copyright 2021 Camptocamp (http://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from datetime import timedelta
from odoo import _, api, fields, models
from odoo.osv import expression
_logger = logging.getLog... | 34.622951 | 2,112 |
649 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA (https://www.camptocamp.com).
# @author Iván Todorovich <ivan.todorovich@camptocamp.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import http
from odoo.http import request
from odoo.addons.website_sale.controllers.main import WebsiteSale
class Website... | 29.454545 | 648 |
945 | py | PYTHON | 15.0 | # Copyright 2015, 2017, 2021 Tecnativa - Jairo Llopis
# Copyright 2016 Tecnativa - Vicent Cubells
# Copyright 2019 Tecnativa - Cristina Martin R.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Require accepting legal terms to checkout",
"summary": "Force the user to accept legal... | 37.8 | 945 |
2,176 | py | PYTHON | 15.0 | # Copyright 2017 Jairo Llopis <jairo.llopis@tecnativa.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests import new_test_user, tagged
from odoo.tests.common import HttpCase
@tagged("post_install", "-at_install")
class UICase(HttpCase):
"""Test checkout flow with legal terms acce... | 41.056604 | 2,176 |
3,565 | py | PYTHON | 15.0 | # Copyright 2015-2017 Tecnativa - Jairo Llopis
# Copyright 2016 Tecnativa - Vicent Cubells
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, http
from odoo.http import request
from odoo.addons.website_sale.controllers import main
class WebsiteSale(main.WebsiteSale):
def _g... | 40.05618 | 3,565 |
821 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Victor M.M. Torres
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Website Sale Attribute Value Existing",
"summary": "Allow hide attributes values not used in variants",
"version": "15.0.1.0.0",
"development_status": "Production/Stable",
"cate... | 37.318182 | 821 |
3,209 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo.tests.common import HttpCase
class WebsiteSaleHttpCase(HttpCase):
def setUp(self):
super().setUp()
# Models
ProductAttribute = self.env["product.attribute"]
ProductA... | 38.662651 | 3,209 |
1,452 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo import http
from odoo.http import request
from odoo.addons.website_sale.controllers.main import WebsiteSale
class ProductAttributeValues(WebsiteSale):
def _get_search_domain(
self, search,... | 44 | 1,452 |
781 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Pilar Vargas
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Attribute Filter Collapse",
"summary": "Allows the attributes of the categories to be folded",
"version": "15.0.1.1.1",
"category": "Website",
"website": "https://github... | 33.956522 | 781 |
2,526 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Pilar Vargas
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests import new_test_user, tagged
from odoo.tests.common import HttpCase
@tagged("post_install", "-at_install")
class WebsiteSaleProductAttributeFilterCollapseHttpCase(HttpCase):
def setUp(self):
... | 37.147059 | 2,526 |
915 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Carlos Roca
# Copyright 2020 Tecnativa - Sergio Teruel
# Copyright 2020 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Stock List Preview",
"summary": "Show the stock of products on the product previews",
"versi... | 36.6 | 915 |
4,076 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import HttpCase, tagged
@tagged("post_install", "-at_install")
class UICase(HttpCase):
def setUp(self):
super().setUp()
product1 = self.env["product.template"].create(
{
"name": "Te... | 34.542373 | 4,076 |
1,902 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Carlos Roca
# Copyright 2020 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import http
from odoo.http import request
from odoo.addons.sale.controllers.variant import VariantController
class WebsiteSaleVariantController(VariantContro... | 39.625 | 1,902 |
416 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
def post_init_hook(cr, registry):
"""
At installation time, set allow_uom_sell field as true for all products
that have already been created.
"""
cr.execute(
"""
UPDATE produ... | 26 | 416 |
1,251 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Secondary Unit",
"summary": "Allow manage secondary units in website shop",
"version": "15.0.1.1.0",
"development_status": "Beta",
"category": "Website",
"website":... | 37.909091 | 1,251 |
1,686 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import HttpCase
class WebsiteSaleSecondaryUnitHttpCase(HttpCase):
def setUp(self):
super().setUp()
# Models
ProductSecondaryUnit = self.env["product.secondary.... | 35.125 | 1,686 |
5,187 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
from odoo.http import request
from odoo.tools.float_utils import float_round
class SaleOrder(models.Model):
_inherit = "sale.order"
def _cart_find_product_line(self, produc... | 38.708955 | 5,187 |
339 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductSecondaryUnit(models.Model):
_inherit = ["product.secondary.unit", "website.published.mixin"]
_name = "product.secondary.unit"
is_published = fields.Boo... | 33.9 | 339 |
330 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductTemplate(models.Model):
_inherit = "product.template"
allow_uom_sell = fields.Boolean(
string="Allow to sell in unit of measure",
default=Tr... | 27.5 | 330 |
1,929 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Sergio Teruel
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import http
from odoo.http import request
from odoo.addons.website_sale.controllers.main import WebsiteSale
class WebsiteSaleSecondaryUnit(WebsiteSale):
@http.route()
def cart_update(self, pr... | 40.1875 | 1,929 |
578 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Stock Available",
"summary": "Display 'Available to promise' in shop online instead "
"of 'Free To Use Quantity'",
"version": "15.0.1.0.0",
"category": "Website",
... | 32.111111 | 578 |
3,494 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import TransactionCase
class SaleStockAvailableInfoPopup(TransactionCase):
@classmethod
def setUpClass(cls):
super(SaleStockAvailableInfoPopup, cls).setUpClass()
... | 38.395604 | 3,494 |
493 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class SaleOrder(models.Model):
_inherit = "sale.order"
def _cart_update(
self, product_id=None, line_id=None, add_qty=0, set_qty=0, **kwargs
):
order = sel... | 30.8125 | 493 |
724 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class ProductTemplate(models.Model):
_inherit = "product.template"
def _get_combination_info(
self,
combination=False,
product_id=False,
add_qty... | 26.814815 | 724 |
718 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class Product(models.Model):
_inherit = "product.product"
def _compute_quantities_dict(
self, lot_id, owner_id, package_id, from_date=False, to_date=False
):
... | 35.9 | 718 |
573 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.http import request, route
from odoo.addons.website_sale_stock.controllers.main import PaymentPortal
class PaymentPortal(PaymentPortal):
@route()
def shop_payment_transaction(self, *args, **kwar... | 38.2 | 573 |
702 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
{
"name": "Website Sale Wishlist Keep",
"category": "Website",
"summary": 'Allows to add products to my cart but keep it in my wishlist"',
"development_status": "Production/Stable",
"version": "1... | 39 | 702 |
691 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import HttpCase
class TestUi(HttpCase):
def setUp(self):
super().setUp()
self.env["product.template"].create(
{
"name": "Test Product",
... | 32.904762 | 691 |
1,031 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Alexandre D. Díaz
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Website Sale Product Detail Attribute Value Image",
"summary": "Display attributes values images in shop product detail",
"version": "15.0.1.0.0",
"development_status": "Beta",
... | 36.785714 | 1,030 |
3,846 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Alexandre D. Díaz
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import odoo.tests
@odoo.tests.tagged("post_install", "-at_install")
class WebsiteSaleHttpCase(odoo.tests.HttpCase):
def setUp(self):
super().setUp()
self.ProductAttribute = self.env["pro... | 42.722222 | 3,845 |
669 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Alexandre D. Díaz
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductAttributeValue(models.Model):
_inherit = "product.attribute.value"
website_product_detail_image = fields.Binary(
string="Website detail image",
... | 37.111111 | 668 |
475 | py | PYTHON | 15.0 | # Copyright (C) 2020 Alexandre Díaz - Tecnativa S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import SUPERUSER_ID, api
from odoo.tools import config
def post_init_hook(cr, registry):
if config["test_enable"] or config["test_file"]:
env = api.Environment(cr, SUPERUSER_... | 43.090909 | 474 |
740 | py | PYTHON | 15.0 | # Copyright 2015 Antiun Ingeniería, S.L. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Require login to checkout",
"summary": "Force users to login for buying",
"version": "15.0.1.0.1",
"category": "Website",
"website": "https://github.com/OCA/e-comme... | 36.95 | 739 |
613 | py | PYTHON | 15.0 | # Copyright (C) 2020 Alexandre Díaz - Tecnativa S.L.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
import odoo.tests
@odoo.tests.tagged("post_install", "-at_install")
class TestUi(odoo.tests.HttpCase):
def test_01_shop_buy(self):
current_website = self.env["website"].get_current_web... | 47.076923 | 612 |
362 | py | PYTHON | 15.0 | # Copyright 2015 Antiun Ingeniería, S.L. - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import http
from odoo.addons.website_sale.controllers.main import WebsiteSale
class RequireLoginToCheckout(WebsiteSale):
@http.route(auth="user")
def checkout(self, **post):... | 30.083333 | 361 |
1,146 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Carlos Roca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "eCommerce product assortment",
"summary": "Use product assortments to display products available on e-commerce.",
"version": "15.0.1.0.0",
"development_status": "Beta",
"license": "AG... | 42.444444 | 1,146 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.