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
9,880
py
PYTHON
15.0
# -*- coding: utf-8 -*- from freezegun import freeze_time from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged from odoo.tools.misc import format_amount @tagged('post_install', '-at_install') class TestAccountJournalDashboard(AccountTestInvoicingCommon): @freeze_t...
37.142857
9,880
8,694
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged from odoo.exceptions import UserError, ValidationError @tagged('post_install', '-at_install') class TestAccountAccount(AccountTestInvoicingCommon): def test_changing_account_company(self)...
44.13198
8,694
12,296
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 AccountTestInvoicingHttpCommon from odoo.tests.common import tagged import json from odoo import http from odoo.tools import mute_logger @tagged('post_install', '-at_instal...
43.602837
12,296
68,375
py
PYTHON
15.0
# -*- coding: utf-8 -*- from freezegun import freeze_time from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests.common import Form from odoo.tests import tagged from odoo import Command @tagged('post_install', '-at_install') class TestReconciliationMatchingRules(AccountTestInvoicing...
46.79603
68,369
145,835
py
PYTHON
15.0
# -*- coding: utf-8 -*- # pylint: disable=C0326 from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged from odoo.tests.common import Form from odoo import fields, Command @tagged('post_install', '-at_install') class TestAccountMoveReconcile(AccountTestInvoicingCommon): ...
47.163325
145,829
38,858
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged, new_test_user from odoo.tests.common import Form @tagged('post_install', '-at_install') class TestAccountPayment(AccountTestInvoicingCommon): @classmethod def setUpClass(cls, chart_t...
38.896897
38,858
21,100
py
PYTHON
15.0
import logging from odoo import Command from odoo.addons.account.models.chart_template import update_taxes_from_templates from odoo.exceptions import ValidationError from odoo.tests import tagged from odoo.tests.common import TransactionCase @tagged('post_install', '-at_install') class TestChartTemplate(Transaction...
50.118765
21,100
44,748
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged @tagged('post_install', '-at_install') class TestTaxCommon(AccountTestInvoicingCommon): @classmethod def setUpClass(cls, chart_template_ref=None): super().setUpClass(chart_tem...
38.278871
44,748
5,160
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.tests.common import TransactionCase class AccountingTestTemplConsistency(TransactionCase): '''Test the templates consistency between some objects like account.account when account.account.template. ''' def get_model_fields(self, model, extra_domain=None): # Retri...
60.705882
5,160
45,697
py
PYTHON
15.0
# -*- coding: utf-8 -*- #pylint: disable=too-many-lines from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged from odoo import Command @tagged('post_install', '-at_install') class TestAccountTaxDetailsReport(AccountTestInvoicingCommon): def _dispatch_move_lines(sel...
37.672712
45,697
50,821
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.exceptions import UserError from odoo.tests import tagged, Form from odoo import fields @tagged('post_install', '-at_install') class TestAccountPaymentRegister(AccountTestInvoicingCommon): @classmethod d...
40.884151
50,819
1,170
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged from odoo.exceptions import UserError @tagged('post_install', '-at_install') class TestAccountTax(AccountTestInvoicingCommon): def test_changing_tax_company(self): ''' Ensure you ...
39
1,170
75,313
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged from odoo.tests.common import Form from odoo.exceptions import ValidationError, UserError from odoo import fields from unittest.mock import patch class TestAccountBankStatementCommon(AccountT...
44.246181
75,307
4,226
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged from odoo import fields from odoo.tests.common import Form @tagged('post_install', '-at_install') class TestAccountInvoiceRounding(AccountTestInvoicingCommon): @classmethod def setUpC...
42.686869
4,226
11,397
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 TestFiscalPosition(common.TransactionCase): """Tests for fiscal positions in auto apply (account.fiscal.position). If a partner has a vat number, the fiscal positions with "v...
42.330855
11,387
26,328
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged from odoo.tests.common import Form, TransactionCase from odoo import fields, api, SUPERUSER_ID from odoo.exceptions import ValidationError, UserError from odoo.tools import mute_logger from dat...
43.88
26,328
32,662
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields from odoo.tests.common import TransactionCase, HttpCase, tagged, Form import time import base64 from lxml import etree @tagged('post_install', '-at_install') class AccountTestInvoicingCommon(Tran...
45.550907
32,660
2,464
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged from odoo.exceptions import UserError @tagged('post_install', '-at_install') class TestAccountAnalyticAccount(AccountTestInvoicingCommon): @classmethod def setUpClass(cls, chart_templ...
41.762712
2,464
4,307
py
PYTHON
15.0
# -*- coding: utf-8 -*- import base64 import io from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.exceptions import UserError from odoo.tools import pdf from odoo.tests import tagged from odoo.tools import file_open from PyPDF2 import PdfFileReader, PdfFileWriter @tagged('post_install...
43.94898
4,307
80,583
py
PYTHON
15.0
# -*- coding: utf-8 -*- # pylint: disable=bad-whitespace from freezegun import freeze_time from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests.common import Form from odoo.tests import tagged from odoo import fields, Command from odoo.exceptions import UserError, ValidationError fro...
39.061076
80,583
1,389
py
PYTHON
15.0
# -*- coding: utf-8 -*- import logging from odoo.tests import standalone _logger = logging.getLogger(__name__) @standalone('all_l10n') def test_all_l10n(env): """ This test will install all the l10n_* modules. As the module install is not yet fully transactional, the modules will remain installed after...
33.878049
1,389
1,542
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 AccountTestInvoicingHttpCommon from odoo.tests.common import tagged @tagged('post_install', '-at_install') class TestTourRenderInvoiceReport(AccountTestInvoicingHttpCommon): ...
36.714286
1,542
36,913
py
PYTHON
15.0
# -*- coding: utf-8 -*- # pylint: disable=C0326 from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged, Form @tagged('post_install', '-at_install') class TestInvoiceTaxes(AccountTestInvoicingCommon): @classmethod def setUpClass(cls, chart_template_ref=None): ...
44.735758
36,907
8,714
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged import json @tagged('post_install', '-at_install') class TestAccountMovePaymentsWidget(AccountTestInvoicingCommon): @classmethod def setUpClass(cls, chart_template_ref=None): ...
47.347826
8,712
42,525
py
PYTHON
15.0
# -*- coding: utf-8 -*- # pylint: disable=bad-whitespace from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests.common import Form from odoo.tests import tagged from odoo import fields, Command from collections import defaultdict @tagged('post_install', '-at_install') class TestAccoun...
37.76643
42,525
4,611
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 TestAccountInvoiceReport(AccountTestInvoicingCommon): @classmethod def setUpClass(cls, chart_template_ref=None): ...
38.747899
4,611
29,577
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged, new_test_user from odoo.tests.common import Form from odoo import fields, api, SUPERUSER_ID from odoo.exceptions import ValidationError, UserError, RedirectWarning from odoo.tools import mute_l...
41.834512
29,577
1,270
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import Command import odoo.tests @odoo.tests.tagged('post_install_l10n', 'post_install', '-at_install') class TestUi(odoo.tests.HttpCase): def test_01_account_tour(self): # Reset country and fiscal country, so that fiel...
45.357143
1,270
43,185
py
PYTHON
15.0
# -*- coding: utf-8 -*- # pylint: disable=bad-whitespace from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests.common import Form from odoo.tests import tagged from odoo import fields, Command from collections import defaultdict @tagged('post_install', '-at_install') class TestAccou...
37.749126
43,185
56,300
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import time import unittest from datetime import timedelta from odoo import api, fields from odoo.addons.account.tests.common import TestAccountReconciliationCommon from odoo.tests import Form, tagged @tagged('post_in...
47.152429
56,300
143,975
py
PYTHON
15.0
# -*- coding: utf-8 -*- # pylint: disable=bad-whitespace from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests.common import Form from odoo.tests import tagged from odoo import fields, Command from odoo.exceptions import UserError from collections import defaultdict from unittest.mock...
40.397026
143,975
1,036
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged @tagged('post_install', '-at_install') class TestAccountMovePartnerCount(AccountTestInvoicingCommon): def test_account_move_count(self): self.env['account.move'].create([ ...
35.724138
1,036
8,621
py
PYTHON
15.0
# -*- coding: utf-8 -*- from unittest.mock import patch import odoo.tools from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.addons.account.models.account_payment_method import AccountPaymentMethod from odoo.tests import tagged from odoo.exceptions import UserError, ValidationError @ta...
45.550265
8,609
14,757
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged, Form import time @tagged('post_install', '-at_install') class TestTransferWizard(AccountTestInvoicingCommon): @classmethod def setUpClass(cls, chart_template_ref=None): super(...
50.71134
14,757
17,585
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged import json @tagged('post_install', '-at_install') class TestTaxTotals(AccountTestInvoicingCommon): @classmethod def setUpClass(cls, chart_template_ref=None): super().setUpCl...
32.930712
17,585
2,921
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged @tagged('post_install', '-at_install') class TestSettings(AccountTestInvoicingCommon): def test_switch_taxB2B_taxB2C(self): """ Since having users both in the tax B2B and ...
48.683333
2,921
1,088
py
PYTHON
15.0
from odoo import models, fields, _ from odoo.exceptions import UserError class ValidateAccountMove(models.TransientModel): _name = "validate.account.move" _description = "Validate Account Move" force_post = fields.Boolean(string="Force", help="Entries in the future are set to be auto-posted by default. C...
47.304348
1,088
529
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models class AccountCommonJournalReport(models.TransientModel): _name = 'account.common.journal.report' _description = 'Common Journal Report' _inherit = "account.common.report" amount_currency = fields.Boolean('With Currency', help="Print Report...
35.266667
529
336
py
PYTHON
15.0
from odoo import models class BaseDocumentLayout(models.TransientModel): _inherit = 'base.document.layout' def document_layout_save(self): res = super(BaseDocumentLayout, self).document_layout_save() for wizard in self: wizard.company_id.action_save_onboarding_invoice_layout() ...
30.545455
336
2,099
py
PYTHON
15.0
from odoo import models, fields, api, _ from odoo.exceptions import UserError class CashBox(models.TransientModel): _register = False name = fields.Char(string='Reason', required=True) # Attention, we don't set a domain, because there is a journal_type key # in the context of the action amount = f...
39.603774
2,099
427
py
PYTHON
15.0
from odoo import models, api class AccountUnreconcile(models.TransientModel): _name = "account.unreconcile" _description = "Account Unreconcile" def trans_unrec(self): context = dict(self._context or {}) if context.get('active_ids', False): self.env['account.move.line'].browse...
35.583333
427
845
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import fields, models class AccountPrintJournal(models.TransientModel): _inherit = "account.common.journal.report" _name = "account.print.journal" _description = "Account Print Journal" sort_selection = fields.Selection([('date', 'Date'), ('move_name', 'Journal Entr...
49.705882
845
7,622
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import models, fields, api from odoo.tools.translate import _ from odoo.exceptions import UserError class AccountMoveReversal(models.TransientModel): """ Account move reversal wizard, it cancel an account move by reversing it. """ _name = 'account.move.reversal' _...
46.193939
7,622
24,881
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models, _ from odoo.exceptions import UserError, ValidationError from odoo.tools.misc import format_date, formatLang from collections import defaultdict from itertools import groupby import json class AutomaticEntryWizard(models.TransientModel): _name = 'accou...
55.168514
24,881
34,477
py
PYTHON
15.0
# -*- coding: utf-8 -*- from collections import defaultdict from lxml import etree from odoo import models, fields, api, _ from odoo.exceptions import UserError from odoo.tools import float_compare, frozendict class AccountPaymentRegister(models.TransientModel): _name = 'account.payment.register' _descriptio...
49.112536
34,477
7,498
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.addons.mail.wizard.mail_compose_message import _reopen from odoo.exceptions import UserError from odoo.tools.misc import get_lang class AccountInvoiceSend(models.Transi...
46
7,498
2,435
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models, _ from odoo.tools.misc import get_lang class AccountCommonReport(models.TransientModel): _name = "account.common.report" _description = "Account Common Report" company_id = fields.Many2one('res.company', string='Company', required=True, reado...
45.092593
2,435
7,602
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import date, timedelta from odoo import _, api, fields, models from odoo.exceptions import ValidationError class FinancialYearOpeningWizard(models.TransientModel): _name = 'account.financial.year.op'...
52.791667
7,602
7,431
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models, _ from odoo.exceptions import UserError from odoo.tools.date_utils import get_month, get_fiscal_year from odoo.tools.misc import format_date import re from collections import defaultdict import json class ReSequenceWizard(models.TransientModel): _name...
51.604167
7,431
6,234
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, _, Command import base64 from datetime import timedelta class AccountTourUploadBill(models.TransientModel): _name = 'account.tour.upload.bill' _description = 'Account tour uploa...
43.291667
6,234
3,838
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 TaxAdjustments(models.TransientModel): _name = 'tax.adjustments.wizard' _description = 'Tax Adjustments Wizard' def _get_default_journal(self): return sel...
54.056338
3,838
12,130
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from dateutil.relativedelta import relativedelta import json from odoo import models, fields, api, _, Command from odoo.tools import format_date from odoo.exceptions import UserError from odoo.tools import date_utils from...
50.966387
12,130
1,628
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 AccessError class Digest(models.Model): _inherit = 'digest.digest' kpi_account_total_revenue = fields.Boolean('Revenue') kpi_account_total_rev...
47.882353
1,628
1,406
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import models, _ from odoo.exceptions import UserError from odoo.release import series from odoo.tools import parse_version class IrModuleModule(models.Model): _inherit = "ir.module.module" def write(self, values): """ Warn the user about updating account if they try...
54.076923
1,406
6,802
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, exceptions, fields, models, _ from odoo.exceptions import UserError, ValidationError from dateutil.relativedelta import relativedelta class AccountPaymentTerm(models.Model): _name = "account.payment.term" _description = "Payment Terms" _order = "sequence, id...
53.140625
6,802
41,715
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models, _ from odoo.osv import expression from odoo.tools.float_utils import float_round as round from odoo.exceptions import UserError, ValidationError import math import logging TYPE_TAX_USE = [ ('sale', 'Sales'), ('purchase', 'Purchases'), ('none',...
54.888158
41,715
303,617
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models, Command, _ from odoo.exceptions import RedirectWarning, UserError, ValidationError, AccessError from odoo.tools import float_compare, float_is_zero, date_utils, email_split, email_re, html_escape, is_html_empty from odoo.tools.misc import formatLang, format...
52.140993
303,617
3,922
py
PYTHON
15.0
# -*- coding: utf-8 -*- from PyPDF2.utils import PdfStreamError, PdfReadError from zlib import error as zlib_error from odoo import models, _ from odoo.exceptions import UserError from odoo.tools import pdf class IrActionsReport(models.Model): _inherit = 'ir.actions.report' def retrieve_attachment(self, rec...
56.028571
3,922
34,156
py
PYTHON
15.0
# -*- coding: utf-8 -*- from datetime import timedelta, datetime, date import calendar from dateutil.relativedelta import relativedelta from odoo.addons.account.models.account_move import MAX_HASH_VERSION from odoo import fields, models, api, _ from odoo.exceptions import ValidationError, UserError, RedirectWarning f...
54.82504
34,156
59,497
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models, Command, tools, _ from odoo.tools import float_compare, float_is_zero from odoo.osv.expression import get_unaccent_wrapper from odoo.exceptions import UserError, ValidationError import re from math import copysign from collections import defaultdict from da...
52.744681
59,496
4,224
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 AccountAnalyticDefault(models.Model): _name = "account.analytic.default" _description = "Analytic Distribution" _rec...
62.117647
4,224
757
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 AccountIncoterms(models.Model): _name = 'account.incoterms' _description = 'Incoterms' name = fields.Char( 'Name', required=True, translate=True, help=...
39.842105
757
29,461
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import time import logging from psycopg2 import sql, DatabaseError from odoo import api, fields, models, _ from odoo.tools import DEFAULT_SERVER_DATETIME_FORMAT from odoo.exceptions import ValidationError, UserError fr...
50.360684
29,461
51,147
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, Command, fields, models, _ from odoo.osv import expression from odoo.exceptions import UserError, ValidationError from odoo.addons.base.models.res_bank import sanitize_account_number from odoo.tools import remove_accents import logging import re import warnings _logger = l...
52.51232
51,147
7,537
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 from odoo.exceptions import UserError class AccountPaymentMethod(models.Model): _name = "account.payment.method" _description = "Payment M...
41.412088
7,537
9,183
py
PYTHON
15.0
# -*- coding: utf-8 -*- import base64 from odoo import api, models, fields, _ from odoo.exceptions import UserError from odoo.tools.image import image_data_uri import werkzeug import werkzeug.exceptions class ResPartnerBank(models.Model): _inherit = 'res.partner.bank' def _build_qr_code_vals(self, amount, f...
54.017647
9,183
38,580
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models, _, tools from odoo.osv import expression from odoo.exceptions import UserError, ValidationError class AccountAccountType(models.Model): _name = "account.account.type" _description = "Account Type" name = fields.Char(string='Account Type', requ...
48.342105
38,577
626
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.exceptions import ValidationError from odoo import api, fields, models, _ class ResPartnerBank(models.Model): _inherit = "res.partner.bank" journal_id = fields.One2many('account.journal', 'bank_account_id', domain=[('type', '=', 'bank')], string='Account Journal', readonly=T...
39.125
626
1,438
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class MailThread(models.AbstractModel): _inherit = 'mail.thread' def _message_post_process_attachments(self, attachments, attachment_ids, message_values): """ This method extensi...
53.259259
1,438
50,078
py
PYTHON
15.0
# -*- coding: utf-8 -*- from lxml import etree from odoo import models, fields, api, Command, _ from odoo.exceptions import UserError, ValidationError class AccountPayment(models.Model): _name = "account.payment" _inherits = {'account.move': 'move_id'} _inherit = ['mail.thread', 'mail.activity.mixin'] ...
48.013423
50,078
29,471
py
PYTHON
15.0
import json from datetime import datetime, timedelta from babel.dates import format_datetime, format_date from odoo import models, api, _, fields from odoo.osv import expression from odoo.release import version from odoo.tools import DEFAULT_SERVER_DATE_FORMAT as DF from odoo.tools.misc import formatLang, format_date ...
47.457327
29,471
3,187
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.exceptions import UserError class ResCurrency(models.Model): _inherit = 'res.currency' display_rounding_warning = fields.Boolean(string="Display Rounding Warni...
48.287879
3,187
13,827
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models, _ from odoo.exceptions import ValidationError from odoo.tools.misc import format_date from odoo.tools import frozendict import re from collections import defaultdict from psycopg2 import sql class SequenceMixin(models.AbstractModel): """Mechanism use...
48.346154
13,827
2,023
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.exceptions import ValidationError class Users(models.Model): _inherit = "res.users" @api.constrains('groups_id') def _check_one_user_type(self): super(User...
47.046512
2,023
9,477
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models, _ from odoo.exceptions import ValidationError from odoo.tools import format_amount ACCOUNT_DOMAIN = "['&', '&', '&', ('deprecated', '=', False), ('internal_type','=','other'), ('company_id', '=', current_company_id), ('is_off_balance', '=', False)]" class...
49.103627
9,477
14,036
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' has_accounting_entries = fields.Boolean(compute='_compute_has_chart_of_accounts') cu...
64.682028
14,036
25,975
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, models class AccountMoveLine(models.Model): _inherit = 'account.move.line' @api.model def _get_query_tax_details_from_domain(self, domain, fallback=True): """ Create the tax details sub-query based on the orm domain passed as parameter. :par...
52.054108
25,975
1,629
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models, _ from odoo.exceptions import ValidationError class AccountAccountTag(models.Model): _name = 'account.account.tag' _description = 'Account Tag' name = fields.Char('Tag Name', required=True) applicability = fields.Selection([('accounts', 'A...
65.16
1,629
23,265
py
PYTHON
15.0
from odoo import api, fields, models, _ from odoo.exceptions import ValidationError from odoo.osv import expression class AccountTaxReport(models.Model): _name = "account.tax.report" _description = 'Account Tax Report' _order = 'country_id, name' name = fields.Char(string="Name", required=True, help=...
54.870283
23,265
1,555
py
PYTHON
15.0
from odoo import api, fields, models, _ from odoo.exceptions import ValidationError class AccountTaxCarryoverLine(models.Model): _name = 'account.tax.carryover.line' _description = 'Tax carryover line' name = fields.Char(required=True) amount = fields.Float(required=True, default=0.0) date = fie...
43.194444
1,555
1,717
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models, _ class AccountFullReconcile(models.Model): _name = "account.full.reconcile" _description = "Full Reconcile" name = fields.Char(string='Number', required=True, copy=False, default=lambda self: self.env['ir.sequence'].next_by_code('account.reco...
46.405405
1,717
97,695
py
PYTHON
15.0
# -*- coding: utf-8 -*- from collections import defaultdict from odoo.exceptions import AccessError from odoo import api, fields, models, _ from odoo import SUPERUSER_ID from odoo.exceptions import UserError, ValidationError from odoo.http import request from odoo.addons.account.models.account_tax import TYPE_TAX_USE...
56.049914
97,695
69,822
py
PYTHON
15.0
# -*- coding: utf-8 -*- import math from odoo import api, fields, models, _ from odoo.tools import float_is_zero from odoo.tools.misc import formatLang, format_date from odoo.exceptions import UserError, ValidationError class AccountCashboxLine(models.Model): """ Cash Box Details """ _name = 'account.cashbo...
53.544479
69,822
26,515
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models, _, Command from odoo.exceptions import UserError, ValidationError from datetime import date class AccountPartialReconcile(models.Model): _name = "account.partial.reconcile" _description = "Partial Reconcile" _rec_name = "id" # ==== Reconc...
48.740809
26,515
2,921
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import models, fields, api, _ from odoo.tools import float_round from odoo.exceptions import ValidationError class AccountCashRounding(models.Model): """ In some countries, we need to be able to make appear on an invoice a rounding line, appearing there only because the ...
54.092593
2,921
6,405
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models, _ from odoo.exceptions import UserError class AccountAnalyticAccount(models.Model): _inherit = 'account.analytic.account' invoice_count = fields.Integer("Invoice Count", compute='_compute_invoice_count') vendor_bill_count = fields.Integer("Ve...
43.869863
6,405
5,724
py
PYTHON
15.0
# -*- coding: utf-8 -*- import time from odoo import api, models, _ from odoo.exceptions import UserError class ReportJournal(models.AbstractModel): _name = 'report.account.report_journal' _description = 'Account Journal Report' def lines(self, target_move, journal_ids, sort_selection, data): if...
47.305785
5,724
7,989
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import models, fields, api from odoo.addons.account.models.account_move import PAYMENT_STATE_SELECTION from functools import lru_cache class AccountInvoiceReport(models.Model): _name = "account.invoice.report" _description = "Invoices Statistics" _auto = False _rec_...
48.418182
7,989
738
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 ReportAccountHashIntegrity(models.AbstractModel): _name = 'report.account.report_hash_integrity' _description = 'Get hash integrity result as PDF.' @api.model ...
33.545455
738
1,217
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 def sitemap_terms(env, rule, qs): if qs and qs.lower() not in '/terms': return use_invoice_terms = env['ir.config_parameter'].sudo().get_param('acc...
40.566667
1,217
6,108
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.portal.controllers.portal import CustomerPortal, pager as portal_pager from odoo.exceptions import AccessError, MissingError from collections import OrderedDict from odoo.http im...
49.258065
6,108
1,597
py
PYTHON
15.0
from odoo import http from odoo.http import request class OnboardingController(http.Controller): @http.route('/account/account_invoice_onboarding', auth='user', type='json') def account_invoice_onboarding(self): """ Returns the `banner` for the account invoice onboarding panel. It can be ...
38.95122
1,597
1,640
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name' : 'Fleet', 'version' : '0.1', 'sequence': 185, 'category': 'Human Resources/Fleet', 'website' : 'https://www.odoo.com/app/fleet', 'summary' : 'Manage your fleet and track car costs', '...
29.818182
1,640
863
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import common, new_test_user class TestFleet(common.TransactionCase): def test_manager_create_vehicle(self): manager = new_test_user(self.env, "test fleet manager", groups="fleet.fleet_group...
39.227273
863
1,679
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import common, new_test_user from odoo import fields class TestFleet(common.TransactionCase): def test_search_renewal(self): """ Should find the car with overdue contract or rene...
37.311111
1,679
517
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 FleetServiceType(models.Model): _name = 'fleet.service.type' _description = 'Fleet Service Type' name = fields.Char(required=True, translate=True) category = field...
34.466667
517
3,432
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 FleetVehicleLogServices(models.Model): _name = 'fleet.vehicle.log.services' _inherit = ['mail.thread', 'mail.activity.mixin'] ...
46.378378
3,432
493
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 FleetVehicleState(models.Model): _name = 'fleet.vehicle.state' _order = 'sequence asc' _description = 'Vehicle Status' name = fields.Char(required=True, translate=...
32.866667
493
3,080
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 FUEL_TYPES = [ ('diesel', 'Diesel'), ('gasoline', 'Gasoline'), ('hybrid', 'Hybrid Diesel'), ('full_hybrid_gasoline', 'Hybrid Gasoline'), ('plug_in_hybrid_dies...
41.066667
3,080
1,145
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 FleetVehicleModelBrand(models.Model): _name = 'fleet.vehicle.model.brand' _description = 'Brand of the vehicle' _order = 'name asc' name = fields.Char('Make',...
34.69697
1,145