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 |
|---|---|---|---|---|---|---|
3,245 | py | PYTHON | 15.0 | # Copyright 2019 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestMailOptionalFollowernotifications(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.partner_ob... | 36.460674 | 3,245 |
564 | py | PYTHON | 15.0 | # Copyright 2016 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class MailComposeMessage(models.TransientModel):
_inherit = "mail.compose.message"
notify_followers = fields.Boolean(default=True)
def _action_send_mail(se... | 35.25 | 564 |
1,179 | py | PYTHON | 15.0 | # Copyright 2019 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
from odoo.tools import config
class MailThread(models.AbstractModel):
_inherit = "mail.thread"
def _notify_compute_recipients(self, message, msg_vals):
"""Compu... | 39.3 | 1,179 |
885 | py | PYTHON | 15.0 | # Copyright 2018 David Juaneda - <djuaneda@sdi.es>
# Copyright 2021 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Mail Activity Board",
"summary": "Add Activity Boards",
"version": "15.0.2.0.0",
"development_status": "Beta",
"category": "Social Network",
... | 36.875 | 885 |
7,662 | py | PYTHON | 15.0 | # Copyright 2018 David Juaneda - <djuaneda@sdi.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import TransactionCase
class TestMailActivityBoardMethods(TransactionCase):
def setUp(self):
super(TestMailActivityBoardMethods, self).setUp()
# Set up act... | 36.141509 | 7,662 |
2,884 | py | PYTHON | 15.0 | # Copyright 2018 David Juaneda - <djuaneda@sdi.es>
# Copyright 2018 ForgeFlow S.L. <https://www.forgeflow.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class MailActivity(models.Model):
_inherit = "mail.activity"
res_model_id_name = fields.Cha... | 35.604938 | 2,884 |
1,195 | py | PYTHON | 15.0 | # Copyright 2018 David Juaneda - <djuaneda@sdi.es>
# Copyright 2021 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models
class MailActivityMixin(models.AbstractModel):
_inherit = "mail.activity.mixin"
def redirect_to_activities(self, **kwargs):
"""Redir... | 35.147059 | 1,195 |
565 | py | PYTHON | 15.0 | # Copyright 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "QWeb for email templates",
"version": "15.0.1.0.0",
"author": "Therp BV, Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Marketing",
"summary": "Use th... | 37.666667 | 565 |
994 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import SUPERUSER_ID, api
def migrate(cr, version):
if not version:
return
env = api.Environment(cr, SUPERUSER_ID, {})
body_type = env["ir.model.fields"].search(
[("name", "=", "body_type"), ("model", "=", "mail.tem... | 34.275862 | 994 |
1,125 | py | PYTHON | 15.0 | # Copyright 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import TransactionCase
class TestMailTemplateQweb(TransactionCase):
def test_email_template_qweb(self):
template = self.env.ref("email_template_qweb.email_template_demo1"... | 48.913043 | 1,125 |
2,097 | py | PYTHON | 15.0 | # Copyright 2016 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models, tools
class MailTemplate(models.Model):
_inherit = "mail.template"
body_type = fields.Selection(
[("qweb", "QWeb"), ("qweb_view", "QWeb View")],
"B... | 42.795918 | 2,097 |
688 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2017 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Mass mailing event",
"summary": "Link mass mailing with event for excluding recipients",
"version": "15.0.1.0.0",
"category": "Marketing",
... | 32.761905 | 688 |
5,748 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2017 Tecnativa - David Vidal
# Copyright 2020 Tecnativa - Alexandre D. Díaz
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestMassMailingEventRegistrationExclude(TransactionCase):
at_in... | 40.471831 | 5,747 |
660 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2020 Tecnativa - Alexandre D. Díaz
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
from .mailing import event_filtered_ids
class MassMailingContact(models.Model):
_inherit = "mailing.contact"
@api.model
... | 32.95 | 659 |
1,844 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import copy
from odoo import fields, models
def event_filtered_ids(model, mailing_mailing_id, domain, field="email"):
field = field or "email"
domain = domain or []
exclude_emails = []
maili... | 34.148148 | 1,844 |
613 | py | PYTHON | 15.0 | # Copyright 2016 Tenativa - Antonio Espinosa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
from .mailing import event_filtered_ids
class EventRegistration(models.Model):
_inherit = "event.registration"
@api.model
def search_count(self, domain):
res... | 32.263158 | 613 |
351 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class EventRegistrationState(models.Model):
_name = "event.registration.state"
_description = "Event Registration State"
name = fields.Char(required=True)
cod... | 29.25 | 351 |
600 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
from .mailing import event_filtered_ids
class ResPartner(models.Model):
_inherit = "res.partner"
@api.model
def search_count(self, domain):
res = super().se... | 31.578947 | 600 |
599 | py | PYTHON | 15.0 | # Copyright 2017-2020 Tecnativa - Pedro M. Baeza
# Copyright 2018 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Resend mass mailings",
"version": "15.0.1.0.0",
"category": "Marketing",
"website": "https://github.com/OCA/social",
"author":... | 33.277778 | 599 |
2,372 | py | PYTHON | 15.0 | # Copyright 2017-2020 Tecnativa - Pedro M. Baeza
# Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import exceptions
from odoo.tests import common
class TestMassMailingResend(common.TransactionCase):
@classmethod
def setUpClass(cls):
... | 37.619048 | 2,370 |
630 | py | PYTHON | 15.0 | # Copyright 2017-2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import _, exceptions, models
class MailingMailing(models.Model):
_inherit = "mailing.mailing"
def button_draft(self):
"""Return to draft state for resending the mass maili... | 31.5 | 630 |
532 | py | PYTHON | 15.0 | # Copyright 2015 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Mail Attach Existing Attachment",
"summary": "Adding attachment on the object by sending this one",
"author": "ACSONE SA/NV, Tecnativa, Odoo Community Association (OCA)",
"website": "https://github... | 35.466667 | 532 |
1,309 | py | PYTHON | 15.0 | # Copyright 2015 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests import common
class TestAttachExistingAttachment(common.TransactionCase):
def setUp(self):
super(TestAttachExistingAttachment, self).setUp()
self.partner_obj = self.env["res.partner"]
... | 35.378378 | 1,309 |
1,234 | py | PYTHON | 15.0 | # Copyright 2015 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class MailComposeMessage(models.TransientModel):
_inherit = "mail.compose.message"
@api.model
def default_get(self, fields_list):
res = super().default_get(fields_l... | 33.351351 | 1,234 |
714 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Pedro M. Baeza
# Copyright 2020 Tecnativa - João Marques
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Allow to unsubscribe discretely from an event",
"category": "Marketing",
"version": "15.0.1.0.0",
"depends": ["event", "mass_mailing_custom_uns... | 35.65 | 713 |
5,380 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - João Marques
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from unittest import mock
from werkzeug import urls
from odoo.tests.common import HttpCase, tagged
@tagged("post_install", "-at_install")
class UICase(HttpCase):
def extract_url(self, mail, *args, **kwargs)... | 37.615385 | 5,379 |
468 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class EventRegistration(models.Model):
_inherit = "event.registration"
opt_out = fields.Boolean(
string="Opt-Out",
help="If opt-out is checked, this reg... | 31.2 | 468 |
529 | py | PYTHON | 15.0 | # Copyright 2018 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Mail Activity Partner",
"summary": "Add Partner to Activities",
"version": "15.0.1.0.0",
"development_status": "Beta",
"category": "Social Network",
"website": "https://github.com/OCA/... | 35.266667 | 529 |
3,711 | py | PYTHON | 15.0 | # Copyright 2018 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import TransactionCase
class TestMailActivityPartner(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
# disable tracking test suite wise
c... | 34.361111 | 3,711 |
1,256 | py | PYTHON | 15.0 | # Copyright 2018 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class MailActivity(models.Model):
_inherit = "mail.activity"
partner_id = fields.Many2one(
comodel_name="res.partner",
index=True,
compute="_comput... | 33.052632 | 1,256 |
386 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
import logging
_logger = logging.getLogger(__name__)
def deprecate():
_logger.warning(
"""
`microsoft_outlook_single_tenant` is deprecated.
Configure microsoft_outlook.endpoint ir.config_pa... | 20.315789 | 386 |
484 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
{
"name": "Microsoft Outlook Single Tenant (DEPRECATED)",
"version": "15.0.2.0.0",
"author": "Camptocamp, Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Hidden",
"website": "h... | 32.266667 | 484 |
2,229 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from odoo.tests.common import TransactionCase
class TestFetchMailServerMicrosoftOutlook(TransactionCase):
def _create_mail_server(self):
return self.env["fetchmail.server"].create(
{
... | 37.15 | 2,229 |
564 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from odoo import models
class MicrosoftOutlookMixin(models.AbstractModel):
_inherit = "microsoft.outlook.mixin"
@property
def _OUTLOOK_ENDPOINT(self):
outlook_endpoint = "https://login.microsoftonl... | 31.333333 | 564 |
476 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html)
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
microsoft_outlook_directory_tenant_id = fields.Char(
string="Directory (tenant) ID",
... | 34 | 476 |
601 | py | PYTHON | 15.0 | # Copyright 2016 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Mail optional autofollow",
"summary": """
Choose if you want to automatically add new recipients as followers
on mail.compose.message""",
"author": "ACSONE SA/NV... | 37.5625 | 601 |
2,073 | py | PYTHON | 15.0 | # Copyright 2016 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.tests import common
class TestAttachExistingAttachment(common.TransactionCase):
def setUp(self):
super(TestAttachExistingAttachment, self).setUp()
self.partner_obj = s... | 40.647059 | 2,073 |
1,028 | py | PYTHON | 15.0 | # Copyright 2016 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class MailComposeMessage(models.TransientModel):
_inherit = "mail.compose.message"
@api.model
def default_get(self, fields_list):
res = sup... | 34.266667 | 1,028 |
650 | 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).
{
"name": "Mail Layout Force",
"summary": "Force a mail layout on selected email templates",
"version": "15.0.1.0.1",
... | 38.176471 | 649 |
2,895 | 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.tests import TransactionCase
class TestMailLayoutForce(TransactionCase):
@classmethod
def setUpClass(cls):
... | 39.643836 | 2,894 |
1,499 | 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 api, fields, models
class MailTemplate(models.Model):
_inherit = "mail.template"
force_email_layout_id = f... | 34.045455 | 1,498 |
787 | 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 models
class MailThread(models.AbstractModel):
_inherit = "mail.thread"
def message_post_with_template(
... | 39.3 | 786 |
807 | 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 models
class MailComposer(models.TransientModel):
_inherit = "mail.compose.message"
def _action_send_mail(... | 36.636364 | 806 |
735 | py | PYTHON | 15.0 | # Copyright 2021 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Mail Message Reply",
"summary": """
Make a reply using a message""",
"version": "15.0.1.0.1",
"license": "AGPL-3",
"author": "Creu Blanca,Odoo Community Association (OCA)",
"website":... | 31.956522 | 735 |
1,743 | py | PYTHON | 15.0 | # Copyright 2021 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import re
from odoo.tests import TransactionCase
class TestMessageReply(TransactionCase):
def test_reply(self):
partner = self.env["res.partner"].create({"name": "demo partner"})
self.assertFalse(
... | 37.891304 | 1,743 |
457 | py | PYTHON | 15.0 | from markupsafe import Markup
from odoo import api, models
class MailComposeMessage(models.TransientModel):
_inherit = "mail.compose.message"
@api.onchange("template_id")
def _onchange_template_id_wrapper(self):
super()._onchange_template_id_wrapper()
context = self._context
if "... | 30.466667 | 457 |
1,478 | py | PYTHON | 15.0 | # Copyright 2021 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class MailMessage(models.Model):
_inherit = "mail.message"
def _prep_quoted_reply_body(self):
return """
<div>
<br/>
<br/>
</d... | 30.791667 | 1,478 |
537 | py | PYTHON | 15.0 | # Copyright 2018-2022 Camptocamp
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Mail parent recipient",
"summary": "Send email to parent partner if partner's email is empty",
"category": "Mail",
"license": "AGPL-3",
"version": "15.0.1.0.0",
"website": "https://github... | 31.588235 | 537 |
3,036 | py | PYTHON | 15.0 | # Copyright 2018-2022 Camptocamp
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.addons.mail.tests.common import MailCommon
class TestMailTemplate(MailCommon):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(context=dict(cls.env.context, tra... | 38.43038 | 3,036 |
1,494 | py | PYTHON | 15.0 | # Copyright 2018-2022 Camptocamp
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class MailTemplate(models.Model):
_inherit = "mail.template"
def generate_recipients(self, results, res_ids):
"""Use partner's parent email as recipient.
Walk up the hie... | 42.685714 | 1,494 |
484 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
use_parent_mail_address = fields.Boolean(
config_parameter="mail.use_parent_address",
... | 30.25 | 484 |
1,067 | py | PYTHON | 15.0 | # Copyright 2018-22 ForgeFlow S.L.
# Copyright 2021 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Mail Activity Team",
"summary": "Add Teams to Activities",
"version": "15.0.2.1.0",
"development_status": "Alpha",
"category": "Social Network",
"website": ... | 33.34375 | 1,067 |
13,163 | py | PYTHON | 15.0 | # Copyright 2018-22 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo.exceptions import ValidationError
from odoo.tests.common import Form, TransactionCase
class TestMailActivityTeam(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
... | 41.393082 | 13,163 |
276 | py | PYTHON | 15.0 | # Copyright 2022 CreuBlanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class MailActivityType(models.Model):
_inherit = "mail.activity.type"
default_team_id = fields.Many2one(comodel_name="mail.activity.team")
| 25.090909 | 276 |
2,638 | py | PYTHON | 15.0 | # Copyright 2018-22 ForgeFlow S.L.
# Copyright 2021 Sodexis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class MailActivityTeam(models.Model):
_name = "mail.activity.team"
_description = "Mail Activity Team"
@api.depends("res_model_ids", "membe... | 38.231884 | 2,638 |
3,549 | py | PYTHON | 15.0 | # Copyright 2018-22 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import SUPERUSER_ID, _, api, fields, models
from odoo.exceptions import ValidationError
class MailActivity(models.Model):
_inherit = "mail.activity"
def _get_default_team_id(self, user_id=None):... | 40.793103 | 3,549 |
2,938 | py | PYTHON | 15.0 | # Copyright 2018-22 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models, modules
class ResUsers(models.Model):
_inherit = "res.users"
activity_team_ids = fields.Many2many(
comodel_name="mail.activity.team",
relation="mail_ac... | 40.805556 | 2,938 |
3,376 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - David Vidal
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class MailActivityMixin(models.AbstractModel):
_inherit = "mail.activity.mixin"
activity_team_user_ids = fields.Many2many(
comodel_name="res.users",
... | 39.255814 | 3,376 |
762 | py | PYTHON | 15.0 | # Copyright 2023 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 fields, models
class IrActionsServer(models.Model):
_inherit = "ir.actions.server"
activity_team_id = fiel... | 38.05 | 761 |
3,113 | py | PYTHON | 15.0 | # Copyright 2018-22 ForgeFlow <http://www.forgeflow.com>
# Copyright 2018 Odoo, S.A.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import Command, fields
from odoo.addons.mail.models.mail_activity import MailActivity
def pre_init_hook(cr):
"""The objective of this hook is to def... | 33.117021 | 3,113 |
539 | py | PYTHON | 15.0 | # Copyright 2018-22 ForgeFlow <http://www.forgeflow.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
"name": "Mail Activity Done",
"version": "15.0.1.0.1",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"license": "LGPL-3",
"category": "Discuss",
"website": "... | 35.933333 | 539 |
1,449 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from datetime import date
from odoo.tests.common import TransactionCase
class TestMailActivityDoneMethods(TransactionCase):
def setUp(self):
super(TestMailActivityDoneMethods, self).setUp()
self.employee = self.env["res.users"... | 35.341463 | 1,449 |
2,452 | py | PYTHON | 15.0 | # Copyright 2018-22 ForgeFlow <http://www.forgeflow.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import api, fields, models
class MailActivity(models.Model):
_inherit = "mail.activity"
active = fields.Boolean(default=True)
done = fields.Boolean(default=False)
s... | 35.028571 | 2,452 |
2,519 | py | PYTHON | 15.0 | # Copyright 2018-22 ForgeFlow <http://www.forgeflow.com>
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
from odoo import api, fields, models, modules
class ResUsers(models.Model):
_inherit = "res.users"
@api.model
def systray_get_activities(self):
# Here we totally override ... | 43.431034 | 2,519 |
1,514 | py | PYTHON | 15.0 | # Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
# Copyright 2018 David Vidal <david.vidal@tecnativa.com>
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Customizable unsubscription process on mass mailing emails",
"summary": "Know... | 38.820513 | 1,514 |
285 | py | PYTHON | 15.0 | # Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import exceptions
class DetailsRequiredError(exceptions.ValidationError):
pass
class ReasonRequiredError(exceptions.ValidationError):
pass
| 23.75 | 285 |
6,165 | py | PYTHON | 15.0 | # Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from unittest import mock
from werkzeug import urls
from odoo.tests.common import HttpCase
class UICase(HttpCase):
def extract_url(self, mail, *args, **kwargs):
url = mail.mailing_i... | 40.559211 | 6,165 |
1,464 | py | PYTHON | 15.0 | # Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import SavepointCase
from .. import exceptions
class UnsubscriptionCase(SavepointCase):
def test_details_required(self):
"""Cannot create unsubscription witho... | 41.828571 | 1,464 |
525 | py | PYTHON | 15.0 | # Copyright 2016 Pedro M. Baeza <pedro.baeza@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class MailMassMailing(models.Model):
_inherit = "mailing.list"
not_cross_unsubscriptable = fields.Boolean(
string="Not cross unsubscriptable",
... | 35 | 525 |
1,495 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class MailBlackList(models.Model):
_inherit = "mail.blacklist"
def _add(self, email):
mailing_id = self.env.context.get("mailing_id")
res_id = self.env.context.... | 37.375 | 1,495 |
3,811 | py | PYTHON | 15.0 | # Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from .. import exceptions
class MailUnsubscription(models.Model):
_name = "mail.unsubscription"
_description = "Mail unsubscription"
_inherit... | 35.95283 | 3,811 |
3,321 | py | PYTHON | 15.0 | # Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from itertools import groupby
from odoo import models, tools
from odoo.tools.safe_eval import safe_eval
class MailMassMailing(models.Model):
_inh... | 43.697368 | 3,321 |
6,038 | py | PYTHON | 15.0 | # Copyright 2015 Antiun Ingeniería S.L. (http://www.antiun.com)
# Copyright 2016 Jairo Llopis <jairo.llopis@tecnativa.com>
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
from odoo.http import request, route
from odoo.addons.mass_mailing... | 37.968553 | 6,037 |
537 | py | PYTHON | 15.0 | # Copyright (C) 2014 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Mail - Send Email Copy",
"summary": "Send to you a copy of each mail sent by Odoo",
"version": "15.0.1.0.0",
... | 38.357143 | 537 |
738 | py | PYTHON | 15.0 | # Copyright (C) 2014 - Today: GRAP (http://www.grap.coop)
# @author: Sylvain LE GAL (https://twitter.com/legalsylvain)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from email.utils import COMMASPACE
from odoo import api, models
class IrMailServer(models.Model):
_inherit = "ir.mail_server... | 35.142857 | 738 |
557 | py | PYTHON | 15.0 | # Copyright 2016-2022 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
"name": "Mail Outbound Static",
"summary": "Allows you to configure the from header for a mail server.",
"version": "15.0.1.0.1",
"category": "Discuss",
"website": "https://github.com/OCA/socia... | 34.8125 | 557 |
14,477 | py | PYTHON | 15.0 | # Copyright 2017 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
import logging
import os
from email import message_from_string
import odoo.tools as tools
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
from odoo.addons.base.tests.common imp... | 39.233062 | 14,477 |
6,017 | py | PYTHON | 15.0 | # Copyright 2017 LasLabs Inc.
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
import re
from email.utils import formataddr, parseaddr
from odoo import _, api, fields, models, tools
from odoo.exceptions import ValidationError
class IrMailServer(models.Model):
_inherit = "ir.mail_server"
... | 39.847682 | 6,017 |
675 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Document Page Reference",
"summary": """
Include references on document pages""",
"version": "15.0.1.1.0",
"license": "AGPL-3",
"author": "Creu Blanca,Odoo Community Association (OCA)",
... | 29.347826 | 675 |
2,217 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
class TestDocumentReference(TransactionCase):
def setUp(self):
super().setUp()
self.page_obj = self.env["document.... | 38.894737 | 2,217 |
4,910 | py | PYTHON | 15.0 | # Copyright 2019 Creu Blanca
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from odoo import _, api, fields, models, tools
from odoo.exceptions import ValidationError
from odoo.tools.misc import html_escape
from odoo.addons.http_routing.models.ir_http import slugify
_logger = logging... | 32.733333 | 4,910 |
796 | py | PYTHON | 15.0 | # Copyright 2018 Ivan Todorovich (<ivan.todorovich@gmail.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import logging
_logger = logging.getLogger(__name__)
def post_init_hook(cr, registry): # pragma: no cover
# Set all pre-existing pages history to approved
_logger.info("Setting... | 31.84 | 796 |
862 | py | PYTHON | 15.0 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Document Page Approval",
"version": "15.0.1.1.0",
"author": "Savoir-faire Linux, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/... | 33.153846 | 862 |
4,901 | py | PYTHON | 15.0 | from odoo.tests import common
class TestDocumentPageApproval(common.TransactionCase):
def setUp(self):
super().setUp()
self.page_obj = self.env["document.page"]
self.history_obj = self.env["document.page.history"]
# demo
self.category1 = self.env.ref("document_page.demo_cat... | 36.849624 | 4,901 |
5,080 | py | PYTHON | 15.0 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from ast import literal_eval
from odoo import api, fields, models
class DocumentPage(models.Model):
"""Useful to know the state of a document."""
_inherit = "documen... | 34.794521 | 5,080 |
6,391 | py | PYTHON | 15.0 | # Copyright (C) 2013 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
from odoo.exceptions import UserError
from odoo.tools.translate import _
class DocumentPageHistory(models.Model):
"""Useful to manage editio... | 38.041667 | 6,391 |
1,152 | py | PYTHON | 15.0 | # Copyright 2014 Therp BV (<http://therp.nl>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Preview attachments",
"version": "15.0.1.0.0",
"author": "Therp BV," "Onestein," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/knowledge",
"license": "AG... | 39.724138 | 1,152 |
1,387 | py | PYTHON | 15.0 | # Copyright 2018 Onestein
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import base64
from odoo.tests.common import TransactionCase
class TestAttachmentPreview(TransactionCase):
def test_get_extension(self):
attachment = self.env["ir.attachment"].create(
{
"... | 32.255814 | 1,387 |
2,982 | py | PYTHON | 15.0 | # Copyright 2014 Therp BV (<http://therp.nl>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import collections
import logging
import mimetypes
import os.path
from odoo import api, models
_logger = logging.getLogger(__name__)
class IrAttachment(models.Model):
_inherit = "ir.attachment"
@a... | 41.416667 | 2,982 |
658 | py | PYTHON | 15.0 | # Copyright 2015-2018 Therp BV <https://therp.nl>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Document Page Tag",
"version": "15.0.1.2.0",
"author": "Therp BV,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/knowledge",
"license": "AGPL-3",
... | 34.631579 | 658 |
867 | py | PYTHON | 15.0 | # Copyright 2015-2018 Therp BV <https://therp.nl>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from psycopg2 import IntegrityError
from odoo.tests.common import TransactionCase
from odoo.tools.misc import mute_logger
class TestDocumentPageTag(TransactionCase):
def test_document_page_tag(... | 39.409091 | 867 |
801 | py | PYTHON | 15.0 | # Copyright 2015-2018 Therp BV <https://therp.nl>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class DocumentPageTag(models.Model):
_name = "document.page.tag"
_description = "A keyword for document pages"
name = fields.Char(required=True, tra... | 33.375 | 801 |
291 | py | PYTHON | 15.0 | # Copyright 2015-2018 Therp BV <https://therp.nl>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class DocumentPage(models.Model):
_inherit = "document.page"
tag_ids = fields.Many2many("document.page.tag", string="Keywords")
| 32.333333 | 291 |
592 | py | PYTHON | 15.0 | # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com) - Lois Rilo
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Document Page Project",
"summary": "This module links document pages to projects",
"version": "15.0.1.0.0",
"category": "Project",
"author": "Forg... | 39.466667 | 592 |
1,072 | py | PYTHON | 15.0 | # Copyright (C) 2021 TREVI Software
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import common
class TestProjectProject(common.TransactionCase):
@classmethod
def setUpClass(cls):
super(TestProjectProject, cls).setUpClass()
cls.Page = cls.env["document.page"... | 29.777778 | 1,072 |
314 | py | PYTHON | 15.0 | # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class DocumentPage(models.Model):
_inherit = "document.page"
project_id = fields.Many2one(string="Project", comodel_name="project.project")
| 31.4 | 314 |
577 | py | PYTHON | 15.0 | # Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ProjectProject(models.Model):
_inherit = "project.project"
document_page_ids = fields.One2many(
string="Wiki", comodel_name="documen... | 33.941176 | 577 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
913 | py | PYTHON | 15.0 | import setuptools
with open('VERSION.txt', 'r') as f:
version = f.read().strip()
setuptools.setup(
name="odoo-addons-oca-knowledge",
description="Meta package for oca-knowledge Odoo addons",
version=version,
install_requires=[
'odoo-addon-attachment_preview>=15.0dev,<15.1dev',
'odo... | 35.115385 | 913 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.