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,227
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import odoo from odoo.addons.point_of_sale.tests.common import TestPointOfSaleCommon from odoo.tests.common import Form @odoo.tests.tagged('post_install', '-at_install') class TestPosMrp(TestPointOfSaleCommon): def...
38.879518
3,227
711
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class PosOrderLine(models.Model): _inherit = "pos.order.line" def _get_stock_moves_to_consider(self, stock_moves, product): bom = product.env['mrp.bom']._bom_find(product, compan...
50.785714
711
541
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Project Accounting', 'version': '1.0', 'category': 'Services/account', 'summary': 'Project accounting', 'description': 'Bridge created to remove the profitability setting if the account mo...
28.473684
541
748
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Time Off in Payslips', 'version': '1.0', 'category': 'Human Resources/Payroll', 'sequence': 95, 'summary': 'Manage Time Off in Payslips', 'description': """ Manage Time Off in Payslips...
27.703704
748
8,528
py
PYTHON
15.0
# # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, date from odoo.exceptions import ValidationError from odoo.tests import tagged from odoo.addons.hr_work_entry_holidays.tests.common import TestWorkEntryHolidaysBase @tagged('work_entry_...
49.871345
8,528
10,491
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, date from dateutil.relativedelta import relativedelta from odoo.addons.hr_work_entry_holidays.tests.common import TestWorkEntryHolidaysBase from odoo.tests import tagged @tagged('test_lea...
61.711765
10,491
1,618
py
PYTHON
15.0
# # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, date from odoo.addons.hr_work_entry_holidays.tests.common import TestWorkEntryHolidaysBase class TestPayslipHolidaysComputation(TestWorkEntryHolidaysBase): def setUp(self): ...
41.487179
1,618
9,949
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, date from dateutil.relativedelta import relativedelta import pytz from odoo.tests.common import tagged from odoo.fields import Date, Datetime from odoo.addons.hr_work_entry_holidays.tests....
43.445415
9,949
4,600
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import date, datetime from odoo.addons.hr_work_entry_holidays.tests.common import TestWorkEntryHolidaysBase from odoo.tests.common import users, warmup, tagged @tagged('work_entry_perf') class TestWorkEnt...
38.983051
4,600
4,368
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime from dateutil.relativedelta import relativedelta from odoo.fields import Datetime from odoo.addons.hr_work_entry_contract.tests.common import TestWorkEntryBase class TestWorkEntryHolidaysB...
49.636364
4,368
12,439
py
PYTHON
15.0
# -*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from collections import defaultdict from datetime import datetime, date from odoo import api, fields, models, _ from odoo.exceptions import ValidationError from odoo.osv.expression import AND from odoo.tools import forma...
50.771429
12,439
7,231
py
PYTHON
15.0
# -*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import datetime import pytz from datetime import date, datetime from odoo import api, models class HrContract(models.Model): _inherit = 'hr.contract' _description = 'Employee Contract' @api.constrains('dat...
49.190476
7,231
3,548
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class HrWorkEntry(models.Model): _inherit = 'hr.work.entry' leave_id = fields.Many2one('hr.leave', string='Time Off') leave_state = fields.Selection(related='leave_id.state'...
37.744681
3,548
1,432
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) Quartile Limited { 'name': 'Japan - Accounting', 'version': '2.2', 'category': 'Accounting/Localizations/Account Charts', 'description': """ Overview: --------- * Chart of Accounts and ...
30.297872
1,424
1,140
py
PYTHON
15.0
#-*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) 2012 Michael Telahun Makonnen <mmakonnen@gmail.com>. { 'name': 'Ethiopia - Accounting', 'version': '2.0', 'category': 'Accounting/Localizations/Account Charts', 'description': """ Base Modu...
30
1,140
534
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': "Gulf Cooperation Council WMS Accounting", 'version': '1.0', 'description': """ Arabic/English for GCC + lot/SN numbers """, 'author': "Odoo S.A.", 'website': "https://www.odoo.co...
26.7
534
909
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Transifex integration', 'version': '1.0', 'summary': 'Add a link to edit a translation in Transifex', 'category': 'Hidden/Tools', 'description': """ Transifex integration ==============...
31.344828
909
3,910
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from configparser import ConfigParser from os.path import join as opj import os import werkzeug.urls import odoo from odoo import models, fields class IrTranslation(models.Model): _inherit = 'ir.translation' ...
42.967033
3,910
588
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Buckaroo Payment Acquirer', 'version': '2.0', 'category': 'Accounting/Payment Acquirers', 'sequence': 355, 'summary': 'Payment Acquirer: Buckaroo Implementation', 'description': """Buckaroo Payment Acquirer"""...
30.947368
588
428
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. # Mapping of transaction states to Buckaroo status codes. # See https://www.pronamic.nl/wp-content/uploads/2013/04/BPE-3.0-Gateway-HTML.1.02.pdf for the # exhaustive list of status codes. STATUS_CODES_MAPPING = { 'pending': (790, 791, 792, ...
35.666667
428
595
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.payment.tests.common import PaymentCommon class BuckarooCommon(PaymentCommon): @classmethod def setUpClass(cls, chart_template_ref=None): super().setUpClass(chart_template_ref=chart_template_ref) cls...
31.315789
595
5,182
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.exceptions import ValidationError from odoo.tests import tagged from odoo.tools import mute_logger from .common import BuckarooCommon from ..controllers.main import BuckarooController @tagged('post_install', '-at_install') class Bu...
45.45614
5,182
6,137
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from werkzeug import urls from odoo import _, api, models from odoo.exceptions import ValidationError from odoo.addons.payment_buckaroo.const import STATUS_CODES_MAPPING from odoo.addons.payment_buckaroo.controllers.main impor...
42.618056
6,137
431
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models class AccountPaymentMethod(models.Model): _inherit = 'account.payment.method' @api.model def _get_payment_method_information(self): res = super()._get_payment_method_in...
30.785714
431
3,048
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from hashlib import sha1 from werkzeug import urls from odoo import fields, models class PaymentAcquirer(models.Model): _inherit = 'payment.acquirer' provider = fields.Selection( selection_add=[('buckaroo', "Buckaroo")], on...
42.929577
3,048
1,493
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import pprint from odoo import http from odoo.http import request _logger = logging.getLogger(__name__) class BuckarooController(http.Controller): _return_url = '/payment/buckaroo/return' @http.route( _return...
45.242424
1,493
823
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'CRM Mail Plugin', 'version': '1.0', 'category': 'Sales/CRM', 'sequence': 5, 'summary': 'Turn emails received in your mailbox into leads and log their content as internal notes.', 'descr...
30.481481
823
4,200
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json from odoo.addons.mail_plugin.tests.common import TestMailPluginControllerCommon, mock_auth_method_outlook class TestCrmMailPlugin(TestMailPluginControllerCommon): @mock_auth_method_outlook('employee') ...
37.168142
4,200
677
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models class Lead(models.Model): _inherit = 'crm.lead' @api.model def _form_view_auto_fill(self): """ deprecated as of saas-14.3, not needed for newer versions of ...
29.434783
677
3,339
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from odoo.http import request from odoo.tools.misc import formatLang from odoo.addons.mail_plugin.controllers import mail_plugin _logger = logging.getLogger(__name__) class MailPluginController(mail_p...
41.222222
3,339
2,858
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import http from odoo.http import request from odoo.tools import html2plaintext from .mail_plugin import MailPluginController class CrmClient(MailPluginController): @http.route(route='/mail_client_exten...
44.65625
2,858
530
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Mass mailing on sale orders', 'category': 'Hidden', 'version': '1.0', 'summary': 'Add sale order UTM info on mass mailing', 'description': """UTM and mass mailing on sale orders""", 'de...
27.894737
530
392
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class SaleOrder(models.Model): _inherit = 'sale.order' _mailing_enabled = True def _mailing_get_default_domain(self, mailing): """ Exclude by default canceled orders when pe...
30.153846
392
366
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class UtmCampaign(models.Model): _inherit = 'utm.campaign' ab_testing_winner_selection = fields.Selection(selection_add=[ ('sale_quotation_count', 'Quotations'), ...
28.153846
366
3,796
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _, tools from odoo.osv import expression class MassMailing(models.Model): _name = 'mailing.mailing' _inherit = 'mailing.mailing' sale_quotation_count = fields.Integer...
41.714286
3,796
1,968
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # List of contributors: # Jordi Esteve <jesteve@zikzakmedia.com> # Ignacio Ibeas <ignacio@acysos.com> # Dpto. Consultoría Grupo Opentia <consultoria@opentia.es> # Pedro M. Baeza <pedro.baeza@tecnativa.com> # Carlos Liéba...
35.745455
1,966
263
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.account.models.chart_template import update_taxes_from_templates def migrate(cr, version): update_taxes_from_templates(cr, 'l10n_es.account_chart_template_common')
37.571429
263
3,297
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, SUPERUSER_ID def migrate(cr, version): # For taxes coming from tax templates, replace grid 61 by the right tag. # For the other ones, we can't guess what to use, and the user will have to change his # config manually, possibly creating a ticket to ask to fix ...
42.818182
3,297
263
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.account.models.chart_template import update_taxes_from_templates def migrate(cr, version): update_taxes_from_templates(cr, 'l10n_es.account_chart_template_common')
37.571429
263
473
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'OdooBot for livechat', 'version': '1.0', 'category': 'Productivity/Discuss', 'summary': 'Add livechat support for OdooBot', 'description': "", 'website': 'https://www.odoo.com/app/discu...
29.5625
473
391
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, fields class Users(models.Model): _inherit = 'res.users' odoobot_state = fields.Selection(selection_add=[ ('onboarding_canned', 'Onboarding canned'), ], ondelete={'onboardi...
32.583333
391
1,505
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, _ class MailBot(models.AbstractModel): _inherit = 'mail.bot' def _get_answer(self, record, body, values, command): odoobot_state = self.env.user.odoobot_state if self._...
60.08
1,502
980
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Collaborative Pads', 'version': '2.0', 'category': 'Hidden/Tools', 'description': """ Adds enhanced support for (Ether)Pad attachments in the web client. =======================================...
28.823529
980
6,034
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import random import re import string import requests from markupsafe import Markup from odoo import api, models, _ from odoo.exceptions import UserError from ..py_etherpad import EtherpadLiteClient _l...
39.181818
6,034
385
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' pad_server = fields.Char(config_parameter='pad.pad_server', string="Pad Server") pad_key = f...
35
385
906
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Kenya - Accounting', 'version': '1.0', 'category': 'Accounting/Localizations/Account Charts', 'description': """ This provides a base chart of accounts and taxes template for use in Odoo. "...
30.2
906
290
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Germany - Stock', 'category': 'Accounting/Localizations', 'depends': [ 'l10n_de', 'stock', ], 'auto_install': True, 'license': 'LGPL-3', }
22.307692
290
1,144
py
PYTHON
15.0
from odoo import models, fields, _ from odoo.tools import format_date class StockPicking(models.Model): _inherit = 'stock.picking' l10n_de_template_data = fields.Binary(compute='_compute_l10n_de_template_data') l10n_de_addresses = fields.Binary(compute='_compute_l10n_de_addresses') def _compute_l10n...
47.666667
1,144
514
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Mass mailing on attendees', 'category': 'Hidden', 'version': '1.0', 'description': """ Mass mail event attendees ========================= Bridge module adding UX requirements to ease ...
24.47619
514
325
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class EventRegistration(models.Model): _inherit = 'event.registration' _mailing_enabled = True def _mailing_get_default_domain(self, mailing): return [('state', '!=', 'cance...
27.083333
325
1,055
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class Event(models.Model): _inherit = "event.event" def action_mass_mailing_attendees(self): return { 'name': 'Mass Mail Attendees', 'type': 'ir.actions....
34.032258
1,055
4,537
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Email Marketing', 'summary': 'Design, send and track emails', 'description': "", 'version': '2.5', 'sequence': 60, 'website': 'https://www.odoo.com/app/email-marketing', 'category':...
38.777778
4,537
6,961
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime from freezegun import freeze_time from odoo.addons.base.tests.test_ir_cron import CronMixinCase from odoo.addons.mass_mailing.tests.common import MassMailCommon from odoo.tests import users...
51.562963
6,961
1,605
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import werkzeug from odoo.addons.mass_mailing.tests.common import MassMailCommon from odoo.tests.common import HttpCase class TestMassMailingControllers(MassMailCommon, HttpCase): def test_tracking_url_token(self...
38.214286
1,605
1,439
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import odoo.tests from odoo.addons.base.tests.common import HttpCaseWithUserDemo @odoo.tests.tagged('-at_install', 'post_install') class TestUi(HttpCaseWithUserDemo): def setUp(self): super().setUp() ...
49.62069
1,439
15,617
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from ast import literal_eval from datetime import datetime from freezegun import freeze_time from odoo.addons.base.tests.test_ir_cron import CronMixinCase from odoo.addons.mass_mailing.tests.common import MassMailCommo...
43.745098
15,617
13,124
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import datetime import random import re import werkzeug from unittest.mock import patch from odoo import tools from odoo.addons.link_tracker.tests.common import MockLinkTracker from odoo.addons.mail.tests.common import...
46.867857
13,123
8,523
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, timedelta from odoo.addons.mass_mailing.tests.common import MassMailCommon from odoo.tests import users, tagged from odoo.tools import mute_logger @tagged('post_install', '-at_install') ...
50.732143
8,523
8,021
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime from freezegun import freeze_time from odoo import exceptions from odoo.addons.mass_mailing.tests.common import MassMailCommon from odoo.tests.common import Form, users class TestMailingC...
46.364162
8,021
1,837
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.mass_mailing.tests.common import MassMailCommon from odoo.addons.base.tests.test_ir_cron import CronMixinCase from odoo.tests.common import users from unittest.mock import patch class TestMailingRetry(...
44.804878
1,837
4,170
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from markupsafe import Markup from odoo import _, fields, models, tools class TestMassMailing(models.TransientModel): _name = 'mailing.mailing.test' _description = 'Sample Mail Wizard' email_to = fields.T...
44.361702
4,170
4,290
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class MailComposeMessage(models.TransientModel): _inherit = 'mail.compose.message' mass_mailing_id = fields.Many2one('mailing.mailing', string='Mass Mailing', ondelete='cascade'...
51.071429
4,290
600
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class MailingMailingScheduleDate(models.TransientModel): _name = "mailing.mailing.schedule.date" _description = "schedule a mailing" schedule_date = fields.Datetime(string='...
37.5
600
1,942
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import UserError class MassMailingListMerge(models.TransientModel): _name = 'mailing.list.merge' _description = 'Merge Mass Mailing List' @api.m...
43.155556
1,942
1,977
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, _ class MailingContactToList(models.TransientModel): _name = "mailing.contact.to.list" _description = "Add Contacts to Mailing List" contact_ids = fields.Many2many('mailing....
38.019231
1,977
1,373
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, _ class IrModel(models.Model): _inherit = 'ir.model' is_mailing_enabled = fields.Boolean( string="Mailing Enabled", compute='_compute_is_mailing_enabled', searc...
40.382353
1,373
8,921
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models from odoo.osv import expression class MassMailingContactListRel(models.Model): """ Intermediate model between mass mailing list and mass mailing contact Indicates if a c...
47.962366
8,921
54,695
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import hashlib import hmac import logging import lxml import random import re import threading import werkzeug.urls from ast import literal_eval from dateutil.relativedelta import relativedelta from werkzeug.urls import ...
47.232297
54,695
7,588
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class MailingTrace(models.Model): """ MailingTrace models the statistics collected about emails. Those statistics are stored in a separated model and table to avoid bloating...
46.268293
7,588
15,634
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, fields, models from odoo.exceptions import UserError class MassMailingList(models.Model): """Model of a contact list. """ _name = 'mailing.list' _order = 'name' _description = 'Maili...
47.810398
15,634
812
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models class MailRenderMixin(models.AbstractModel): _inherit = "mail.render.mixin" @api.model def _render_template_postprocess(self, rendered): # super will transform relative...
35.304348
812
7,008
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from dateutil.relativedelta import relativedelta from odoo import api, fields, models, _ from odoo.exceptions import ValidationError class UtmCampaign(models.Model): _inherit = 'utm.campaign' mailing_mail_ids...
45.212903
7,008
4,776
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import datetime from odoo import api, models, fields, tools BLACKLIST_MAX_BOUNCED_LIMIT = 5 class MailThread(models.AbstractModel): """ Update MailThread to add the support of bounce management in mass mailing tr...
54.896552
4,776
491
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class ResCompany(models.Model): _inherit = "res.company" def _get_social_media_links(self): self.ensure_one() return { 'social_facebook': self.social_faceboo...
28.882353
491
649
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models, _ class Users(models.Model): _name = 'res.users' _inherit = ['res.users'] @api.model def systray_get_activities(self): """ Update systray name of mailing.mailing f...
30.904762
649
1,771
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' group_mass_mailing_campaign = fields.Boolean(string="Mailing Campaigns", implied_group='mas...
65.592593
1,771
4,006
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import re import werkzeug.urls from odoo import api, fields, models, tools class MailMail(models.Model): """Add the mass mailing campaign data to mail""" _inherit = ['mail.mail'] mailing_id = fields.Many2...
46.045977
4,006
212
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class Partner(models.Model): _inherit = 'res.partner' _mailing_enabled = True
23.555556
212
1,564
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class LinkTracker(models.Model): _inherit = "link.tracker" mass_mailing_id = fields.Many2one('mailing.mailing', string='Mass Mailing') class LinkTrackerClick(models.Model...
37.238095
1,564
4,136
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, tools class MailingTraceReport(models.Model): _name = 'mailing.trace.report' _auto = False _description = 'Mass Mailing Statistics' # mailing name = fields.Char(str...
45.450549
4,136
10,428
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import werkzeug from odoo import _, exceptions, http, tools from odoo.http import request from odoo.tools import consteq from werkzeug.exceptions import BadRequest class MassMailController(http.Controlle...
52.14
10,428
894
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'HR Gamification', 'version': '1.0', 'category': 'Human Resources', 'depends': ['gamification', 'hr'], 'description': """Use the HR resources for the gamification process. The HR officer can...
31.928571
894
1,184
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import UserError, AccessError class GamificationBadgeUserWizard(models.TransientModel): _inherit = 'gamification.badge.user.wizard' employee_id = fi...
38.193548
1,184
1,683
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class HrEmployeeBase(models.AbstractModel): _inherit = "hr.employee.base" goal_ids = fields.One2many('gamification.goal', string='Employee HR Goals', compute='_compute_empl...
44.289474
1,683
325
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class ResUsers(models.Model): _inherit = 'res.users' goal_ids = fields.One2many('gamification.goal', 'user_id') badge_ids = fields.One2many('gamification.badge.user', 'user_...
29.545455
325
1,601
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import ValidationError class GamificationBadgeUser(models.Model): """User having received a badge""" _inherit = 'gamification.badge.user' employ...
37.232558
1,601
3,950
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Author: Gustavo Valverde <gvalverde@iterativo.do> iterativo | Consultores # Contributors: Edser Solis - iterativo # Odoo 8.0 author: Eneldo Serrata <eneldo@marcos.do> # (Marcos Organizador de Negocios SRL..) # Odoo 7.0 author: Jose Ernesto Mendez <tecnologia@obsdr.com> # (Open Business Solut...
35.654545
3,922
1,825
py
PYTHON
15.0
# coding: utf-8 # Copyright 2016 iterativo (https://www.iterativo.do) <info@iterativo.do> from odoo import models, api, _ class AccountChartTemplate(models.Model): _inherit = "account.chart.template" @api.model def _get_default_bank_journals_data(self): if self.env.company.account_fiscal_country...
36.46
1,823
553
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Project Sales Accounting', 'version': '1.0', 'category': 'Services/account', 'summary': 'Project sales accounting', 'description': 'Bridge created to add the number of vendor bills linked ...
29.105263
553
568
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import models class AccountMoveLine(models.Model): _inherit = 'account.move.line' def _compute_analytic_account_id(self): # when a project creates an aml, it adds an analytic account to it. the following filter is to save this # analytic account from being o...
43.692308
568
1,980
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, _, _lt class Project(models.Model): _inherit = 'project.project' vendor_bill_count = fields.Integer(related='analytic_account_id.vendor_bill_count', groups='account.group_accoun...
37.358491
1,980
1,226
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) 2015 Willow IT Pty Ltd (<http://www.willowit.com.au>). { 'name': 'New Zealand - Accounting', 'version': '1.1', 'category': 'Accounting/Localizations/Account Charts', 'description': """ Ne...
32.263158
1,226
5,264
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Project', 'version': '1.2', 'website': 'https://www.odoo.com/app/project', 'category': 'Services/Project', 'sequence': 45, 'summary': 'Organize and plan your projects', 'depends': [...
40.183206
5,264
4,281
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import collections from odoo import models from odoo.tools import populate _logger = logging.getLogger(__name__) class ProjectStage(models.Model): _inherit = "project.task.type" _populate_sizes =...
41.970588
4,281
709
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from .test_project_base import TestProjectCommon from odoo.tests import tagged, TransactionCase class TestTaskFollow(TestProjectCommon): def test_follow_on_create(self): # Tests that the user is follower o...
41.705882
709
281
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import odoo.tests @odoo.tests.tagged('post_install', '-at_install') class TestUi(odoo.tests.HttpCase): def test_01_project_tour(self): self.start_tour("/web", 'project_tour', login="admin")
28.1
281
1,974
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.exceptions import UserError from odoo.addons.project.tests.test_project_base import TestProjectCommon class TestProjectTaskType(TestProjectCommon): @classmethod def setUpClass(cls): super(Tes...
33.457627
1,974
17,285
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from .test_project_base import TestProjectCommon from odoo import Command from odoo.tools import mute_logger from odoo.addons.mail.tests.common import MockEmail EMAIL_TPL = """Return-Path: <whatever-2a840@postmaster.tw...
49.66954
17,285
3,056
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from collections import OrderedDict from odoo import Command from odoo.exceptions import AccessError from odoo.tests import tagged from .test_project_sharing import TestProjectSharingCommon @tagged('post_install', '-a...
40.210526
3,056
19,199
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.mail.tests.common import mail_new_test_user from odoo.addons.project.tests.test_project_base import TestProjectCommon from odoo import Command from odoo.exceptions import AccessError, ValidationError fro...
51.06117
19,199