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
21,089
py
PYTHON
15.0
# -*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import zipfile import io import re import logging import email import email.policy import dateutil import pytz from lxml import etree from datetime import datetime from xmlrpc import client as xmlrpclib from odoo import...
48.589862
21,088
42,636
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.tests.common import Form from odoo.exceptions import UserError from odoo.addons.l10n_it_edi.tools.remove_signature import remove_signature from odoo.osv.expression import ...
54.943299
42,636
22,972
py
PYTHON
15.0
# -*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import zipfile import io import logging import re from datetime import date, datetime from lxml import etree from odoo import api, fields, models, _ from odoo.tools import float_repr, float_compare from od...
49.852174
22,932
6,660
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 TAX_SYSTEM = [ ("RF01", "[RF01] Ordinario"), ("RF02", "[RF02] Contribuenti minimi (art.1, c.96-117, L. 244/07)"), ("RF04", "...
56.347458
6,649
2,351
py
PYTHON
15.0
# -*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from stdnum.it import codicefiscale, iva from odoo import api, fields, models, _ from odoo.exceptions import UserError import re class ResPartner(models.Model): _name = 'res.partner' _inherit = 'res.partner' ...
46.098039
2,351
567
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Event Attendees SMS Marketing', 'category': 'Hidden', 'version': '1.0', 'description': """ SMS Marketing on event attendees ================================ Bridge module adding UX req...
22.68
567
828
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class Event(models.Model): _inherit = "event.event" def action_mass_mailing_attendees(self): # Minimal override: set form view being the one mixing sms and mail (not prioritized...
41.4
828
2,069
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Indian - Accounting', 'version': '2.0', 'description': """ Indian Accounting: Chart of Account. ==================================== Indian accounting chart and localization. Odoo allows to manag...
36.946429
2,069
265
py
PYTHON
15.0
# -*- coding: utf-8 -*- import odoo def migrate(cr, version): registry = odoo.registry(cr.dbname) from odoo.addons.account.models.chart_template import migrate_set_tags_and_taxes_updatable migrate_set_tags_and_taxes_updatable(cr, registry, 'l10n_in')
33.125
265
292
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 CountryState(models.Model): _inherit = 'res.country.state' l10n_in_tin = fields.Char('TIN Number', size=2, help="TIN number-first two digits")
29.2
292
473
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 ProductTemplate(models.Model): _inherit = 'product.template' l10n_in_hsn_code = fields.Char(string="HSN/SAC Code", help="Harmonized System Nomenclature/Services Accounting...
43
473
7,493
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, RedirectWarning class AccountMove(models.Model): _inherit = "account.move" amount_total_words = fields.Char("Total (In Words...
54.693431
7,493
340
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 UoM(models.Model): _inherit = "uom.uom" # As per GST Rules you need to Specify UQC given by GST. l10n_in_code = fields.Char("Indian GST UQC", help="Unique Quantity Cod...
30.909091
340
626
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 L10nInPortCode(models.Model): """Port code must be mentioned in export and import of goods under GST.""" _name = 'l10n_in.port.code' _description = "Indian port code" ...
32.947368
626
355
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' group_l10n_in_reseller = fields.Boolean(implied_group='l10n_in.group_l10n_in_reseller', str...
35.5
355
2,178
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, _ TEST_GST_NUMBER = "36AABCT1332L011" class ResPartner(models.Model): _inherit = 'res.partner' l10n_in_gst_treatment = fields.Selection([ ('regular', 'Register...
38.210526
2,178
1,715
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 AccountChartTemplate(models.Model): _inherit = 'account.chart.template' def _prepare_all_journals(self, acc_template_ref, company, journals_dict=None): res...
45.131579
1,715
2,758
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 import tools class AccountJournal(models.Model): _inherit = "account.journal" # Use for filter import and export ty...
46.745763
2,758
9,393
py
PYTHON
15.0
# -*- coding:utf-8 -*- #az Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, tools class L10nInPaymentReport(models.AbstractModel): _name = "l10n_in.payment.report" _description = "Indian accounting payment report" account_move_id = fields.Man...
47.923469
9,393
4,276
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 class L10nInExemptedReport(models.Model): _name = "l10n_in.exempted.report" _description = "Exempted Gst Supplied Statistics" _auto = False account_move_id =...
45.010526
4,276
6,653
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 class L10nInProductHsnReport(models.Model): _name = "l10n_in.product.hsn.report" _description = "Product HSN Statistics" _auto = False _order = 'date desc' ...
59.401786
6,653
16,526
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 class L10nInAccountInvoiceReport(models.Model): _name = "l10n_in.account.invoice.report" _description = "Account Invoice Statistics" _auto = False _order = 'd...
50.078788
16,526
681
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'CRM Livechat', 'category': 'Sales/CRM', 'summary': 'Create lead from livechat conversation', 'data': [ 'data/utm_data.xml', ], 'depends': [ 'crm', 'im_livechat' ...
26.192308
681
3,951
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.addons.mail.tests.common import mail_new_test_user from odoo.tests.common import users class TestLivechatLead(TestCrmCommon): @classmethod def s...
42.031915
3,951
2,366
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 import html2plaintext, html_escape class MailChannel(models.Model): _inherit = 'mail.channel' def execute_command_lead(self, **kwargs): partner = self.env.use...
47.32
2,366
1,209
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Skills Management', 'category': 'Human Resources/Employees', 'sequence': 270, 'version': '1.0', 'summary': 'Manage skills, knowledge and resumé of your employees', 'description': ...
27.409091
1,206
661
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 User(models.Model): _inherit = ['res.users'] resume_line_ids = fields.One2many(related='employee_id.resume_line_ids', readonly=False) employee_skill_ids = fields.One2ma...
36.722222
661
2,385
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 Employee(models.Model): _inherit = 'hr.employee' resume_line_ids = fields.One2many('hr.resume.line', 'employee_id', string="Resumé lines") employee_skill_ids = fi...
37.793651
2,381
2,430
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 Skill(models.Model): _name = 'hr.skill' _description = "Skill" name = fields.Char(required=True) skill_type_id ...
39.836066
2,430
1,254
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Employee Contracts', 'version': '1.0', 'category': 'Human Resources/Contracts', 'sequence': 335, 'description': """ Add all information on the employee form to manage contracts. ===========...
29.162791
1,254
3,267
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.fields import Datetime, Date from odoo.addons.hr_contract.tests.common import TestContractCommon class TestContractCalendars(TestContractCommon): @classmethod def setUpClass(cls): super(TestC...
47.347826
3,267
4,617
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, date from odoo.exceptions import ValidationError from odoo.addons.hr_contract.tests.common import TestContractCommon class TestHrContracts(TestContractCommon): @classmethod def s...
44.825243
4,617
467
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 class TestContractCommon(TransactionCase): @classmethod def setUpClass(cls): super(TestContractCommon, cls).setUpClass() cls.employee = cls.env['h...
27.470588
467
2,930
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import date, datetime from dateutil.relativedelta import relativedelta from odoo.addons.hr_contract.tests.common import TestContractCommon class TestHrContracts(TestContractCommon): @classmethod ...
42.463768
2,930
1,161
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, _ from odoo.exceptions import UserError class HrDepartureWizard(models.TransientModel): _inherit = 'hr.departure.wizard' set_date_end = fields.Boolean(string="Set Contract End ...
46.44
1,161
740
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 ContractType(models.Model): _name = 'hr.contract.type' _description = 'Contract Type' name = fields.Char(required=True) class HrPayrollStructureType(models.Model): ...
35.238095
740
316
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 HrEmployeePublic(models.Model): _inherit = "hr.employee.public" first_contract_date = fields.Date(related='employee_id.first_contract_date', groups="base.group_user")
31.6
316
1,920
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 fields, models from odoo.osv.expression import AND class ResourceCalendar(models.Model): _inherit = 'resource.calendar' contracts_count = fields.Integer("# Contra...
42.666667
1,920
5,210
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.osv import expression class Employee(models.Model): _inherit = "hr.employee" vehicle = fields.Char(string='Company Vehicle', groups="hr....
49.150943
5,210
460
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 User(models.Model): _inherit = ['res.users'] vehicle = fields.Char(related="employee_id.vehicle") bank_account_id = fields.Many2one(related="employee_id.bank_a...
30.666667
460
13,706
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import threading from datetime import date from dateutil.relativedelta import relativedelta from odoo import api, fields, models, _ from odoo.exceptions import ValidationError from odoo.osv import expression import l...
48.431095
13,706
7,313
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, tools, _ from collections import defaultdict class ContractHistory(models.Model): _name = 'hr.contract.history' _description = 'Contract history' _auto = False _ord...
52.992754
7,313
561
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'MTO Sale <-> Purchase', 'version': '1.0', 'category': 'Hidden', 'summary': 'SO/PO relation in case of MTO', 'description': """ Add relation information between Sale Orders and Purchase Orde...
31.166667
561
2,621
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import tagged from odoo.addons.sale_purchase.tests.common import TestCommonSalePurchaseNoChart @tagged('post_install', '-at_install') class TestAccessRights(TestCommonSalePurchaseNoChart): @classme...
34.486842
2,621
1,386
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, Form class TestSalePurchaseStockFlow(TransactionCase): def test_cancel_so_with_draft_po(self): """ Sell a MTO+Buy product -> a PO is generated ...
32.232558
1,386
726
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 SaleOrder(models.Model): _inherit = 'sale.order' @api.depends('procurement_group_id.stock_move_ids.created_purchase_line_id.order_id', 'procurement_group_id.stock_move_ids.mo...
48.4
726
620
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 PurchaseOrder(models.Model): _inherit = 'purchase.order' @api.depends('order_line.move_dest_ids.group_id.sale_id', 'order_line.move_ids.move_dest_ids.group_id.sale_id') d...
41.333333
620
1,030
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'WMS Landed Costs', 'version': '1.1', 'summary': 'Landed Costs', 'description': """ Landed Costs Management ======================= This module allows you to easily add extra costs on pickings a...
33.225806
1,030
22,881
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.tests import Form, tagged from odoo.addons.stock_landed_costs.tests.common import TestStockLandedCostsCommon class T...
42.688433
22,881
2,776
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.addons.stock_account.tests.test_anglo_saxon_valuation_reconciliation_common import ValuationReconciliationTestCommon class TestStockLandedCostsCommon(ValuationReconciliationTestCommon): @classmethod def setUpClass(cls, chart_template_ref=None): super().setUpClass(ch...
47.862069
2,776
22,434
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import unittest from odoo.addons.stock_landed_costs.tests.common import TestStockLandedCostsCommon from odoo.addons.stock_landed_costs.tests.test_stockvaluationlayer import TestStockValuationLCCommon from odoo.addons.stoc...
53.287411
22,434
12,700
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.stock_landed_costs.tests.common import TestStockLandedCostsCommon from odoo.tests import tagged, Form @tagged('post_install', '-at_install') class TestStockLandedCostsRounding(TestStockLandedCostsCommo...
44.250871
12,700
10,488
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.stock_landed_costs.tests.common import TestStockLandedCostsCommon from odoo.exceptions import ValidationError from odoo.tests import tagged from odoo import fields @tagged('post_install', '-at_install'...
49.471698
10,488
328
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 StockValuationLayer(models.Model): """Stock Valuation Layer""" _inherit = 'stock.valuation.layer' stock_landed_cost_id = fields.Many2one('stock.landed.cost', 'Landed ...
25.230769
328
3,746
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 AccountMove(models.Model): _inherit = 'account.move' landed_costs_ids = fields.One2many('stock.landed.cost', 'vendor_bill_id', string='Landed Costs') landed_costs...
48.649351
3,746
311
py
PYTHON
15.0
from odoo import api,models class PurchaseOrderLine(models.Model): _inherit = 'purchase.order.line' def _prepare_account_move_line(self, move=False): res = super()._prepare_account_move_line(move) res.update({'is_landed_costs_line': self.product_id.landed_cost_ok}) return res
34.555556
311
252
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 ResCompany(models.Model): _inherit = 'res.company' lc_journal_id = fields.Many2one('account.journal')
22.909091
252
1,276
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.addons.stock_landed_costs.models.stock_landed_cost import SPLIT_METHOD from odoo.exceptions import UserError class ProductTemplate(models.Model): _inherit = "product.tem...
55.478261
1,276
354
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' lc_journal_id = fields.Many2one('account.journal', string='Default Journal', related='company_id...
32.181818
354
22,839
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, tools, _ from odoo.exceptions import UserError from odoo.tools.float_utils import float_is_zero SPLIT_METHOD = [ ('equal', 'Equal'), ('...
48.905782
22,839
3,061
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. ############################################################################## # # l10n_cr_account # First author: Carlos Vásquez <carlos.vasquez@clearcorp.co.cr> (ClearCorp S.A.) # Copyright (c) 2010-TODAY Clea...
44.347826
3,060
665
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'UTM Trackers', 'category': 'Hidden', 'description': """ Enable management of UTM trackers: campaign, medium, source. """, 'version': '1.1', 'depends': ['base', 'web'], 'data': [ ...
23.75
665
505
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 TestRoutes(odoo.tests.HttpCase): def test_01_web_session_destroy(self): base_url = self.env['ir.config_parameter'].sudo().get_param...
36.071429
505
1,081
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo.http import request from odoo import models class IrHttp(models.AbstractModel): _inherit = 'ir.http' @classmethod def get_utm_domain_cookies(cls): return request.httprequest.host @classmethod def _set_utm(cls, response): if isinstance(response, E...
30.885714
1,081
3,198
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.http import request class UtmMixin(models.AbstractModel): """ Mixin class for objects which can be tracked by marketing. """ _name = 'utm.mixin' _description =...
52.42623
3,198
2,655
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, api, SUPERUSER_ID class UtmStage(models.Model): """Stage for utm campaigns. """ _name = 'utm.stage' _description = 'Campaign Stage' _order =...
33.1875
2,655
1,114
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Initial Setup Tools', 'version': '1.0', 'category': 'Hidden', 'description': """ This module helps to configure the system at the installation of a new database. ================================...
30.944444
1,114
4,232
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.tests.common import TransactionCase def just_raise(*args): raise Exception("We should not be here.") class TestResConfig(TransactionCase): def setUp(self): s...
44.083333
4,232
1,721
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests.common import HttpCase, tagged import re @tagged('-standard', 'external', 'post_install', '-at_install') # nightly is not a real tag class TestResConfigDocLinks(HttpCase): """ Parse the 'res_con...
30.192982
1,721
491
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' def session_info(self): result = super(IrHttp, self).session_info() if request.env....
35.071429
491
895
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 ResUsers(models.Model): _inherit = 'res.users' @api.model def web_create_users(self, emails): # Reactivate already existing users if needed deactivated_u...
35.8
895
6,517
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 ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' company_id = fields.Many2one('res.company', strin...
51.314961
6,517
2,136
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.exceptions import AccessError from odoo.http import request class BaseSetup(http.Controller): @http.route('/base_setup/data', type='json', auth='user') def base_setup_data(sel...
36.20339
2,136
535
py
PYTHON
15.0
# -*- coding: utf-8 -*- { 'name': "mail_bot_hr", 'summary': """Bridge module between hr and mailbot.""", 'description': """This module adds the OdooBot state and notifications in the user form modified by hr.""", 'website': "https://www.odoo.com/app/discuss", 'category': 'Productivity/Discuss', ...
31.470588
535
1,212
py
PYTHON
15.0
{ 'name': 'Two-Factor Authentication (TOTP)', 'description': """ Two-Factor Authentication (TOTP) ================================ Allows users to configure two-factor authentication on their user account for extra security, using time-based one-time passwords (TOTP). Once enabled, the user will need to enter ...
32.756757
1,212
4,211
py
PYTHON
15.0
import json import time from xmlrpc.client import Fault from passlib.totp import TOTP from odoo import http from odoo.exceptions import AccessDenied from odoo.service import common as auth, model from odoo.tests import tagged, HttpCase, get_db_name from ..controllers.home import Home @tagged('post_install', '-at_in...
36.617391
4,211
2,922
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import functools import io import qrcode import re import werkzeug.urls from odoo import _, api, fields, models from odoo.addons.base.models.res_users import check_identity from odoo.exceptions import User...
39.486486
2,922
2,026
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import hmac import struct import time # 160 bits, as recommended by HOTP RFC 4226, section 4, R6. # Google Auth uses 80 bits by default but supports 160. TOTP_SECRET_SIZE = 160 # The algorithm (and key URI format) allo...
36.178571
2,026
373
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import models from odoo.http import request class IrHttp(models.AbstractModel): _inherit = 'ir.http' def session_info(self): info = super().session_info() # because frontend session_info uses this key and is embedded in # the view source info["...
28.692308
373
838
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, models from odoo.addons.auth_totp.controllers.home import TRUSTED_DEVICE_AGE import logging _logger = logging.getLogger(__name__) class AuthTotpDevice(models.Model): # init is overriden in res.users.apikeys to create a secret column 'key' # use a different model...
32.230769
838
5,583
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import functools import logging import os import re from odoo import _, api, fields, models from odoo.addons.base.models.res_users import check_identity from odoo.exceptions import AccessDenied, UserError ...
36.97351
5,583
2,960
py
PYTHON
15.0
# -*- coding: utf-8 -*- import re import odoo.addons.web.controllers.main from odoo import http, _ from odoo.exceptions import AccessDenied from odoo.http import request TRUSTED_DEVICE_COOKIE = 'td_id' TRUSTED_DEVICE_AGE = 90*86400 # 90 days expiration class Home(odoo.addons.web.controllers.main.Home): @http.ro...
41.111111
2,960
24,640
py
PYTHON
15.0
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import argparse import logging import os import pexpect import shutil import signal import subprocess import sys import tempfile import time import traceback from xmlrpc import client as xmlrpclib ...
42.191781
24,640
12,566
py
PYTHON
15.0
#!/usr/bin/env python """ Checks versions from the requirements files against distribution-provided versions, taking distribution's Python version in account e.g. if checking against a release which bundles Python 3.5, checks the 3.5 version of requirements. * only shows requirements for which at least one release div...
33.331565
12,566
1,731
py
PYTHON
15.0
# WSGI Handler sample configuration file. # # Change the appropriate settings below, in order to provide the parameters # that would normally be passed in the command-line. # (at least conf['addons_path']) # # For generic wsgi handlers a global application is defined. # For uwsgi this should work: # $ uwsgi_python --...
32.660377
1,731
1,501
py
PYTHON
15.0
#!/usr/bin/python # # Runme From the repo toplevel directory # from __future__ import print_function import subprocess import glob import re import pprint cla_glob = "doc/cla/*/*.md" cla = ''.join(open(f).read() for f in glob.glob(cla_glob)) cla = cla.lower() def cla_signed(email): if re.match('.*(odoo|openerp|t...
25.440678
1,501
725
py
PYTHON
15.0
# Copyright 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre # Copyright 2016 Sodexis # Copyright 2018 bloopark systems (<http://bloopark.de>) # Copyright 2019 Tecnativa - Cristina Martin R. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Scheduler Error Mailer", "versio...
38.105263
724
1,649
py
PYTHON
15.0
# Copyright 2012-2013 Akretion Sébastien BEAU,David Beal,Alexis de Lattre # Copyright 2016 Sodexis # Copyright 2018 bloopark systems (<http://bloopark.de>) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import logging from odoo import _, api, fields, models from odoo.exceptions import UserError _log...
33.632653
1,648
1,878
py
PYTHON
15.0
# Copyright (C) 2021 - Today: GRAP (http://www.grap.coop) # @author: Sylvain LE GAL (https://twitter.com/legalsylvain) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import logging from odoo import modules from odoo.tools import config _logger = logging.getLogger(__name__) _original_load_inform...
29.809524
1,878
617
py
PYTHON
15.0
# Copyright (C) 2021 - Today: GRAP (http://www.grap.coop) # @author: Sylvain LE GAL (https://twitter.com/legalsylvain) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Change auto installable modules", "summary": "Customize auto installables modules by configuration", "versio...
36.294118
617
510
py
PYTHON
15.0
# © 2013 Therp BV # © 2014 ACSONE SA/NV # Copyright 2018 Quartile Limited # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "dbfilter_from_header", "summary": "Filter databases with HTTP headers", "version": "15.0.1.0.0", "website": "https://github.com/OCA/server-tools", ...
29.882353
508
792
py
PYTHON
15.0
# © 2013 Therp BV # © 2014 ACSONE SA/NV # Copyright 2018 Quartile Limited # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import logging import re from odoo import http from odoo.tools import config db_filter_org = http.db_filter def db_filter(dbs, httprequest=None): dbs = db_filter_org(...
27.241379
790
581
py
PYTHON
15.0
# Copyright 2019-2022 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) { "name": "Conditional Images", "summary": "This module extends the functionality to support conditional images", "version": "15.0.1.0.0", "author": "Camptocamp, Odoo Community Association (OCA)", ...
29.05
581
1,003
py
PYTHON
15.0
# Copyright 2022 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) from odoo import fields, models class ConditionalImage(models.Model): _name = "conditional.image" _description = "Conditional Image" _inherit = ["image.mixin"] name = fields.Char(required=True) mod...
37.148148
1,003
2,633
py
PYTHON
15.0
# Copyright 2022 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html) from odoo import fields, models from odoo.tools.safe_eval import safe_eval class ConditionalImageConsumerMixin(models.AbstractModel): _name = "conditional.image.consumer.mixin" _description = "Mixin for conditi...
39.298507
2,633
503
py
PYTHON
15.0
# Copyright (C) 2019-Today: GRAP (<http://www.grap.coop/>) # @author: Sylvain LE GAL (https://twitter.com/legalsylvain) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import SUPERUSER_ID, api def analyse_installed_modules(cr, registry): env = api.Environment(cr, SUPERUSER_ID, {}) ...
38.692308
503
1,167
py
PYTHON
15.0
# Copyright (C) 2019-Today: GRAP (<http://www.grap.coop/>) # @author: Sylvain LE GAL (https://twitter.com/legalsylvain) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Module Analysis", "summary": "Add analysis tools regarding installed modules" " to know which installed mod...
35.363636
1,167
1,639
py
PYTHON
15.0
# Copyright (C) 2019-Today: GRAP (<http://www.grap.coop/>) # @author: Sylvain LE GAL (https://twitter.com/legalsylvain) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.tests.common import TransactionCase, tagged @tagged("-at_install", "post_install") class TestModule(TransactionCase): ...
39.97561
1,639
6,437
py
PYTHON
15.0
# Copyright (C) 2019-Today: GRAP (<http://www.grap.coop/>) # @author: Sylvain LE GAL (https://twitter.com/legalsylvain) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import logging import os from pathlib import Path from pygount import SourceAnalysis from odoo import api, fields, models from o...
35.174863
6,437
947
py
PYTHON
15.0
# Copyright (C) 2019-Today: GRAP (<http://www.grap.coop/>) # @author: Sylvain LE GAL (https://twitter.com/legalsylvain) # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo import api, fields, models class IrModuleType(models.Model): _name = "ir.module.type" _description = "Modules ...
31.566667
947