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
1,009
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import fields, models, exceptions, _ class Rating(models.Model): _inherit = 'rating.rating' # Adding information for comment a rating message publisher_comment = fields.Text("Publisher comment") publisher_id = fields.Many2one('res.partner', 'Commented by', ...
43.869565
1,009
1,276
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class MailMessage(models.Model): _inherit = 'mail.message' def _portal_message_format(self, field_list): # inlude rating value in data if requested if self._context.get(...
45.571429
1,276
749
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 class PortalRating(http.Controller): @http.route(['/website/rating/comment'], type='json', auth="user", methods=['POST'], website=True) def publish_rating...
44.058824
749
2,143
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.addons.portal.controllers import mail class PortalChatter(mail.PortalChatter): def _portal_post_filter_params(self): fields = super(PortalChat...
46.586957
2,143
1,082
py
PYTHON
15.0
# -*- encoding: utf-8 -*- # Copyright (C) 2017 Paradigm Digital (<http://www.paradigmdigital.co.za>). { 'name': 'South Africa - Accounting', 'version': '1.0', 'category': 'Accounting/Localizations/Account Charts', 'description': """ This is the latest basic South African localisation necessary to run ...
34.903226
1,082
566
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Attachments List and Document Indexation', 'version': '2.1', 'category': 'Hidden/Tools', 'description': """ Attachments list and document indexation ======================================== * Sh...
31.444444
566
751
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.tests.common import TransactionCase, tagged from unittest import skipIf import os directory = os.path.dirname(__file__) try: from pdfminer.pdfinterp import PDFResourceManager except ImportError: PDFResourceManager = None @tagged('post_install', '-at_install') class TestCas...
32.652174
751
5,032
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import io import logging import xml.dom.minidom import zipfile from odoo import api, models from odoo.tools.lru import LRU _logger = logging.getLogger(__name__) try: from pdfminer.pdfinterp import PDFResourceManage...
35.43662
5,032
2,025
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Customer Portal', 'summary': 'Customer Portal', 'sequence': '9000', 'category': 'Hidden', 'description': """ This module adds required base code for a fully integrated customer portal. It c...
38.207547
2,025
1,738
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tools import mute_logger from odoo.tests import common, tagged @tagged('mail_message') class TestMessageFormatPortal(common.TransactionCase): @mute_logger('odoo.models.unlink') def test_mail_message_...
42.390244
1,738
7,669
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 MailCommon, mail_new_test_user from odoo.exceptions import UserError, AccessError from odoo.tests.common import users class TestPortalWizard(MailCommon): def setUp(self): ...
43.573864
7,669
383
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.base.tests.common import HttpCaseWithUserPortal from odoo.tests import tagged @tagged('post_install', '-at_install') class TestUi(HttpCaseWithUserPortal): def test_01_portal_load_tour(self): ...
34.818182
383
5,806
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 PortalShare(models.TransientModel): _name = 'portal.share' _description = 'Portal Sharing' @api.model def default_get(self, fields): result = super(...
49.623932
5,806
9,692
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from odoo.tools.translate import _ from odoo.tools import email_normalize from odoo.exceptions import UserError from odoo import api, fields, models, Command _logger = logging.getLogger(__name__) cla...
39.559184
9,692
642
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models from odoo.http import request class IrHttp(models.AbstractModel): _inherit = 'ir.http' @classmethod def _get_translation_frontend_modules_name(cls): mods = super(IrHttp, cls...
32.1
642
1,691
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import hashlib import hmac from odoo import api, fields, models, _ class MailThread(models.AbstractModel): _inherit = 'mail.thread' _mail_post_token_field = 'access_token' # token field for external posts, to...
43.358974
1,691
1,123
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models, fields from odoo.http import request from odoo.addons.http_routing.models.ir_http import url_for from odoo.tools import is_html_empty class View(models.Model): _inherit = "ir.ui.view" ...
37.433333
1,123
6,583
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import uuid from werkzeug.urls import url_encode from odoo import api, exceptions, fields, models, _ class PortalMixin(models.AbstractModel): _name = "portal.mixin" _description = 'Portal Mixin' access_url ...
43.886667
6,583
1,000
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' portal_allow_api_keys = fields.Boolean( string='Customer API Keys', compute...
37.037037
1,000
1,211
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class MailMessage(models.Model): _inherit = 'mail.message' def portal_message_format(self): return self._portal_message_format([ 'id', 'body', 'date', 'author_id', '...
46.576923
1,211
445
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class ResPartner(models.Model): _inherit = 'res.partner' def can_edit_vat(self): ''' `vat` is a commercial field, synced between the parent (commercial entity) and the c...
31.785714
445
708
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, _ from odoo.exceptions import AccessError class APIKeyDescription(models.TransientModel): _inherit = 'res.users.apikeys.description' def check_access_make_key(self): try: ...
35.4
708
12,360
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from werkzeug import urls from werkzeug.exceptions import NotFound, Forbidden from odoo import http from odoo.http import request from odoo.osv import expression from odoo.tools import consteq, plaintext2html from odoo....
50.243902
12,360
1,145
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.addons.web.controllers import main from odoo.http import request class Home(main.Home): @http.route() def index(self, *args, **kw): if request.session.uid and not reques...
44.038462
1,145
18,930
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import functools import json import logging import math import re from werkzeug import urls from odoo import fields as odoo_fields, http, tools, _, SUPERUSER_ID from odoo.exceptions import ValidationError...
41.604396
18,930
1,023
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) 2012 Thinkopen Solutions, Lda. All Rights Reserved # http://www.thinkopensolutions.com. { 'name': 'Portugal - Accounting', 'version': '0.011', 'author': 'ThinkOpen Solutions', 'website': ...
33
1,023
706
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'pos_epson_printer_restaurant', 'version': '1.0', 'category': 'Sales/Point of Sale', 'sequence': 6, 'summary': 'Epson Printers as Order Printers', 'description': """ Use Epson Printers...
26.148148
706
434
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 RestaurantPrinter(models.Model): _inherit = 'restaurant.printer' printer_type = fields.Selection(selection_add=[('epson_epos', 'Use an Epson printer')]) epson_printer_...
39.454545
434
710
py
PYTHON
15.0
# -*- coding: utf-8 -*- { 'name': 'Online Event Booth Sale', 'category': 'Marketing/Events', 'version': '1.0', 'summary': 'Events, sell your booths online', 'description': """ Use the e-commerce to sell your event booths. """, 'depends': ['event_booth_sale', 'website_event_booth', 'website_...
27.307692
710
2,641
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 import Command, fields from odoo.addons.website_event_sale.tests.common import TestWebsiteEventSaleCommon from odoo.tests import HttpCase from odoo.tests.common import ...
38.838235
2,641
3,633
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.event_booth_sale.tests.common import TestEventBoothSaleCommon from odoo.addons.website_event_sale.tests.common import TestWebsiteEventSaleCommon from odoo.addons.website_sale.controllers.main import Webs...
45.987342
3,633
5,459
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import Command from odoo import fields, models, _ class SaleOrder(models.Model): _inherit = 'sale.order' def _cart_find_product_line(self, product_id=None, line_id=None, **kwargs): """Check i...
52.490385
5,459
498
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class ProductProduct(models.Model): _inherit = 'product.product' def _is_add_to_cart_allowed(self): # `event_booth_registration_confirm` calls `_cart_update` with specific produc...
41.5
498
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 Website(models.Model): _inherit = 'website' def sale_product_domain(self): return ['&'] + super(Website, self).sale_product_domain() + [('detailed_type', '!=', 'event_boot...
29.545455
325
1,550
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import werkzeug from odoo import http from odoo.http import request from odoo.addons.website_event.controllers.main import WebsiteEventController class WebsiteEventBoothController(WebsiteEventController): @http.r...
39.74359
1,550
592
py
PYTHON
15.0
# -*- coding: utf-8 -*- { 'name': 'Customer Rating', 'version': '1.0', 'category': 'Productivity', 'description': """ This module allows a customer to give rating. """, 'depends': [ 'mail', ], 'data': [ 'views/rating_rating_views.xml', 'views/rating_template.xml', ...
22.769231
592
3,062
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.exceptions import AccessError from odoo.tests import tagged, common, new_test_user from odoo.tools import mute_logger @tagged('security') class Tes...
40.289474
3,062
1,037
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import HttpCase, tagged, new_test_user @tagged('post_install', '-at_install') class TestControllersRoute(HttpCase): def setUp(self): super(TestControllersRoute, self).setUp() self.use...
41.48
1,037
8,125
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import uuid from odoo import api, fields, models from odoo.modules.module import get_resource_path RATING_LIMIT_SATISFIED = 5 RATING_LIMIT_OK = 3 RATING_LIMIT_MIN = 1 class Rating(models.Model): _na...
45.646067
8,125
1,176
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 MailThread(models.AbstractModel): _inherit = 'mail.thread' @api.returns('mail.message', lambda value: value.id) def message_post(self, **kwargs): rating_value = k...
42
1,176
1,142
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 MailMessage(models.Model): _inherit = 'mail.message' rating_ids = fields.One2many('rating.rating', 'message_id', groups='base.group_user', string='Related ratings') ...
42.296296
1,142
14,877
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import timedelta from odoo import api, fields, models, tools from odoo.addons.rating.models.rating import RATING_LIMIT_SATISFIED, RATING_LIMIT_OK, RATING_LIMIT_MIN from odoo.osv import expression class Ra...
54.29562
14,877
2,917
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from odoo import http from odoo.http import request from odoo.tools.translate import _ from odoo.tools.misc import get_lang _logger = logging.getLogger(__name__) MAPPED_RATES = { 1: 1, 5: 3, ...
43.537313
2,917
1,246
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) 2011 Smartmode LTD (<http://www.smartmode.co.uk>). { 'name': 'United Kingdom - Accounting', 'version': '1.0', 'category': 'Accounting/Localizations/Account Charts', 'description': """ Thi...
32.789474
1,246
820
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Mail Plugin', 'version': '1.0', 'category': 'Sales/CRM', 'sequence': 5, 'summary': 'Allows integration with mail plugins.', 'description': "Integrate Odoo with your mailbox, get informa...
29.285714
820
3,204
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json from contextlib import contextmanager from unittest.mock import patch from odoo.addons.mail.tests.common import mail_new_test_user from odoo.http import request from odoo.tests.common import HttpCase @cont...
32.04
3,204
3,457
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import psycopg2 from odoo.addons.mail.tests.common import MailCommon from odoo.tools import mute_logger class TestResPartnerIap(MailCommon): @mute_logger("odoo.sql_db") def test_res_partner_iap_constraint(sel...
44.896104
3,457
6,189
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json from unittest.mock import Mock, patch from odoo.addons.iap.tools import iap_tools from odoo.addons.mail_plugin.tests.common import TestMailPluginControllerCommon, mock_auth_method_outlook class TestMailPlu...
40.45098
6,189
833
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from werkzeug.exceptions import BadRequest from odoo import models from odoo.http import request class IrHttp(models.AbstractModel): _inherit = 'ir.http' @classmethod def _auth_method_outlook(cls): ...
32.038462
833
1,105
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import fields, models class ResPartnerIap(models.Model): """Technical model which stores the response returned by IAP. The goal of this model is to not enrich 2 times the same company. We do it in a separate model to not add heavy field (iap_enrich_info) on the <res.pa...
40.925926
1,105
2,878
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models class ResPartner(models.Model): _inherit = 'res.partner' iap_enrich_info = fields.Text('IAP Enrich Info', help='IAP response stored as a JSON string', compute='_compute_partner_iap_info') iap_search_domain = f...
41.114286
2,878
18,707
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import json import logging import requests from werkzeug.exceptions import Forbidden from odoo import http, tools, _ from odoo.addons.iap.tools import iap_tools from odoo.exceptions import AccessError from...
41.663697
18,707
5,284
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import datetime import hmac import json import logging import odoo import werkzeug from odoo import http from odoo.http import request _logger = logging.getLogger(__name__) class Authenticate(http.Contr...
49.849057
5,284
851
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': "Sell Courses", 'summary': 'Sell your courses online', 'description': """Sell your courses using the e-commerce features of the website.""", 'category': 'Hidden', 'version': '1.0', 'depe...
29.344828
851
2,707
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.website_slides.tests import common class TestCoursePurchaseFlow(common.SlidesCase): @classmethod def setUpClass(cls): super().setUpClass() cls.user_salesman = cls.env['res.users...
35.618421
2,707
3,141
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 Channel(models.Model): _inherit = 'slide.channel' enroll = fields.Selection(selection_add=[ ('payment', 'On payment') ], ondelete={'payment': lambda recs:...
43.625
3,141
1,404
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, api class SaleOrder(models.Model): _inherit = "sale.order" def _action_confirm(self): """ If the product of an order line is a 'course', we add the client of the sale_order ...
41.294118
1,404
280
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 Product(models.Model): _inherit = "product.product" channel_ids = fields.One2many('slide.channel', 'product_id', string='Courses')
28
280
826
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.website_slides.controllers.main import WebsiteSlides from odoo.http import request class WebsiteSaleSlides(WebsiteSlides): def _prepare_additional_channel_values(self, values, **kwargs): v...
48.588235
826
2,046
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Calendar', 'version': '1.1', 'sequence': 165, 'depends': ['base', 'mail'], 'summary': "Schedule employees' meetings", 'description': """ This is a full-featured calendar system. =======...
33
2,046
6,259
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime from odoo.tests.common import TransactionCase, new_test_user from odoo.exceptions import AccessError from odoo.tools import mute_logger class TestAccessRights(TransactionCase): @clas...
46.362963
6,259
2,241
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime from odoo.tests.common import HttpCase, new_test_user, tagged @tagged("post_install", "-at_install") class TestCalendarController(HttpCase): def setUp(self): super().setUp() ...
45.734694
2,241
2,065
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import common class TestRecurrentEvent(common.TransactionCase): def setUp(self): super(TestRecurrentEvent, self).setUp() self.CalendarEvent = self.env['calendar.event'] def te...
37.545455
2,065
3,272
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, time from dateutil.relativedelta import relativedelta import pytz from odoo import Command from odoo import tests from odoo.addons.mail.tests.common import MailCommon @tests.tagged('mai...
42.493506
3,272
3,556
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests.common import TransactionCase from odoo.tests.common import new_test_user class TestResPartner(TransactionCase): def test_meeting_count(self): test_user = new_test_user(self.env, login='tes...
48.712329
3,556
5,780
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime from odoo.tests.common import TransactionCase, new_test_user class TestEventNotifications(TransactionCase): @classmethod def setUpClass(cls): super().setUpClass() ...
51.150442
5,780
16,635
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import datetime from datetime import datetime, timedelta, time from odoo import fields from odoo.tests import Form from odoo.addons.base.tests.common import SavepointCaseWithUserDemo import pytz import re class TestCa...
44.242021
16,635
7,498
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from unittest.mock import patch from datetime import datetime, date from dateutil.relativedelta import relativedelta from odoo import fields from odoo.tests.common import TransactionCase, new_test_user from odoo.addons....
40.311828
7,498
33,589
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.exceptions import UserError import pytz from datetime import datetime, date from dateutil.relativedelta import relativedelta from odoo.tests.common import TransactionCase from freezegun import freeze_time cl...
42.679797
33,589
10,836
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from datetime import timedelta from dateutil.relativedelta import relativedelta from odoo import api, fields, models from odoo.tools import plaintext2html _logger = logging.getLogger(__name__) class Al...
45.15
10,836
7,311
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import uuid import base64 import logging from collections import defaultdict from odoo import api, fields, models, _ from odoo.addons.base.models.res_partner import _tz_get from odoo.exceptions import UserError _logger ...
45.409938
7,311
1,160
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from werkzeug.exceptions import BadRequest from odoo import models from odoo.http import request class IrHttp(models.AbstractModel): _inherit = 'ir.http' @classmethod def _auth_method_calendar(cls): ...
38.666667
1,160
539
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from random import randint from odoo import fields, models class MeetingType(models.Model): _name = 'calendar.event.type' _description = 'Event Meeting Type' def _default_color(self): return rand...
24.5
539
21,446
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, time import pytz from dateutil import rrule from dateutil.relativedelta import relativedelta from odoo import api, fields, models, _ from odoo.exceptions import UserError from odoo.addon...
40.380414
21,442
1,988
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models, fields, tools, _ from odoo.tools import is_html_empty class MailActivityType(models.Model): _inherit = "mail.activity.type" category = fields.Selection(selection_add=[('meeting', '...
41.416667
1,988
56,583
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import math import logging from datetime import timedelta from itertools import repeat import pytz from odoo import api, fields, models, Command from odoo.osv.expression import AND from odoo.addons.base.models.res_part...
48.947232
56,583
933
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 Contacts(models.Model): _name = 'calendar.filters' _description = 'Calendar Filters' user_id = fields.Many2one('res.users', 'Me', required=True, default=lambda se...
40.565217
933
2,087
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, fields, models, modules, _ from pytz import timezone, UTC class Users(models.Model): _inherit = 'res.users' def _systray_get_calendar_event_domain(self): tz = sel...
37.945455
2,087
766
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 MailActivityMixin(models.AbstractModel): _inherit = 'mail.activity.mixin' activity_calendar_event_id = fields.Many2one( 'calendar.event', string="Next Activity...
42.555556
766
4,324
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime from odoo import api, fields, models class Partner(models.Model): _inherit = 'res.partner' meeting_count = fields.Integer("# Meetings", compute='_compute_meeting_count') meet...
45.041667
4,324
3,037
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 Alarm(models.Model): _name = 'calendar.alarm' _description = 'Event Alarm' _interval_selection = {'minutes': 'Minutes', 'hours': 'Hours', 'days': 'Days'} nam...
46.723077
3,037
5,083
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import odoo.http as http from odoo.http import request from odoo.tools.misc import get_lang class CalendarController(http.Controller): # YTI Note: Keep id and kwargs only for retrocompatibility purpose @http....
49.349515
5,083
502
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': "IAP / Mail", 'summary': """Bridge between IAP and mail""", 'description': """Bridge between IAP and mail""", 'category': 'Hidden/Tools', 'version': '1.0', 'depends': [ 'iap', ...
22.818182
502
640
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Purchase Requisition Stock', 'version': '1.2', 'category': 'Inventory/Purchase', 'sequence': 70, 'summary': '', 'description': "", 'depends': ['purchase_requisition', 'purchase_stoc...
27.826087
640
11,108
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields from datetime import datetime from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT from odoo.addons.purchase_requisition.tests.common import TestPurchaseRequisitionCommon class TestPurchaseRequ...
46.476987
11,108
453
py
PYTHON
15.0
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class PurchaseOrder(models.Model): _inherit = 'purchase.order' @api.onchange('requisition_id') def _onchange_requisition_id(self): super(PurchaseOrder, self)....
32.357143
453
3,295
py
PYTHON
15.0
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from collections import defaultdict from odoo import api, fields, models class StockRule(models.Model): _inherit = 'stock.rule' @api.model def _run_buy(self, procurements): requisitions_values_b...
48.455882
3,295
2,466
py
PYTHON
15.0
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class PurchaseRequisition(models.Model): _inherit = 'purchase.requisition' def _get_picking_in(self): pick_in = self.env.ref('stock.picking_type_in', raise_if_not_foun...
49.32
2,466
505
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Manufacturing Expiry', 'version': '1.0', 'category': 'Manufacturing/Manufacturing', 'summary': 'Manufacturing Expiry', 'description': """ Technical module. """, 'depends': ['mrp', '...
25.25
505
4,596
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.stock.tests.common import TestStockCommon from odoo.tests.common import Form from odoo.exceptions import UserError class TestStockProductionLot(TestStockCommon)...
39.965217
4,596
1,830
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 ConfirmExpiry(models.TransientModel): _inherit = 'expiry.picking.confirmation' production_ids = fields.Many2many('mrp.production', readonly=True) workorder_id ...
41.590909
1,830
1,408
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, _ class MrpWorkorder(models.Model): _inherit = 'mrp.production' def _pre_button_mark_done(self): confirm_expired_lots = self._check_expired_lots() if confirm_expired_lo...
37.052632
1,408
1,203
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. { "name": "Philippines - Accounting", "summary": """ This is the module to manage the accounting chart for The Philippines. """, "category": "Accounting/Localizations/Account Charts", "version": "1.0", "author": ...
34.371429
1,203
3,826
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import io import re import xlwt from odoo import fields, models from odoo.tools.misc import format_date COLUMN_HEADER_MAP = { "Reporting_Month": "invoice_date", "Vendor_TIN": "vat", "branchCode": "branch_code", ...
41.139785
3,826
221
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class AccountTax(models.Model): _inherit = "account.tax" l10n_ph_atc = fields.Char("Philippines ATC")
24.555556
221
717
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, models from odoo.exceptions import UserError class AccountMove(models.Model): _inherit = "account.move" def action_open_l10n_ph_2307_wizard(self): vendor_bills = self.filtered_domain([('move_type', '=', 'i...
37.736842
717
703
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, models from odoo.exceptions import UserError class AccountPayment(models.Model): _inherit = "account.payment" def action_open_l10n_ph_2307_wizard(self): self.ensure_one() if self.payment_type == 'o...
37
703
437
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class AccountTaxTemplate(models.Model): _inherit = "account.tax.template" l10n_ph_atc = fields.Char("Philippines ATC") def _get_tax_vals(self, company, tax_template_to_tax): val = super()....
31.214286
437
930
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, api, models class ResPartner(models.Model): _inherit = "res.partner" branch_code = fields.Char("Branch Code", default='000', compute='_compute_branch_code', store=True) first_name = fields.Char("First Nam...
37.2
930
1,064
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Product Availability', 'category': 'Website/Website', 'summary': 'Manage product inventory & availability', 'description': """ Manage the inventory of your products and display their availabili...
31.294118
1,064