size
int64
0
304k
ext
stringclasses
1 value
lang
stringclasses
1 value
branch
stringclasses
1 value
content
stringlengths
0
304k
avg_line_length
float64
0
238
max_line_length
int64
0
304k
1,041
py
PYTHON
15.0
{ "name": "Taiwan - Accounting", "author": "Odoo PS", "version": "1.0", "category": "Accounting/Localizations/Account Charts", "description": """ This is the base module to manage the accounting chart for Taiwan in Odoo. ============================================================================== ...
31.545455
1,041
1,235
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) David Arnold (XOE Solutions). # Author David Arnold (XOE Solutions), dar@xoe.solutions # Co-Authors Juan Pablo Aries (devCO), jpa@devco.co # Hector Ivan Valencia Muñoz (TIX SAS) # ...
33.351351
1,234
255
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, fields class L10nCoDocumentType(models.Model): _inherit = "l10n_latam.identification.type" l10n_co_document_code = fields.Char("Document Code")
31.875
255
941
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 ResPartner(models.Model): _inherit = 'res.partner' @api.constrains('vat', 'country_id', 'l10n_latam_identification_type_id') def check_vat(self): # check_vat is implemente...
47.05
941
775
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': "Website Mail Group", 'summary': "Add a website snippet for the mail groups.", 'description': "", 'version': '1.0', 'depends': ['mail_group', 'website'], 'auto_install': True, 'data'...
29.807692
775
475
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.addons.http_routing.models.ir_http import slug class MailGroup(models.Model): _name = 'mail.group' _inherit = 'mail.group' def action_go_to_website(self): self.ens...
26.388889
475
1,270
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 WebsiteMailGroup(http.Controller): @http.route('/group/is_member', type='json', auth='public', website=True) def...
30.238095
1,270
672
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'IoT Box Homepage', 'category': 'Sales/Point of Sale', 'sequence': 6, 'website': 'https://www.odoo.com/app/point-of-sale-hardware', 'summary': 'A homepage for the IoT Box', 'description'...
28
672
16,769
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json import jinja2 import logging import os from pathlib import Path import socket import subprocess import sys import threading from odoo import http from odoo.http import Response from odoo.modules.module impor...
46.195592
16,769
1,073
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Sales Teams', 'version': '1.1', 'category': 'Sales/Sales', 'summary': 'Sales Teams', 'description': """ Using this application you can manage Sales Teams with CRM and/or Sales =============...
29
1,073
16,610
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import exceptions from odoo.addons.sales_team.tests.common import TestSalesCommon from odoo.tests.common import users from odoo.tools import mute_logger class TestMembership(TestSalesCommon): """Tests to ...
54.459016
16,610
3,645
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import exceptions from odoo.addons.mail.tests.common import mail_new_test_user from odoo.addons.sales_team.tests.common import TestSalesMC from odoo.tests.common import users, TransactionCase from odoo.tools im...
38.368421
3,645
9,033
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import exceptions from odoo.addons.sales_team.tests.common import TestSalesCommon, TestSalesMC from odoo.tests.common import users class TestDefaultTeam(TestSalesCommon): """Tests to check if correct defa...
44.279412
9,033
4,000
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.mail.tests.common import mail_new_test_user from odoo.tests.common import TransactionCase class TestSalesCommon(TransactionCase): @classmethod def setUpClass(cls): super(TestSalesCommo...
38.095238
4,000
17,801
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json import random from babel.dates import format_date from datetime import date from dateutil.relativedelta import relativedelta from odoo import api, fields, models, _ from odoo.exceptions import UserError fro...
45.64359
17,801
10,050
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, exceptions, fields, models, _ class CrmTeamMember(models.Model): _name = 'crm.team.member' _inherit = ['mail.thread'] _description = 'Sales Team Member' _rec_name = 'user_id' _...
51.538462
10,050
535
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from random import randint from odoo import fields, models class Tag(models.Model): _name = "crm.tag" _description = "CRM Tag" def _get_default_color(self): return randint(1, 11) name = field...
25.47619
535
1,599
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 ResUsers(models.Model): _inherit = 'res.users' crm_team_ids = fields.Many2many( 'crm.team', 'crm_team_member', 'user_id', 'crm_team_id', string='Sales Teams',...
45.685714
1,599
364
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 ResPartner(models.Model): _inherit = 'res.partner' team_id = fields.Many2one( 'crm.team', 'Sales Team', help='If set, this Sales Team will be used for sale...
30.333333
364
446
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': "Gift Card", 'summary': "Use gift card", 'description': """Integrate gift card mechanism""", 'category': 'Sales/Sales', 'version': '1.0', 'depends': ['product'], 'data': [ 'd...
26.235294
446
795
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 ProductTemplate(models.Model): _inherit = "product.template" detailed_type = fields.Selection(selection_add=[ ('gift'...
34.565217
795
2,387
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 uuid import uuid4 class GiftCard(models.Model): _name = "gift.card" _description = "Gift Card" _order = 'id desc' _check_company_auto = True @api.model ...
41.155172
2,387
1,027
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Twitter Snippet', 'category': 'Website/Website', 'summary': 'Twitter scroller snippet in website', 'version': '1.0', 'description': """ This module adds a Twitter scroller building block to...
34.233333
1,027
766
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 WebsiteTwitterTweet(models.Model): _name = 'website.twitter.tweet' _description = 'Website Twitter' website_id = fields.Many2one('website', string='Website', ondelete=...
40.315789
766
4,114
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import requests from odoo import api, fields, models, _, _lt from odoo.exceptions import UserError _logger = logging.getLogger(__name__) TWITTER_EXCEPTION = { 304: _lt('There was no new data to ret...
48.97619
4,114
4,056
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json import logging import requests from odoo import api, fields, models API_ENDPOINT = 'https://api.twitter.com' API_VERSION = '1.1' REQUEST_TOKEN_URL = '%s/oauth2/token' % API_ENDPOINT REQUEST_FAVORITE_LIST_UR...
45.573034
4,056
1,885
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json from odoo import _ from odoo import http from odoo.http import request class Twitter(http.Controller): @http.route(['/website_twitter/reload'], type='json', auth="user", website=True) def twitter_re...
44.880952
1,885
3,018
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Main contributor: Nicolas Bessi. Camptocamp SA # Financial contributors: Hasa SA, Open Net SA, # Prisme Solutions Informatique SA, Quod SA # Translation contributors: brain-tec AG, Agile Business...
43.73913
3,018
266
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_ch')
29.555556
266
694
py
PYTHON
15.0
# -*- coding: utf-8 -*- def migrate(cr, version): """ From 12.0, to saas-13.3, l10n_ch_swissqr_template used to inherit from another template. This isn't the case anymore since https://github.com/odoo/odoo/commit/719f087b1b5be5f1f276a0f87670830d073f6ef4 (made in 12.0, and forward-ported). The module w...
34.7
694
503
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, SUPERUSER_ID from odoo.addons.account.models.chart_template import update_taxes_from_templates def migrate(cr, version): new_template_to_tax = update_taxes_from_templates(cr, 'l10n_ch.l10nch_chart_template') if ne...
45.727273
503
4,125
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.tests.common import Form, TransactionCase CH_ISR_ISSUER = '01-162-8' CH_IBAN = 'CH15 3881 5158 3845 3843 7' FR_IBAN = 'FR83 8723 4133 8709 9079 4002 530' CH_POST_IBAN = 'CH09 0900...
35.25641
4,125
3,645
py
PYTHON
15.0
# -*- coding:utf-8 -*- from odoo.tests import tagged from odoo.exceptions import UserError from odoo.addons.account.tests.common import AccountTestInvoicingCommon @tagged('post_install_l10n', 'post_install', '-at_install') class TestSwissQRCode(AccountTestInvoicingCommon): """ Tests the generation of Swiss QR-co...
42.383721
3,645
2,953
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.exceptions import ValidationError @tagged('post_install_l10n', 'post_install', '-at_install') class ISRTest...
41.013889
2,953
4,577
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 QR_IBAN = 'CH21 3080 8001 2345 6782 7' ISR_SUBS_NUMBER = "01-162-8" @tagged('post_install_l10n', 'post_install', '-...
41.990826
4,577
6,488
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import time from odoo.addons.account.tests.common import AccountTestInvoicingCommon from odoo.tests import tagged CH_IBAN = 'CH15 3881 5158 3845 3843 7' QR_IBAN = 'CH21 3080 8001 2345 6782 7' @tagged('post_install_l10...
35.25
6,486
4,521
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import Form, common, tagged from odoo.exceptions import ValidationError CH_ISR_SUBSCRIPTION = "01-162-8" CH_POSTAL = "10-8060-7" CH_IBAN = "CH15 3881 5158 3845 3843 7" ISR_REFERENCE_GOOD = "16 00011 2345...
37.675
4,521
706
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, models class SwissSetupBarBankConfigWizard(models.TransientModel): _inherit = 'account.setup.bank.manual.config' @api.onchange('acc_number') def _onchange_recompute_qr_iban(self): # Needed because ORM doesn't properly call the compute in 'new' mode, ...
44.125
706
1,264
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 pathlib import Path from reportlab.graphics.shapes import Image as ReportLabImage from reportlab.lib.units import mm CH_QR_CROSS_SIZE_RATIO = 0.1522 # Ratio between the side length of...
45.142857
1,264
575
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 from odoo.exceptions import ValidationError from odoo.addons.base_iban.models.res_partner_bank import validate_iban from odoo.addons.base.models.res_bank import sanitize_account_num...
33.823529
575
2,216
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 from odoo import api, models class MailTemplate(models.Model): _inherit = 'mail.template' def generate_email(self, res_ids, fields): """ Method overridden in order to add an attachment c...
47.148936
2,216
19,683
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import re from stdnum.util import clean from odoo import api, fields, models, _ from odoo.addons.base.models.res_bank import sanitize_account_number from odoo.addons.base_iban.models.res_partner_bank import normalize_ib...
51.526178
19,683
17,155
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import re from odoo import models, fields, api, _ from odoo.exceptions import ValidationError, UserError from odoo.tools.float_utils import float_split_str from odoo.tools.misc import mod10r l10n_ch_ISR_NUMBER_LENGTH ...
47.652778
17,155
2,083
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" l10n_ch_isr_preprinted_account = fields.Boolean(string='Preprinted account', compute='_compute_l10n_ch_isr', inverse='_set_l...
71.827586
2,083
999
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' l10n_ch_isr_preprinted_account = fields.Boolean(string='Preprinted account', related="co...
49.95
999
1,139
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, _ from odoo.addons.l10n_ch.models.res_bank import _is_l10n_ch_postal class AccountBankStatementLine(models.Model): _inherit = "account.bank.statement.line" def _find_or_cr...
45.56
1,139
776
py
PYTHON
15.0
# -*- coding:utf-8 -*- from odoo import api, models class ReportSwissQR(models.AbstractModel): _name = 'report.l10n_ch.qr_report_main' _description = 'Swiss QR-bill report' @api.model def _get_report_values(self, docids, data=None): docs = self.env['account.move'].browse(docids) qr_c...
35.272727
776
782
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Purchase and MRP Management', 'version': '1.0', 'category': 'Inventory/Purchase', 'description': """ This module provides facility to the user to install mrp and purchase modules at a time. ==...
31.28
782
3,575
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.fields import Date from odoo.tests import Form, tagged from odoo.tests.common import TransactionCase from odoo.addons.stock_account.tests.test_stockvaluationlayer import TestStockValuationCommon from odoo.addon...
44.6875
3,575
23,426
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests.common import Form, TransactionCase from odoo.tests import tagged from odoo import fields @tagged('post_install', '-at_install') class TestSaleMrpFlow(TransactionCase): def setUp(self): sup...
41.906977
23,426
3,904
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.tools import OrderedSet class PurchaseOrder(models.Model): _inherit = 'purchase.order' mrp_production_count = fields.Integ...
45.395349
3,904
2,018
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 from odoo.exceptions import UserError class StockMove(models.Model): _inherit = 'stock.move' def _prepare_phantom_move_values(self, b...
63.0625
2,018
1,999
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 MrpProduction(models.Model): _inherit = 'mrp.production' purchase_order_count = fields.Integer( "Count of generated PO", compute='_compute_purchase...
44.422222
1,999
660
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'PayuMoney Payment Acquirer', 'version': '2.0', 'category': 'Accounting/Payment Acquirers', 'sequence': 375, 'summary': 'Payment Acquirer: PayuMoney Implementation', 'description': """ PayuMoney Payment Acquire...
28.695652
660
2,262
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import tagged from odoo.tools import mute_logger from .common import PayumoneyCommon from ..controllers.main import PayUMoneyController from odoo.addons.payment import utils as payment_utils @tagged('post_install', '-at_insta...
40.392857
2,262
614
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.payment.tests.common import PaymentCommon class PayumoneyCommon(PaymentCommon): @classmethod def setUpClass(cls, chart_template_ref=None): super().setUpClass(chart_template_ref=chart_template_ref) cls...
34.111111
614
4,415
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from werkzeug import urls from odoo import _, api, models from odoo.exceptions import ValidationError from odoo.addons.payment import utils as payment_utils from odoo.addons.payment_payumoney.controllers.main import PayUMoneyController clas...
38.72807
4,415
432
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, models class AccountPaymentMethod(models.Model): _inherit = 'account.payment.method' @api.model def _get_payment_method_information(self): res = super()._get_payment_method_in...
30.857143
432
2,529
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import hashlib from odoo import api, fields, models class PaymentAcquirer(models.Model): _inherit = 'payment.acquirer' provider = fields.Selection( selection_add=[('payumoney', "PayUmoney")], ondelete={'payumoney': 'set defa...
44.368421
2,529
1,523
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import pprint from odoo import http from odoo.http import request _logger = logging.getLogger(__name__) class PayUMoneyController(http.Controller): _return_url = '/payment/payumoney/return' @http.route( _retu...
44.794118
1,523
582
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Website Event CRM Questions', 'version': '1.0', 'category': 'Marketing/Events', 'website': 'https://www.odoo.com/app/events', 'description': """ Add information when we build the de...
32.333333
582
1,266
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, _ class EventRegistration(models.Model): _inherit = 'event.registration' def _get_lead_description_registration(self, line_suffix=''): """Add the questions and answers linked t...
48.692308
1,266
888
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': "Product Matrix", 'summary': """ Technical module: Matrix Implementation """, 'description': """ Please refer to Sale Matrix or Purchase Matrix for the use of this module. """, 'ca...
28.645161
888
1,863
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import tagged, common @tagged('post_install', '-at_install') class TestMatrixCommon(common.HttpCase): def setUp(self): super(TestMatrixCommon, self).setUp() # Prepare relevant test ...
36.529412
1,863
3,466
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import itertools from odoo import models, fields class ProductTemplate(models.Model): _inherit = 'product.template' def _get_template_matrix(self, **kwargs): self.ensure_one() company_id = kwar...
40.752941
3,464
477
py
PYTHON
15.0
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Saudi Arabia - Invoice', 'version': '1.0.0', 'author': 'Odoo S.A.', 'category': 'Accounting/Localizations', 'license': 'LGPL-3', 'description': """ Invoices for the Kingdom of Saud...
28.058824
477
3,394
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 from odoo import api, fields, models, _ from odoo.exceptions import UserError from odoo.tools import float_repr class AccountMove(models.Model): _inherit = 'account.move' l10n_sa_delivery_date = ...
57.525424
3,394
2,159
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Canada - Accounting', 'author': 'Savoir-faire Linux', 'website': 'https://www.savoirfairelinux.com', 'category': 'Accounting/Localizations/Account Charts', 'description': """ This is the mo...
35.983333
2,159
484
py
PYTHON
15.0
# coding: utf-8 from odoo import models, fields class ResCompany(models.Model): _inherit = 'res.company' l10n_ca_pst = fields.Char(related='partner_id.l10n_ca_pst', string='PST', store=False) class BaseDocumentLayout(models.TransientModel): _inherit = 'base.document.layout' l10n_ca_pst = fields.C...
30.25
484
157
py
PYTHON
15.0
# coding: utf-8 from odoo import api, fields, models, _ class ResPartner(models.Model): _inherit = 'res.partner' l10n_ca_pst = fields.Char('PST')
19.625
157
1,159
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Italy - Accounting', 'version': '0.3', 'depends': [ 'account', 'base_iban', 'base_vat', ], 'author': 'OpenERP Italian Community', 'description': """ Piano dei co...
30.5
1,159
739
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, SUPERUSER_ID def migrate(cr, version): cr.execute(""" INSERT INTO account_account_account_tag SELECT DISTINCT account.id, template_tag.account_account_tag_id FROM account_account_template AS template JOIN account_account AS account ...
41.055556
739
2,446
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 AccountTaxReportLine(models.AbstractModel): _inherit = "account.tax.report.line" carry_over_condition_method = fields.Selection( selection_add=[ ('v...
40.766667
2,446
560
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Gauge Widget for Kanban', 'category': 'Hidden', 'description': """ This widget allows to display gauges using d3 library. """, 'version': '1.0', 'depends': ['web'], 'assets' : { ...
25.454545
560
666
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Argentinean eCommerce', 'version': '1.0', 'category': 'Accounting/Localizations/Website', 'sequence': 14, 'author': 'Odoo, ADHOC SA', 'description': """Be able to see Identification Type and AFIP Responsibility...
27.75
666
549
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import _, api, models from odoo.exceptions import ValidationError class View(models.Model): _inherit = 'ir.ui.view' @api.constrains('active', 'key', 'website_id') def _check_active(self): for record in self: if record.key == 'website_sale.address_b2b'...
39.214286
549
3,640
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _ from odoo.addons.website_sale.controllers.main import WebsiteSale from odoo.http import request class L10nARWebsiteSale(WebsiteSale): def _get_mandatory_fields_billing(self, country_id=False): """Extend mandator...
61.694915
3,640
2,239
py
PYTHON
15.0
# -*- coding: utf-8 -*- { 'name': 'Events Organization', 'version': '1.6', 'website': 'https://www.odoo.com/app/events', 'category': 'Marketing/Events', 'summary': 'Trainings, Conferences, Meetings, Exhibitions, Registrations', 'description': """ Organization and management of Events. ==========...
33.41791
2,239
16,400
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime from dateutil.relativedelta import relativedelta from freezegun import freeze_time from odoo.addons.event.tests.common import TestEventCommon from odoo.addons.mail.tests.common import MockE...
59.636364
16,400
6,443
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import datetime from dateutil.relativedelta import relativedelta from odoo.addons.event.tests.common import TestEventCommon from odoo.exceptions import ValidationError from odoo.tests.common import Form from odoo.tools...
48.810606
6,443
4,853
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import datetime, timedelta from odoo import fields from odoo.addons.mail.tests.common import mail_new_test_user from odoo.tests import common class TestEventCommon(common.TransactionCase): @classmet...
43.720721
4,853
30,568
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import date, datetime, timedelta from unittest.mock import patch from odoo import Command from odoo.addons.event.tests.common import TestEventCommon from odoo import exceptions from odoo.fields import Date...
45.152142
30,568
14,340
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import random import threading from datetime import datetime from dateutil.relativedelta import relativedelta from odoo import api, fields, models, tools from odoo.tools import exception_to_unicode from ...
45.52381
14,340
1,440
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 EventStage(models.Model): _name = 'event.stage' _description = 'Event Stage' _order = 'sequence, name' name = fields.Char(string='Stage Name', required=True, tr...
53.333333
1,440
16,102
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from dateutil.relativedelta import relativedelta from odoo import _, api, fields, models, SUPERUSER_ID from odoo.tools import format_datetime from odoo.exceptions import AccessError, ValidationError class EventRegistr...
46.137536
16,102
1,003
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.osv import expression class MailTemplate(models.Model): _inherit = 'mail.template' @api.model def _name_search(self, name, args=None, operator='ilike', limit=100, nam...
45.590909
1,003
29,959
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import pytz from odoo import _, api, Command, fields, models from odoo.addons.base.models.res_partner import _tz_get from odoo.tools import format_datetime, is_html_empty from odoo.exceptions import Valid...
48.555916
29,959
1,384
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' module_event_sale = fields.Boolean("Tickets") module_website_event_meet = fields.Boolea...
47.724138
1,384
1,129
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 api, fields, models class EventTagCategory(models.Model): _name = "event.tag.category" _description = "Event Tag Category" _order = "sequence" name = fields...
36.419355
1,129
874
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 ResPartner(models.Model): _inherit = 'res.partner' event_count = fields.Integer( '# Events', compute='_compute_event_count', groups='event.group_event_registration...
38
874
7,887
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, UserError class EventTemplateTicket(models.Model): _name = 'event.type.ticket' _description = 'Event Template Ticket' # ...
48.987578
7,887
976
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from werkzeug.exceptions import NotFound from odoo.http import Controller, request, route, content_disposition class EventController(Controller): @route(['''/event/<model("event.event"):event>/ics'''], type='http...
39.04
976
1,716
py
PYTHON
15.0
# -*- coding: utf-8 -*- { 'name': "Snail Mail", 'description': """ Allows users to send documents by post ===================================================== """, 'category': 'Hidden/Tools', 'version': '0.3', 'depends': [ 'iap_mail', 'mail' ], 'data': [ 'dat...
33
1,716
6,184
py
PYTHON
15.0
SNAILMAIL_COUNTRIES = { "AC": "Ascension", "AD": "Andorra", "AE": "United Arab Emirates", "AF": "Afghanistan", "AG": "Antigua and Barbuda", "AI": "Anguilla", "AL": "Albania", "AM": "Armenia", "AN": "Netherlands Antilles", "AO": "Angola", "AQ": "Antarctica", "AR": "Argenti...
24.15625
6,184
5,548
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 from odoo.exceptions import AccessError from odoo.tests import TransactionCase class testAttachmentAccess(TransactionCase): @classmethod def setUpClass(cls): super().setUpClass() c...
53.346154
5,548
1,903
py
PYTHON
15.0
from odoo import _, api, fields, models class SnailmailLetterMissingRequiredFields(models.TransientModel): _name = 'snailmail.letter.missing.required.fields' _description = 'Update address of partner' partner_id = fields.Many2one('res.partner') letter_id = fields.Many2one('snailmail.letter') str...
36.596154
1,903
1,491
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 SnailmailConfirm(models.AbstractModel): _name = 'snailmail.confirm' _description = 'Snailmail Confirm' model_name = fields.Char() @api.model def show_...
29.82
1,491
1,069
py
PYTHON
15.0
from odoo import _, api, fields, models class SnailmailLetterCancel(models.TransientModel): _name = 'snailmail.letter.cancel' _description = 'Dismiss notification for resend by model' model = fields.Char(string='Model') help_message = fields.Char(string='Help message', compute='_compute_help_message'...
41.115385
1,069
1,056
py
PYTHON
15.0
from odoo import api, fields, models class SnailmailLetterFormatError(models.TransientModel): _name = 'snailmail.letter.format.error' _description = 'Format Error Sending a Snailmail Letter' message_id = fields.Many2one( 'mail.message', default=lambda self: self.env.context.get('message_i...
35.2
1,056
719
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import fields, models class Notification(models.Model): _inherit = 'mail.notification' notification_type = fields.Selection(selection_add=[('snail', 'Snailmail')], ondelete={'snail': 'cascade'}) letter_id = fields.Many2one('snailmail.letter', string="Snailmail Letter", ...
39.944444
719