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
5,004
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.website.tools import MockRequest from odoo.addons.sale.tests.test_sale_product_attribute_value_config import TestSaleProductAttributeValueCommon from odoo.tests import tagged @tagged('post_install', '-...
47.207547
5,004
2,753
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, api, fields from odoo.tools.translate import _ class SaleOrder(models.Model): _inherit = 'sale.order' warning_stock = fields.Char('Warning') def _cart_update(self, product_id=None...
45.131148
2,753
2,463
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.tools.translate import html_translate class ProductTemplate(models.Model): _inherit = 'product.template' allow_out_of_stock_order = fields.Boolean(string='Continue sell...
49.26
2,463
677
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.website.models import ir_http class ProductProduct(models.Model): _inherit = 'product.product' cart_qty = fields.Integer(compute='_compute_cart_qty') def _...
33.85
677
467
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, api, fields from odoo.tools.translate import _ class StockPicking(models.Model): _inherit = 'stock.picking' website_id = fields.Many2one('website', related='sale_id.website_id', string...
33.357143
467
1,893
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, api class ResConfigSettings(models.TransientModel): _inherit = 'res.config.settings' allow_out_of_stock_order = fields.Boolean(string='Continue selling when out-of-stock', defa...
46.170732
1,893
1,299
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import api, fields, models class Website(models.Model): _inherit = 'website' warehouse_id = fields.Many2one('stock.warehouse', string='Warehouse') def _prepare_sale_order_values(self, partner, pricelist): self.ensure_one() values = super(Website, self)._...
44.793103
1,299
1,427
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.website_sale.controllers import main as website_sale_controller from odoo import http, _ from odoo.http import request from odoo.exceptions import ValidationError class PaymentPortal(website_sale_cont...
44.59375
1,427
669
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import http from odoo.addons.website_sale.controllers.variant import WebsiteSaleVariantController class WebsiteSaleStockVariantController(WebsiteSaleVariantController): @http.route() def get_combinati...
51.461538
669
1,094
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (C) 2014 Tech Receptives (<http://techreceptives.com>) { 'name': 'Singapore - Accounting', 'author': 'Tech Receptives', 'version': '2.1', 'category': 'Accounting/Localizations/Account Charts'...
32.176471
1,094
250
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.account.models.chart_template import update_taxes_from_templates def migrate(cr, version): update_taxes_from_templates(cr, 'l10n_sg.sg_chart_template')
41.666667
250
290
py
PYTHON
15.0
from openerp.modules.registry import RegistryManager def migrate(cr, version): registry = RegistryManager.get(cr.dbname) from openerp.addons.account.models.chart_template import migrate_set_tags_and_taxes_updatable migrate_set_tags_and_taxes_updatable(cr, registry, 'l10n_sg')
48.333333
290
262
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import fields, models class AccountMove(models.Model): _inherit = 'account.move' l10n_sg_permit_number = fields.Char(string="Permit No.") l10n_sg_permit_number_date = fields.Date(string="Date of permit number")
23.818182
262
305
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import fields, models class ResCompany(models.Model): _name = 'res.company' _description = 'Companies' _inherit = 'res.company' l10n_sg_unique_entity_number = fields.Char(string='UEN', related="partner_id.l10n_sg_unique_entity_number", readonly=False)
30.5
305
207
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import fields, models class ResPartner(models.Model): _name = 'res.partner' _inherit = 'res.partner' l10n_sg_unique_entity_number = fields.Char(string='UEN')
23
207
3,712
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'LATAM Localization Base', 'version': '1.0', 'category': 'Accounting/Localizations', 'sequence': 14, 'author': 'Odoo, ADHOC SA', 'summary': 'LATAM Identification Types', 'description': """ Add a new model na...
58.920635
3,712
812
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, fields, api from odoo.osv import expression class L10nLatamIdentificationType(models.Model): _name = 'l10n_latam.identification.type' _description = "Identification Types" _order = 'sequence' sequence...
36.909091
812
720
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, fields, api class ResCompany(models.Model): _inherit = 'res.company' @api.model def create(self, vals): """ If exists, use specific vat identification.type for the country of the company """ ...
40
720
1,558
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, fields, api class ResPartner(models.Model): _inherit = 'res.partner' l10n_latam_identification_type_id = fields.Many2one('l10n_latam.identification.type', string="Identification Type", index=True, aut...
50.258065
1,558
843
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Uruguay - Accounting', 'version': '0.1', 'author': 'Uruguay l10n Team, Guillem Barba', 'category': 'Accounting/Localizations/Account Charts', 'description': """ General Chart of Accounts. =...
28.1
843
3,713
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Restaurant', 'version': '1.0', 'category': 'Sales/Point of Sale', 'sequence': 6, 'summary': 'Restaurant extensions for the Point of Sale ', 'description': """ This module adds several...
48.220779
3,713
9,055
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 TestFrontend(odoo.tests.HttpCase): def setUp(self): super().setUp() self.env = self.env(user=self.env.ref('base.user_admin'))...
41.921296
9,055
5,477
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 RestaurantFloor(models.Model): _name = 'restaurant.floor' _description = 'Restaurant Floor' name = fields.Char('Floor Na...
55.323232
5,477
4,612
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 PosConfig(models.Model): _inherit = 'pos.config' iface_splitbill = fields.Boolean(string='Bill Splitting', help='Enables Bill Splitting in the Point of Sale.') ...
50.681319
4,612
457
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 PosConfig(models.Model): _inherit = 'pos.payment' def _update_payment_line_for_tip(self, tip_amount): """Inherit this method to perform reauthorization or cap...
30.466667
457
11,179
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tools import groupby from re import search from functools import partial import pytz from odoo import api, fields, models class PosOrderLine(models.Model): _inherit = 'pos.order.line' note = fields....
39.925
11,179
2,139
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'France - VAT Anti-Fraud Certification for Point of Sale (CGI 286 I-3 bis)', 'icon': '/l10n_fr/static/description/icon.png', 'version': '1.0', 'category': 'Accounting/Localizations/Point of Sale...
43.632653
2,138
7,260
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 hashlib import sha256 from json import dumps from odoo import models, api, fields from odoo.fields import Datetime from odoo.tools.translate import _, _lt from odoo.exception...
50.769231
7,260
9,391
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 models, api, fields from odoo.fields import Datetime as FieldDateTime from odoo.tools.translate import _ from odoo.exceptions import UserError from odoo.osv.expre...
55.89881
9,391
4,716
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, api, fields, _ from odoo.exceptions import UserError from datetime import datetime from odoo.fields import Datetime, Date from odoo.tools.misc import format_date import pytz def ctx_tz(record, f...
48.122449
4,716
646
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import _, models from odoo.exceptions import UserError class AccountFiscalPosition(models.Model): _inherit = "account.fiscal.position" def write(self, vals): if "tax_ids" in vals: if self.env["pos.order"].sudo().search_count([("fiscal_position_id", "in",...
34
646
1,344
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, api from odoo.tools.translate import _ from odoo.exceptions import UserError class AccountBankStatement(models.Model): _inherit = 'account.bank.statement' @api.ondelete(at_uninstall=Tru...
43.354839
1,344
699
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 ReportPosHashIntegrity(models.AbstractModel): _name = 'report.l10n_fr_pos_cert.report_pos_hash_integrity' _description = 'Get french pos hash integrity result as PDF.'...
34.95
699
1,031
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright: (C) 2012 - Mentis d.o.o., Dravograd { "name": "Slovenian - Accounting", "version": "1.1", "author": "Mentis d.o.o.", "website": "http://www.mentis.si", 'category': 'Accounting/Localizati...
31.181818
1,029
819
py
PYTHON
15.0
#-*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Work Entries - Contract', 'category': 'Human Resources/Employees', 'sequence': 39, 'summary': 'Manage work entries', 'description': "", 'installable': True, 'depends': [ 'hr_w...
26.419355
819
2,779
py
PYTHON
15.0
from odoo.addons.hr_work_entry_contract.models.hr_work_intervals import WorkIntervals from odoo.tests.common import TransactionCase class TestIntervals(TransactionCase): def ints(self, pairs): recs = self.env['base'] return [(a, b, recs) for a, b in pairs] def test_union(self): def c...
39.7
2,779
10,179
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 psycopg2 import IntegrityError import pytz from odoo.tests.common import tagged from odoo.tools import mute_logger from odoo.addons.h...
55.928571
10,179
2,286
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.fields import Date from odoo.tests.common import TransactionCase class TestWorkEntryBase(TransactionCase): @classmethod def setUpClass(cls): s...
34.119403
2,286
1,566
py
PYTHON
15.0
# # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from .common import TestWorkEntryBase from datetime import datetime from odoo.tests import tagged @tagged('-at_install', 'post_install') class TestGlobalTimeOff(TestWorkEntryBase): def test_gto_other_calendar(s...
41.210526
1,566
6,162
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 HrWorkEntryRegenerationWizard(models.TransientModel): _name = 'hr.work.entry.regeneration.wizard' _description = 'Regener...
59.25
6,162
3,625
py
PYTHON
15.0
# -*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from itertools import chain def _boundaries(intervals, opening, closing): """ Iterate on the boundaries of intervals. """ for start, stop, recs in intervals: if start < stop: yield (start, op...
37.371134
3,625
733
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 HrEmployee(models.Model): _inherit = 'hr.employee' _description = 'Employee' def generate_work_entries(self, date_start, date_stop, force=False): date_start = f...
36.65
733
15,551
py
PYTHON
15.0
# -*- coding:utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from collections import defaultdict from datetime import datetime, date from odoo import fields, models, _ from odoo.addons.resource.models.resource import datetime_to_string, string_to_datetime, Intervals from odoo.osv i...
52.360269
15,551
6,865
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import pytz from collections import defaultdict from itertools import chain from odoo import api, fields, models, _ from odoo.exceptions import ValidationError from odoo.addons.hr_work_entry_contract.models.hr_work_int...
44.00641
6,865
889
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'pos_sale_product_configurator', 'version': '1.0', 'category': 'Hidden', 'summary': 'Link module between point_of_sale and sale_product_configurator', 'description': """ This module adds fe...
30.655172
889
276
py
PYTHON
15.0
from odoo import models, fields class PosConfig(models.Model): _inherit = 'pos.config' iface_open_product_info = fields.Boolean(string="Open Product Info", help="Display the 'Product Info' page when a product with optional products are added in the customer cart")
39.428571
276
925
py
PYTHON
15.0
from odoo import models class ProductProduct(models.Model): _inherit = 'product.product' def get_product_info_pos(self, price, quantity, pos_config_id): res = super().get_product_info_pos(price, quantity, pos_config_id) # Optional products res['optional_products'] = [ {'n...
35.576923
925
595
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'POS Restaurant Adyen', 'version': '1.0', 'category': 'Point of Sale', 'sequence': 6, 'summary': 'Adds American style tipping to Adyen', 'description': '', 'depends': ['pos_adyen', '...
27.045455
595
602
py
PYTHON
15.0
# coding: utf-8 # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class PosPaymentMethod(models.Model): _inherit = 'pos.payment.method' adyen_merchant_account = fields.Char(help='The POS merchant account code used in Adyen') def _get_adyen_endpoi...
35.411765
602
988
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json import requests from odoo import models TIMEOUT = 10 class PosPayment(models.Model): _inherit = 'pos.payment' def _update_payment_line_for_tip(self, tip_amount): """Capture the payment wh...
30.875
988
569
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class PosOrder(models.Model): _inherit = 'pos.order' def action_pos_order_paid(self): res = super(PosOrder, self).action_pos_order_paid() if not self.config_id.set_tip_a...
35.5625
569
710
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from odoo import http from odoo.http import request from odoo.addons.payment_adyen.controllers.main import AdyenController _logger = logging.getLogger(__name__) class PosRestaurantAdyenController(Adyen...
37.368421
710
603
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Multi Language Chart of Accounts', 'version': '1.1', 'category': 'Accounting/Localizations', 'description': """ * Multi language support for Chart of Accounts, Taxes, Tax Codes, Journals, ...
35.470588
603
8,423
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from collections import defaultdict import logging from odoo import api, models _logger = logging.getLogger(__name__) class AccountChartTemplate(models.Model): _inherit = 'account.chart.template' def _load(s...
47.857955
8,423
2,477
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models #in this file, we mostly add the tag translate=True on existing fields that we now want to be translated class AccountAccountTag(models.Model): _inherit = 'account.account.tag' ...
26.634409
2,477
407
py
PYTHON
15.0
# -*- encoding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'G.C.C. - Arabic/English Invoice', 'version': '1.0.0', 'author': 'Odoo', 'category': 'Accounting/Localizations', 'description': """ Arabic/English for GCC """, 'license': 'LGPL-3', ...
25.4375
407
929
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models, api class AccountMove(models.Model): _inherit = 'account.move' narration = fields.Html(translate=True) def _get_name_invoice_report(self): self.ensure_one() ...
34.407407
929
1,354
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 NewModel(models.Model): _name = 'export.integer' _description = 'Export: Integer' value = fields.Integer(default=4) def name_get(self): return [(recor...
37.611111
1,354
396
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'test xlsx export', 'version': '0.1', 'category': 'Hidden/Tests', 'description': """A module to test xlsx export.""", 'depends': ['web', 'test_mail'], 'data': ['ir.model.access.csv'], ...
30.461538
396
15,449
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json from datetime import date from unittest.mock import patch from odoo import http from odoo.tests import common, tagged from odoo.tools.misc import get_lang from odoo.addons.web.controllers.main import ExportX...
39.111392
15,449
583
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Wire Transfer Payment Acquirer', 'version': '2.0', 'category': 'Accounting/Payment Acquirers', 'summary': 'Payment Acquirer: Wire Transfer Implementation', 'description': """Wire Transfer Payment Acquirer""", ...
32.388889
583
3,204
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from odoo import _, api, models from odoo.exceptions import ValidationError from odoo.addons.payment_transfer.controllers.main import TransferController _logger = logging.getLogger(__name__) class PaymentTransaction(models.M...
34.451613
3,204
2,496
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, api, fields, models class PaymentAcquirer(models.Model): _inherit = 'payment.acquirer' provider = fields.Selection( selection_add=[('transfer', "Wire Transfer")], default='transfer', ondelete={'tra...
43.034483
2,496
660
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 TransferController(http.Controller): _accept_url = '/payment/transfer/feedback' @http.route(_accept_url, t...
34.736842
660
533
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Mass mailing on course members', 'category': 'Hidden', 'version': '1.0', 'description': """ Mass mail course members ======================== Bridge module adding UX requirements to ea...
25.380952
533
741
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models, _ class Course(models.Model): _inherit = "slide.channel" def action_mass_mailing_attendees(self): domain = repr([('slide_channel_ids', 'in', self.ids)]) mass_mailing_ac...
32.217391
741
1,221
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': "Coupons & Promotions for eCommerce", 'summary': """Use coupon & promotion programs in your eCommerce store""", 'description': """ Create coupon and promotion codes to share in order to boost your sa...
38.15625
1,221
6,778
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from datetime import timedelta from odoo import fields from odoo.tests import HttpCase, tagged, TransactionCase from odoo.addons.sale.tests.test_sale_product_attribute_value_config import TestSaleProductAttributeValueCommon @tagged('post_inst...
41.329268
6,778
6,774
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.sale_coupon.tests.test_program_numbers import TestSaleCouponProgramNumbers from odoo.addons.website.tools import MockRequest from odoo.exceptions import UserError from odoo.tests import tagged @tagged('-at_install', 'post_ins...
45.463087
6,774
3,319
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.sale_coupon.tests.test_program_numbers import TestSaleCouponProgramNumbers from odoo.addons.website.tools import MockRequest from odoo.addons.website_sale_coupon.controllers.main import WebsiteSale from odoo.tests import tagged...
54.409836
3,319
4,132
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from werkzeug.urls import url_encode from odoo import fields, models, api, _ from odoo.exceptions import UserError, ValidationError class SaleCouponShare(models.TransientModel): _name = 'coupon.share' _descrip...
41.737374
4,132
5,646
py
PYTHON
15.0
# -*- coding: utf-8 -*- from datetime import timedelta from odoo import api, fields, models from odoo.exceptions import UserError from odoo.http import request class SaleOrder(models.Model): _inherit = "sale.order" def _try_pending_coupon(self): if not request: return pending_co...
47.445378
5,646
740
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class SaleCoupon(models.Model): _inherit = 'coupon.coupon' def _check_coupon_code(self, order_date, partner_id, **kwargs): order = kwargs.get('order', False) if order an...
38.947368
740
248
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import models from odoo.http import request class Website(models.Model): _inherit = 'website' def sale_reset(self): request.session.pop('pending_coupon_code') return super().sale_reset()
22.545455
248
2,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.exceptions import ValidationError class CouponProgram(models.Model): _name = 'coupon.program' _inherit = ['coupon.program', 'website.multi.mixin'] @api.constrains(...
48.853659
2,003
2,463
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import http, _ from odoo.addons.website_sale.controllers import main from odoo.exceptions import UserError from odoo.http import request from werkzeug.urls import url_encode, url_parse class WebsiteSale(main.WebsiteSale): @http.route(['/shop/pricelist']) def pricelist(self,...
41.745763
2,463
754
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Copyright (c) 2011 Cubic ERP - Teradata SAC. (http://cubicerp.com). { "name": "Panama - Accounting", "description": """ Panamenian accounting chart and tax localization. Plan contable panameño e impuestos de ...
27.851852
752
633
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Lead Enrichment', 'summary': 'Enrich Leads/Opportunities using email address domain', 'version': '1.1', 'category': 'Sales/CRM', 'version': '1.1', 'depends': [ 'iap_crm', ...
26.375
633
2,145
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.iap.tests.common import MockIAPEnrich from odoo.tests.common import users class TestLeadEnrich(TestCrmCommon, MockIAPEnrich): @classmethod ...
36.982759
2,145
847
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 ResConfigSettings(models.TransientModel): _inherit = "res.config.settings" @api.model def get_values(self): values = super(ResConfigSettings, self).get_values() ...
40.333333
847
7,554
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import datetime import logging from psycopg2 import OperationalError from odoo import _, api, fields, models, tools from odoo.addons.iap.tools import iap_tools _logger = logging.getLogger(__name__) class Lead(models....
51.387755
7,554
806
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Authorize.Net Payment Acquirer', 'version': '2.0', 'category': 'Accounting/Payment Acquirers', 'sequence': 350, 'summary': 'Payment Acquirer: Authorize.net Implementation', 'description': """Authorize.Net Paym...
32.24
806
673
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 AuthorizeCommon(PaymentCommon): @classmethod def setUpClass(cls, chart_template_ref=None): super().setUpClass(chart_template_ref=chart_template_ref) cl...
33.65
673
2,351
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. from unittest.mock import patch from odoo.addons.payment import utils as payment_utils from odoo.exceptions import UserError from odoo.tests import tagged from odoo.tools import mute_logger from .common import AuthorizeCommon @tagged('post_...
41.982143
2,351
10,939
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import pprint from odoo import _, api, models from odoo.exceptions import UserError, ValidationError from .authorize_request import AuthorizeAPI from odoo.addons.payment import utils as payment_utils _logger = logging.getLogge...
42.564202
10,939
1,741
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import pprint from odoo import _, fields, models from odoo.exceptions import UserError from .authorize_request import AuthorizeAPI _logger = logging.getLogger(__name__) class PaymentToken(models.Model): _inherit = 'payme...
33.480769
1,741
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
15,032
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import json import logging import pprint from uuid import uuid4 from odoo.addons.payment import utils as payment_utils import requests _logger = logging.getLogger(__name__) class AuthorizeAPI: """ Authorize.net Gateway API integration....
41.524862
15,032
6,014
py
PYTHON
15.0
# Part of Odoo. See LICENSE file for full copyright and licensing details. import logging import pprint from odoo import _, api, fields, models from odoo.fields import Command from odoo.exceptions import UserError, ValidationError from .authorize_request import AuthorizeAPI _logger = logging.getLogger(__name__) c...
44.880597
6,014
3,039
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.exceptions import ValidationError from odoo.http import request from odoo.addons.payment import utils as payment_utils _logger = logging.getLogger(__name__) class AuthorizeCon...
49.016129
3,039
1,632
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Product Comparison', 'summary': 'Allow shoppers to compare products based on their attributes', 'description': """ This module adds a comparison tool to your eCommerce shop, so that your shoppers ca...
44.108108
1,632
10,122
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from collections import OrderedDict from lxml import etree from odoo import tools import odoo.tests @odoo.tests.tagged('-at_install', 'post_install') class TestWebsiteSaleComparison(odoo.tests.TransactionCase): de...
51.617347
10,117
3,320
py
PYTHON
15.0
# -*- coding: utf-8 -*- from collections import OrderedDict from odoo import fields, models class ProductAttributeCategory(models.Model): _name = "product.attribute.category" _description = "Product Attribute Category" _order = 'sequence, id' name = fields.Char("Category Name", required=True, trans...
41.5
3,320
1,797
py
PYTHON
15.0
# -*- coding: utf-8 -*- from odoo import http from odoo.http import request from odoo.addons.website_sale.controllers.main import WebsiteSale import json class WebsiteSaleProductComparison(WebsiteSale): @http.route('/shop/compare', type='http', auth="public", website=True, sitemap=False) def product_compare(...
46.076923
1,797
794
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Extended Addresses', 'summary': 'Add extra fields on addresses', 'sequence': '19', 'category': 'Hidden', 'complexity': 'easy', 'description': """ Extended Addresses Management ==========...
31.76
794
10,043
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.tests.common import TransactionCase class TestStreetFields(TransactionCase): @classmethod def setUpClass(cls): super(TestStreetFields, cls).setUpClass() cls.Pa...
58.389535
10,043
1,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 ResCountry(models.Model): _inherit = 'res.country' street_format = fields.Text( help="Format to use for streets belonging to this country.\n\n" "...
45.043478
1,036
1,248
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import fields, models class Company(models.Model): _inherit = 'res.company' street_name = fields.Char('Street Name', compute='_compute_address', inverse='_inverse_street...
40.258065
1,248
6,389
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import re from odoo import api, fields, models, _ from odoo.exceptions import UserError class Partner(models.Model): _inherit = ['res.partner'] street_name = fields.Char( 'Street Name', compute='_comp...
45.964029
6,389
1,950
py
PYTHON
15.0
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. # Module programed and financed by: # Vauxoo, C.A. (<http://vauxoo.com>). # Our Community team mantain this module: # https://launchpad.net/~openerp-venezuela { 'name' : 'Venezuela - Accounting', 'au...
34.210526
1,950