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
6,299
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 odoo.addons.test_mail.tests.common import TestMailCommon, TestRecipients from odoo.tests import tagged from odoo.tools import mute_logger @tagged("odoobot") class TestOdoobot(TestM...
44.027972
6,296
9,280
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import werkzeug from unittest.mock import patch from unittest.mock import DEFAULT from odoo import exceptions from odoo.addons.link_tracker.tests.common import MockLinkTracker from odoo.addons.sms.models.sms_sms import...
46.603015
9,274
6,421
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.sms.tests import common as sms_common from odoo.addons.test_mail.tests.test_performance import BaseMailPerformance from odoo.tests.common import users, warmup from odoo.tests import tagged from odoo.tool...
39.152439
6,421
4,171
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.test_mail_full.tests.common import TestMailFullCommon, TestMailFullRecipients class TestSmsTemplate(TestMailFullCommon, TestMailFullRecipients): @classmethod def setUpClass(cls): super...
44.361702
4,170
5,636
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.test_mail_full.tests.common import TestMailFullCommon, TestMailFullRecipients from odoo.tests import tagged, users @tagged('mail_thread') class TestMailThreadPhone(TestMailFullCommon, TestMailFullRecip...
50.321429
5,636
3,068
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.test_mail_full.tests.common import TestMailFullCommon, TestMailFullRecipients class TestServerAction(TestMailFullCommon, TestMailFullRecipients): @classmethod def setUpClass(cls): supe...
45.791045
3,068
2,285
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.phone_validation.tools import phone_validation from odoo.addons.mass_mailing_sms.tests.common import MassSMSCommon from odoo.addons.test_mail.tests import common from odoo.addons.test_mass_mailing.tests....
40.803571
2,285
27,218
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.test_mail_full.tests.common import TestMailFullCommon, TestMailFullRecipients class TestSMSComposerComment(TestMailFullCommon, TestMailFullRecipients): """ TODO LIST * add test for default_re...
40.551416
27,210
17,017
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 odoo.addons.phone_validation.tools import phone_validation from odoo.addons.test_mail_full.tests.common import TestMailFullCommon from odoo import exceptions from odoo.tests import tagg...
42.330846
17,017
5,817
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from werkzeug.urls import url_parse, url_decode import json from odoo import http from odoo.addons.test_mail_full.tests.common import TestMailFullCommon, TestMailFullRecipients from odoo.tests import tagged, users from...
35.687117
5,817
23,530
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.test_mail_full.tests.common import TestMailFullCommon, TestMailFullRecipients class TestSMSPost(TestMailFullCommon, TestMailFullRecipients): """ TODO * add tests for new mail.message and mai...
53.844394
23,530
3,322
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from lxml import html from odoo.addons.mail.tests.common import mail_new_test_user from odoo.addons.test_mail_full.tests.test_mass_sms import TestMassSMSCommon from odoo.tests.common import users from odoo.tests import ...
46.788732
3,322
6,261
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import werkzeug from odoo.addons.test_mail_full.tests.common import TestMailFullCommon from odoo.tests.common import users from odoo.tools import mute_logger from odoo.tests import tagged @tagged('mass_mailing') class...
51.743802
6,261
5,266
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 MailTestPortal(models.Model): """ A model intheriting from mail.thread with some fields used for portal sharing, like a partner, ...""" _description = 'Chatter Mod...
32.306748
5,266
813
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Debit Notes', 'version': '1.0', 'category': 'Accounting/Accounting', 'summary': 'Debit Notes', 'description': """ In a lot of countries, a debit note is used as an increase of the amounts o...
33.875
813
2,453
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged from odoo import fields @tagged('post_install', '-at_install') class TestAccountDebitNote(AccountTestInvoicingCommon): def test_00_debit_note_out_invoice(self): """ Debit Note of ...
53.326087
2,453
4,450
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import models, fields, api from odoo.tools.translate import _ from odoo.exceptions import UserError class AccountDebitNote(models.TransientModel): """ Add Debit Note wizard: when you want to correct an invoice with a positive amount. Opposite of a Credit Note, but differe...
48.369565
4,450
1,353
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, fields, api, _ class AccountMove(models.Model): _inherit = "account.move" debit_origin_id = fields.Many2one('account.move', 'Original Invoice Debited', readonly=True, copy=False) de...
45.1
1,353
535
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Event CRM Sale', 'version': '1.0', 'category': 'Marketing/Events', 'website': 'https://www.odoo.com/app/events', 'description': "Add information of sale order linked to the registration for...
31.470588
535
2,365
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from collections import defaultdict from odoo import models class EventRegistration(models.Model): _inherit = 'event.registration' def _get_lead_grouping(self, rules, rule_to_new_regs): """ Override t...
48.265306
2,365
854
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'POS Six', 'version': '1.0', 'category': 'Sales/Point Of Sale', 'sequence': 6, 'summary': 'Integrate your POS with a Six payment terminal', 'description': '', 'data': [ 'views...
30.5
854
497
py
PYTHON
15.0
# coding: utf-8 # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class PosConfig(models.Model): _inherit = 'pos.config' def _force_http(self): enforce_https = self.env['ir.config_parameter'].sudo().get_param('point_of_sale.enforce_https') if ...
35.5
497
400
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 PosPaymentMethod(models.Model): _inherit = 'pos.payment.method' def _get_payment_terminal_selection(self): return super(PosPaymentMethod, self)._get_payment_terminal_selec...
30.769231
400
798
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': "Online Event Ticketing", 'category': 'Website/Website', 'summary': "Sell event tickets online", 'description': """ Sell event tickets through eCommerce app. """, 'depends': ['website_ev...
29.555556
798
3,297
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.fields import Datetime from odoo.tests.common import TransactionCase class TestWebsiteEventSaleCommon(TransactionCase): @classmethod def setUpClass(cls): super...
41.2125
3,297
3,924
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import odoo.tests from datetime import timedelta from odoo.addons.base.tests.common import HttpCaseWithUserDemo from odoo.addons.website_event_sale.tests.common import TestWebsiteEventSaleCommon from odoo.fields import...
42.193548
3,924
3,082
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.website_sale.controllers.main import WebsiteSale from odoo.addons.website.tools import MockRequest from odoo.addons.website_event_sale.tests.common import TestWebsiteEventSaleCommon from odoo.tests impor...
44.666667
3,082
1,066
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import _, api, models class PricelistItem(models.Model): _inherit = "product.pricelist.item" @api.onchange('applied_on', 'product_id', 'product_tmpl_id', 'min_quantity') def _onchange_event_sale_warning(self): if self.min_quantity > 0: msg = '' ...
46.347826
1,066
7,192
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models, _ from odoo.exceptions import UserError from odoo.osv import expression class SaleOrder(models.Model): _inherit = "sale.order" def _cart_find_product_line(self, product_id=None, line_id=None, **kwargs): self.ensure_one() lines = s...
44.670807
7,192
536
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import fields, models # defined for access rules class Product(models.Model): _inherit = 'product.product' event_ticket_ids = fields.One2many('event.event.ticket', 'product_id', string='Event Tickets') def _is_add_to_cart_allowed(self): # Allow adding event tic...
33.5
536
348
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import models class Website(models.Model): _inherit = 'website' def sale_product_domain(self): # remove product event from the website content grid and list view (not removed in detail view) return ['&'] + super(Website, self).sale_product_domain() + [('deta...
31.636364
348
3,368
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.website_event.controllers.main import WebsiteEventController from odoo.http import request class WebsiteEventSaleController(WebsiteEventController): @http.route() def ...
47.43662
3,368
1,143
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Contact Form', 'category': 'Website/Website', 'sequence': 54, 'summary': 'Generate leads from a contact form', 'version': '2.1', 'description': """ Add capability to your website forms ...
31.75
1,143
1,884
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import odoo.tests @odoo.tests.tagged('post_install', '-at_install') class TestWebsiteCrm(odoo.tests.HttpCase): def test_tour(self): # change action to create opportunity self.start_tour("/", 'websi...
47.1
1,884
2,783
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.crm.tests.common import TestCrmCommon from odoo.tests.common import users class TestWebsiteVisitor(TestCrmCommon): def setUp(self): super(TestWebsiteVisitor, self).setUp() self.tes...
41.537313
2,783
1,687
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.crm.tests.test_crm_lead_merge import TestLeadMergeCommon from odoo.tests.common import tagged, users @tagged('lead_manage') class TestLeadVisitorMerge(TestLeadMergeCommon): @users('user_sales_mana...
42.175
1,687
994
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' def _get_crm_default_team_domain(self): if not self.env.user.has_group('crm.group_use_lea...
49.7
994
920
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 Website(models.Model): _inherit = 'website' def _get_crm_default_team_domain(self): if not self.env.user.has_group('crm.group_use_lead'): return [('use...
41.818182
920
2,905
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, SUPERUSER_ID class Lead(models.Model): _inherit = 'crm.lead' visitor_ids = fields.Many2many('website.visitor', string="Web Visitors") visitor_page_count = fields.Integ...
49.237288
2,905
2,712
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, api class WebsiteVisitor(models.Model): _inherit = 'website.visitor' lead_ids = fields.Many2many('crm.lead', string='Leads', groups="sales_team.group_sale_salesman") lead_c...
47.578947
2,712
5,502
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import tools from odoo.addons.phone_validation.tools import phone_validation from odoo.addons.website.controllers import form from odoo.http import request class WebsiteForm(form.WebsiteForm): def _get_c...
56.721649
5,502
1,083
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Members', 'version': '1.0', 'category': 'Sales/Sales', 'description': """ This module allows you to manage all operations for managing memberships. ============================================...
31.852941
1,083
7,033
py
PYTHON
15.0
# -*- coding: utf-8 -*- import datetime from dateutil.relativedelta import relativedelta from unittest.mock import patch import time from odoo.addons.membership.tests.common import TestMembershipCommon from odoo.tests import tagged from odoo import fields @tagged('post_install', '-at_install') class TestMembership(...
43.68323
7,033
1,032
py
PYTHON
15.0
# -*- coding: utf-8 -*- import datetime from dateutil.relativedelta import relativedelta from odoo.addons.account.tests.common import AccountTestInvoicingCommon class TestMembershipCommon(AccountTestInvoicingCommon): @classmethod def setUpClass(cls, chart_template_ref=None): super().setUpClass(char...
32.25
1,032
1,519
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 MembershipInvoice(models.TransientModel): _name = "membership.invoice" _description = "Membership Invoice" product_id = fields.Many2one('product.product', string=...
43.4
1,519
4,509
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 datetime import date class AccountMove(models.Model): _inherit = 'account.move' def button_draft(self): # OVERRIDE to update the cancel date. res = su...
39.208696
4,509
6,083
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import date from odoo import api, fields, models, _ from odoo.exceptions import UserError, ValidationError from . import membership class Partner(models.Model): _inherit = 'res.partner' associate...
51.991453
6,083
1,244
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 Product(models.Model): _inherit = 'product.template' membership = fields.Boolean(help='Check if the product is eligible for membership.') membership_date_from = f...
46.074074
1,244
3,571
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 STATE = [ ('none', 'Non Member'), ('canceled', 'Cancelled Member'), ('old', 'Old Member'), ('waiting', 'Waiting Member'), ('invoiced', 'Invoiced Member'), ('f...
45.782051
3,571
4,172
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 STATE = [ ('none', 'Non Member'), ('canceled', 'Cancelled Member'), ('old', 'Old Member'), ('waiting', 'Waiting Member'), ('invoiced', 'Invoiced Member'), ...
39.358491
4,172
1,510
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'WMS Accounting', 'version': '1.1', 'summary': 'Inventory, Logistic, Valuation, Accounting', 'description': """ WMS Accounting module ====================== This module makes the link between th...
32.826087
1,510
54,401
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. """ Implementation of "INVENTORY VALUATION TESTS (With valuation layers)" spreadsheet. """ from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.addons.stock_account.tests.test_stockvaluation...
46.61611
54,401
6,081
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged from odoo import fields @tagged('-at_install', 'post_install') class ValuationReconciliationTestCommon(AccountTestInv...
51.10084
6,081
10,796
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.tests import Form from odoo.addons.stock_account.tests.test_stockvaluation import _create_accounting_data from odoo.addons.stock_account.tests.test_stockvaluationlayer impo...
45.171548
10,796
173,485
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.exceptions import UserError from odoo.fields import Datetime from odoo.tests.common import Form, TransactionCase def _create_accounting_data(env): """Create the accounts an...
43.555862
173,483
7,363
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.addons.stock_account.tests.test_stockvaluation import _create_accounting_data from odoo.tests.common import tagged, Form from odoo import ...
47.811688
7,363
784
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models from odoo.tools.misc import format_datetime class StockQuantityHistory(models.TransientModel): _inherit = 'stock.quantity.history' def open_at_date(self): active_model = self.env.context.get('active_mo...
43.555556
784
1,297
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 StockReturnPicking(models.TransientModel): _inherit = "stock.return.picking" @api.model def default_get(self, default_fields): res = super(StockReturnPick...
41.83871
1,297
465
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 StockRequestCount(models.TransientModel): _inherit = 'stock.request.count' accounting_date = fields.Date('Accounting Date') def _get_values_to_write(self): re...
29.0625
465
8,026
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 from odoo.tools import float_is_zero class StockValuationLayerRevaluation(models.TransientModel): _name = 'stock.valuation.layer.revalua...
50.1625
8,026
6,505
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 from odoo.tools import float_compare, float_is_zero class StockValuationLayer(models.Model): """Stock Valuation Layer""" _name = 'stock.valuation.layer' _description ...
50.820313
6,505
1,706
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 StockLocation(models.Model): _inherit = "stock.location" valuation_in_account_id = fields.Many2one( 'account.account', 'Stock Valuation Account (Incoming)', ...
51.69697
1,706
11,999
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import fields, models from odoo.tools import float_is_zero class AccountMove(models.Model): _inherit = 'account.move' stock_move_id = fields.Many2one('stock.move', string='Stock Move', index=True) stock_valuation_layer_ids = fields.One2many('stock.valuation.layer', 'acc...
46.688716
11,999
3,770
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models from odoo.tools import float_compare, float_is_zero class StockMoveLine(models.Model): _inherit = 'stock.move.line' # --------------------------------------------------------------...
50.266667
3,770
3,935
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.tools.float_utils import float_is_zero from odoo.tools.misc import groupby class StockQuant(models.Model): _inherit = 'stock.quant' value = fields.Monetary('Value...
49.810127
3,935
30,909
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from collections import defaultdict from odoo import api, fields, models, _ from odoo.exceptions import UserError from odoo.tools import float_compare, float_is_zero, OrderedSet import logging _logger = logging.getLogg...
51.515
30,909
863
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 odoo import models, fields class StockPicking(models.Model): _inherit = 'stock.picking' country_code = fields.Char(related="company_id.account_fiscal_country_id.code") d...
39.227273
863
1,817
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models, _ import logging _logger = logging.getLogger(__name__) class AccountChartTemplate(models.Model): _inherit = "account.chart.template" @api.model def generate_journals(self, ac...
49.108108
1,817
47,097
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 from odoo.tools import float_is_zero, float_repr, float_round, float_compare from odoo.exceptions import ValidationError from collections impo...
54.700348
47,097
582
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' module_stock_landed_costs = fields.Boolean("Landed Costs", help="Affect landed costs on ...
44.769231
582
2,129
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.tools.float_utils import float_is_zero, float_repr class ReplenishmentReport(models.AbstractModel): _inherit = 'report.stock.report_product_product_replenishment' def _compute...
51.926829
2,129
785
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Online Task Submission', 'category': 'Website/Website', 'summary': 'Add a task suggestion form to your website', 'version': '1.0', 'description': """ Generate tasks in Project app from a fo...
32.708333
785
613
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.website.controllers import form class WebsiteForm(form.WebsiteForm): def insert_record(self, request, model, values, custom, meta=None): if model.model == 'project.task': visito...
40.866667
613
684
py
PYTHON
15.0
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Fleet History', 'version': '1.0', 'category': 'Human Resources', 'summary': 'Get history of driven cars by employees', 'description': "", 'depends': ['hr', 'fleet'], 'data': [ ...
29.73913
684
1,433
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 HrDepartureWizard(models.TransientModel): _inherit = 'hr.departure.wizard' release_campany_car = fields.Boolean("Release Company Car", default=True, help="Rel...
51.178571
1,433
958
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 FleetVehicleLogServices(models.Model): _inherit = 'fleet.vehicle.log.services' purchaser_employee_id = fields.Many2one( 'hr.employee', string="Driver (Employee...
39.916667
958
1,248
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 FleetVehicleAssignationLog(models.Model): _inherit = 'fleet.vehicle.assignation.log' driver_employee_id = fields.Many2one(related="vehicle_id.driver_employee_id", string='...
48
1,248
5,153
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 FleetVehicle(models.Model): _inherit = 'fleet.vehicle' mobility_card = fields.Char(compute='_compute_mobility_card', stor...
43.669492
5,153
3,015
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 Employee(models.Model): _inherit = 'hr.employee' employee_cars_count = fields.Integer(compute="_compute_employee_cars_c...
40.743243
3,015
595
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 User(models.Model): _inherit = ['res.users'] employee_cars_count = fields.Integer(related='employee_id.employee_cars_count') @property def SELF_READABLE_FIELDS(se...
29.75
595
359
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 FleetVehicleLogContract(models.Model): _inherit = 'fleet.vehicle.log.contract' purchaser_employee_id = fields.Many2one( related='vehicle_id.driver_employee_id', ...
29.916667
359
365
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 FleetVehicleOdometer(models.Model): _inherit = 'fleet.vehicle.odometer' driver_employee_id = fields.Many2one( related='vehicle_id.driver_employee_id', string='Driv...
28.076923
365
3,089
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import io from PyPDF2 import PdfFileReader, PdfFileWriter from reportlab.pdfgen import canvas from odoo import _ from odoo.http import request, route, Controller class HrFleet(Controller): @route(...
38.6125
3,089
696
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': "Stock - SMS", 'summary': 'Send text messages when final stock move', 'description': "Send text messages when final stock move", 'category': 'Hidden', 'version': '1.0', 'depends': ['stoc...
31.636364
696
1,245
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 ConfirmStockSms(models.TransientModel): _name = 'confirm.stock.sms' _description = 'Confirm Stock SMS' pick_ids = fields.Many2many('stock.picking', 'stock_picking_sms_...
40.16129
1,245
815
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 Company(models.Model): _inherit = "res.company" def _default_confirmation_sms_picking_template(self): try: return self.env.ref('stock_sms.sms_template_...
37.045455
815
2,847
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, _ import threading class Picking(models.Model): _inherit = 'stock.picking' def _pre_action_done_hook(self): res = super()._pre_action_done_hook() if res is True and no...
44.484375
2,847
528
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' stock_move_sms_validation = fields.Boolean( related='company_id.stock_move_sms_validatio...
37.714286
528
738
py
PYTHON
15.0
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Website Modules Test', 'version': '1.0', 'category': 'Hidden', 'sequence': 9876, 'description': """This module contains tests related to website modules. It allows to test website busines...
25.448276
738
457
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.website.tests.test_configurator import TestConfiguratorCommon @odoo.tests.common.tagged('post_install', '-at_install') class TestConfigurator(TestConfiguratorCommon): def test_01_...
41.545455
457
1,903
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) 2008-2008 凯源吕鑫 lvxin@gmail.com <basic chart data> # 维智众源 oldrev@gmail.com <states data> # Copyright (C) 2012-2012 南京盈通 ccdos@intoerp.com <small business chart> # Copyright (C) 2...
30.589286
1,713
1,610
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 from odoo.osv import expression try: from cn2an import an2cn except ImportError: an2cn = None class AccountMove(models.Model):...
37.44186
1,610
1,339
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Google Drive™ integration', 'version': '0.2', 'category': 'Productivity', 'installable': True, 'auto_install': False, 'data': [ 'security/ir.model.access.csv', 'data/goo...
33.425
1,337
2,221
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" google_drive_authorization_code = fields.Char(string='Authorization Code', config_parame...
45.326531
2,221
12,520
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import ast import logging import json import re import requests import werkzeug.urls from odoo import api, fields, models from odoo.exceptions import RedirectWarning, UserError, ValidationError from odoo.tools.translate...
49.486166
12,520
827
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Italy - E-invoicing', 'icon': '/l10n_it/static/description/icon.png', 'version': '0.3', 'depends': [ 'l10n_it', 'fetchmail', 'account_edi' ], 'author': 'Odoo', ...
26.677419
827
1,970
py
PYTHON
15.0
# -*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import warnings _logger = logging.getLogger(__name__) try: from OpenSSL import crypto as ssl_crypto import OpenSSL._util as ssl_util except ImportError: ssl_crypto = None _logger.warning("...
38.627451
1,970
1,928
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.tests.common import TransactionCase, tagged @tagged('post_install_l10n', 'post_install', '-at_install') class TestResPartner(TransactionCase): def test_validate_fisca...
31.606557
1,928
7,512
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import datetime import logging from collections import namedtuple from unittest.mock import patch from freezegun import freeze_time from odoo import tools from odoo.tests import tagged from odoo.addons.account_edi.tests...
45.253012
7,512
676
py
PYTHON
15.0
# -*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, api class L10nItDdt(models.Model): _name = 'l10n_it.ddt' _description = 'Transport Document' invoice_id = fields.One2many('account.move', 'l10n_it_ddt_id', string='Invoice Re...
37.555556
676