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,102 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import registry, SUPERUSER_ID
from odoo.api import Environment
from odoo.addons.bus.controllers import main
from odoo.fields import Datetime
from odoo.http import Controller, request, route
class BusController(main.BusController):
@route('/longpolling/poll', type="json", auth="... | 45.916667 | 1,102 |
545 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Website Events CRM',
'version': '1.0',
'category': 'Website/Website',
'website': 'https://www.odoo.com/app/events',
'description': "Allow per-order lead creation mode",
'depends': ['eve... | 27.25 | 545 |
1,052 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Indonesian - Accounting',
'version': '1.0',
'category': 'Accounting/Localizations/Account Charts',
'description': """
This is the latest Indonesian Odoo localisation necessary to run Odoo accou... | 37.571429 | 1,052 |
592 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'PayuLatam Payment Acquirer',
'version': '2.0',
'category': 'Accounting/Payment Acquirers',
'sequence': 370,
'summary': 'Payment Acquirer: PayuLatam Implementation',
'description': """Payulatam payment acquirer... | 31.157895 | 592 |
10,384 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from freezegun import freeze_time
from odoo.exceptions import ValidationError
from odoo.fields import Command
from odoo.tests import tagged
from odoo.tests.common import HttpCase
from odoo.tools import mute_logger
from .common import PayULata... | 47.2 | 10,384 |
642 | 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 PayULatamCommon(PaymentCommon):
@classmethod
def setUpClass(cls, chart_template_ref=None):
super().setUpClass(chart_template_ref=chart_template_ref)
cl... | 32.1 | 642 |
6,935 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from werkzeug import urls
from odoo import _, api, models
from odoo.exceptions import ValidationError
from odoo.tools.float_utils import float_repr
from odoo.addons.payment import utils as payment_utils
from odoo.addons.paymen... | 43.892405 | 6,935 |
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 |
4,094 | py | PYTHON | 15.0 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from hashlib import md5
from odoo import api, fields, models
from odoo.tools.float_utils import float_split, float_repr
SUPPORTED_CURRENCIES = ('ARS', 'BRL', 'CLP', 'COP', 'MXN', 'PEN', 'USD')
class PaymentAcquirer(models.Model):
_inher... | 47.057471 | 4,094 |
2,162 | 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
_logger = logging.getLogger(__name__)
class PayuLatamController(http.Controller):
_return_url = '/payment/payul... | 40.037037 | 2,162 |
1,136 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Accounting - MRP',
'version': '1.0',
'category': 'Manufacturing/Manufacturing',
'summary': 'Analytic accounting in Manufacturing',
'description': """
Analytic Accounting in MRP
============... | 32.457143 | 1,136 |
11,880 | 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
from odoo.tests import Form
class TestAnalyticAccount(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env.user.write({... | 44.830189 | 11,880 |
15,278 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.mrp.tests.common import TestMrpCommon
from odoo.addons.stock_account.tests.test_account_move import TestAccountMove
from odoo.tests import Form, tagged
class TestMrpAccount(TestMrpCommon):
@classm... | 47.447205 | 15,278 |
10,804 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.exceptions import UserError
from odoo.tests import common, Form
from odoo.tools.float_utils import float_round, float_compare
class TestBomPrice(common.TransactionCase):
def _create_product(self, name, ... | 45.016667 | 10,804 |
15,377 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
""" Implementation of "INVENTORY VALUATION TESTS (With valuation layers)" spreadsheet. """
from odoo.addons.stock_account.tests.test_stockvaluationlayer import TestStockValuationCommon
from odoo.tests import Form
clas... | 43.934286 | 15,377 |
1,255 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
from collections import defaultdict
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
def _get_invoiced_qty_per_product(self):
# Replace the kit-type products... | 44.821429 | 1,255 |
1,716 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import _, models
class StockMove(models.Model):
_inherit = "stock.move"
def _filter_anglo_saxon_moves(self, product):
res = super(StockMove, self)._filter_anglo_saxon_moves(product)
r... | 39 | 1,716 |
5,314 | 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 float_round, groupby
class ProductTemplate(models.Model):
_name = 'product.template'
_inherit = 'product.template'
def action_bom_cost(self):
template... | 49.203704 | 5,314 |
612 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class StockRule(models.Model):
_inherit = 'stock.rule'
def _prepare_mo_vals(self, product_id, product_qty, product_uom, location_id, name, origin, company_id, values, bom):
res ... | 43.714286 | 612 |
6,228 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from ast import literal_eval
from odoo import api, fields, models, _
from odoo.tools import float_is_zero, float_round
class MrpProductionWorkcenterLineTime(models.Model):
_inherit = 'mrp.workcenter.productivity'
... | 54.156522 | 6,228 |
3,803 | 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 import float_is_zero
class MrpWorkorder(models.Model):
_inherit = 'mrp.workorder'
mo_analytic_account_line_id = fields.Many2one('account.analytic.line', copy=... | 48.75641 | 3,803 |
3,104 | 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 AccountAnalyticAccount(models.Model):
_inherit = 'account.analytic.account'
_description = 'Analytic Account'
production_ids = fields.One2many('mrp.production'... | 39.291139 | 3,104 |
448 | 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 MrpBom(models.Model):
_inherit = 'mrp.bom'
analytic_account_id = fields.Many2one('account.analytic.account', 'Analytic Account', company_dependent=True, copy=True,
... | 44.8 | 448 |
413 | 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 MrpWorkcenter(models.Model):
_inherit = 'mrp.workcenter'
costs_hour_account_id = fields.Many2one(
'account.analytic.account', string='Analytic Account',
he... | 34.416667 | 413 |
777 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': "Coupon",
'summary': "Use discount coupons in different sales channels.",
'description': """Integrate coupon mechanism in orders.""",
'category': 'Sales',
'version': '1.0',
'depends': ['a... | 31.08 | 777 |
2,693 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import _, api, fields, models
import ast
from odoo.osv import expression
class CouponGenerate(models.TransientModel):
_name = 'coupon.generate.wizard'
_description = 'Generate Coupon'
nbr_coupons = fields.Integer(string="Number of Coupons", help="Number of coupons", de... | 48.963636 | 2,693 |
1,789 | 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 CouponRule(models.Model):
_name = 'coupon.rule'
_description = "Coupon Rule"
rule_date_from = fields.Datetime(strin... | 51.114286 | 1,789 |
4,852 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import random
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models, _
from uuid import uuid4
class Coupon(models.Model):
_name = 'coupon.coupon'
_description = "Coupon"
_rec... | 41.470085 | 4,852 |
641 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class MailComposeMessage(models.TransientModel):
_inherit = 'mail.compose.message'
def _action_send_mail(self, **kwargs):
for wizard in self:
if self._context.get('m... | 42.733333 | 641 |
801 | 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 UserError
class ProductProduct(models.Model):
_inherit = 'product.product'
@api.ondelete(at_uninstall=False)
def _unlink_except_linked_with_coupon... | 42.157895 | 801 |
8,532 | 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, ValidationError
import ast
class CouponProgram(models.Model):
_name = 'coupon.program'
_description = "Coupon Program"
_inheri... | 48.477273 | 8,532 |
5,085 | 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 CouponReward(models.Model):
_name = 'coupon.reward'
_description = "Coupon Reward"
_rec_name = 'reward_description'
... | 55.271739 | 5,085 |
535 | 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 CouponReport(models.AbstractModel):
_name = 'report.coupon.report_coupon'
_description = 'Sales Coupon Report'
@api.model
def _get_report_values(self, docids, data=No... | 28.157895 | 535 |
372 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
{
'name': "Sale Stock Margin",
'category': 'Sales/Sales',
'summary': '',
'description': 'Once the delivery is validated, update the cost on the SO to have an exact margin computation.',
'version': '0.1',
'depends': ['sale_stock', 'sale_margin'],
'installable': True,
... | 31 | 372 |
13,045 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields
from odoo.tests import Form, tagged
from odoo.addons.stock_account.tests.test_stockvaluationlayer import TestStockValuationCommon
@tagged('post_install', '-at_install')
class TestSaleStockMargi... | 41.281646 | 13,045 |
1,446 | 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 SaleOrderLine(models.Model):
_inherit = 'sale.order.line'
@api.depends('move_ids', 'move_ids.stock_valuation_layer_ids', 'move_ids.picking_id.state')
def _compute... | 49.862069 | 1,446 |
429 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
{
'name': 'Import/Export invoices with generic UBL',
'description': '''
Support for Export/Import in UBL format (2.1).
''',
'version': '1.0',
'category': 'Accounting/Accounting',
'depends': ['account_edi'],
'data': [
'data/ubl_templates.xml',
'data... | 25.235294 | 429 |
12,730 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields
from odoo.tools import float_repr, html2plaintext
from odoo.tests.common import Form
from pathlib import PureWindowsPath
import base64
import logging
import markupsafe
_logger = logging.... | 48.587786 | 12,730 |
2,089 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Products & Pricelists',
'version': '1.2',
'category': 'Sales/Sales',
'depends': ['base', 'mail', 'uom'],
'description': """
This is the base module for managing products and pricelists in O... | 31.651515 | 2,089 |
5,023 | 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 populate
from datetime import timedelta, date
class Pricelist(models.Model):
_inherit = "product.pricelist"
_populate_sizes = {"small": 20, "medium": 100, "large":... | 44.451327 | 5,023 |
7,948 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from collections import defaultdict
from functools import reduce
from odoo import models
from odoo.tools import populate
_logger = logging.getLogger(__name__)
class ProductAttribute(models.Model):
_... | 42.502674 | 7,948 |
4,994 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import collections
from odoo import models
from odoo.tools import populate
from odoo.addons.stock.populate.stock import COMPANY_NB_WITH_STOCK
_logger = logging.getLogger(__name__)
class ProductCategory(... | 43.051724 | 4,994 |
3,035 | 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 TestSeller(TransactionCase):
def setUp(self):
super(TestSeller, self).setUp()
self.product_service = self.env['product.product'].create({
... | 45.298507 | 3,035 |
63,776 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
from collections import OrderedDict
from datetime import datetime, timedelta
import io
import unittest.mock
from PIL import Image
from . import common
from odoo.exceptions import UserError
from odoo.tests... | 44.412256 | 63,776 |
5,063 | 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 TestPricelist(TransactionCase):
def setUp(self):
super(TestPricelist, self).setUp()
self.datacard = self.env['product.product'].create({'name': ... | 48.219048 | 5,063 |
4,616 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo.tests import common
class TestProductCommon(common.TransactionCase):
@classmethod
def setUpClass(cls):
super(TestProductCommon, cls).setUpClass()
# Customer related data
cls.partner_1 = cls.env['res.partner'].create({
'name': 'Julia Agro... | 39.118644 | 4,616 |
13,007 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import datetime
import time
from odoo.tests.common import TransactionCase
from odoo.tools import float_compare, test_reports
class TestProductPricelist(TransactionCase):
def setUp(self):
sup... | 46.453571 | 13,007 |
35,218 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import time
from psycopg2 import IntegrityError
from odoo.exceptions import UserError, ValidationError
from odoo.tests import tagged
from odoo.tests.common import TransactionCase
from odoo.tools import mute_logger
cla... | 50.455587 | 35,218 |
1,229 | 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 TestName(TransactionCase):
def setUp(self):
super().setUp()
self.product_name = 'Product Test Name'
self.product_code = 'PTN'
sel... | 42.37931 | 1,229 |
2,882 | 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 ProductLabelLayout(models.TransientModel):
_name = 'product.label.layout'
_description = 'Choose the sheet layout to print th... | 38.945946 | 2,882 |
34,395 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from itertools import chain
from odoo import api, fields, models, tools, _
from odoo.exceptions import UserError, ValidationError
from odoo.tools import format_datetime
from odoo.tools.misc import formatLang, get_lang
... | 50.877219 | 34,393 |
65,918 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import itertools
import logging
from collections import defaultdict
from odoo import api, fields, models, tools, _, SUPERUSER_ID
from odoo.exceptions import ValidationError, RedirectWarning, UserError
from odoo.osv impo... | 48.326979 | 65,918 |
3,112 | 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 ResCompany(models.Model):
_inherit = "res.company"
@api.model_create_multi
def create(self, vals_list):
companies = super(ResCompany, self).create(vals_list)
... | 46.447761 | 3,112 |
492 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class ResCurrency(models.Model):
_inherit = 'res.currency'
def _activate_group_multi_currency(self):
# for Sale/ POS - Multi currency flows require pricelists
super()._a... | 35.142857 | 492 |
796 | 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 UoM(models.Model):
_inherit = 'uom.uom'
@api.onchange('rounding')
def _onchange_rounding(self):
precision = self.env['decimal.precision'].precision_get('Produc... | 37.904762 | 796 |
44,338 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import re
from odoo import api, fields, models, tools, _
from odoo.exceptions import UserError, ValidationError
from odoo.osv import expression
from odoo.tools import float_compare, float_round
_logger... | 50.668571 | 44,335 |
4,192 | 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_discount_per_so_line = fields.Boolean("Discounts", implied_group='product.group_disco... | 55.157895 | 4,192 |
32,808 | 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, tools, _
from odoo.exceptions import UserError, ValidationError
from odoo.osv import expression
class ProductAttribute(models.Model):
_name = "produ... | 51.829384 | 32,808 |
2,135 | 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 Partner(models.Model):
_name = 'res.partner'
_inherit = 'res.partner'
# NOT A REAL PROPERTY !!!!
property_product_pricelist = fields.Many2one(
'produc... | 47.444444 | 2,135 |
1,836 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models, tools, _
from odoo.exceptions import ValidationError
class DecimalPrecision(models.Model):
_inherit = 'decimal.precision'
@api.constrains('digits')
def _check_main_currency_ro... | 45.9 | 1,836 |
2,505 | 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 ProductPricelistReport(models.AbstractModel):
_name = 'report.product.report_pricelist'
_description = 'Pricelist Report'
def _get_report_values(self, docids, data):
... | 39.140625 | 2,505 |
2,349 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from collections import defaultdict
from odoo import _, models
from odoo.exceptions import UserError
def _prepare_data(env, data):
# change product ids by actual product object to get access to fields in xml templa... | 41.946429 | 2,349 |
647 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Website Partner',
'category': 'Hidden',
'summary': 'Partner module for website',
'version': '0.1',
'description': """
This is a base module. It holds website-related stuff for Contact model... | 29.409091 | 647 |
698 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import api, fields, models
from odoo.addons.http_routing.models.ir_http import slug
from odoo.tools.translate import html_translate
class WebsiteResPartner(models.Model):
_name = 'res.partner'
_inherit = ['res.partner', 'website.seo.metadata']
website_description = fiel... | 38.777778 | 698 |
1,017 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import http
from odoo.addons.http_routing.models.ir_http import unslug
from odoo.http import request
class WebsitePartnerPage(http.Controller):
# Do not use semantic controller due to SUPERUSER_ID
@http.route(['/partners/<partner_id>'], type='http', auth="public", website=T... | 42.375 | 1,017 |
1,944 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (C) 2011 Thamini S.à.R.L (<http://www.thamini.com>)
# Copyright (C) 2011 ADN Consultants S.à.R.L (<http://www.adn-luxembourg.com>)
# Copyright (C) 2014 ACSONE SA/NV (<http://acsone.eu>)
{
'name': 'Lux... | 36.641509 | 1,942 |
248 | 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_lu.lu_2011_chart_1')
| 41.333333 | 248 |
685 | 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
class AccountChartTemplate(models.Model):
_inherit = 'account.chart.template'
@api.model
def _prepare_all_journals(self, acc_template_ref, company, journals_dict=None):... | 40.294118 | 685 |
7,727 | py | PYTHON | 15.0 | from collections import OrderedDict
import xlrd
from odoo.tools import pycompat
def _is_true(s):
return s not in ('F', 'False', 0, '', None, False)
class LuxTaxGenerator:
def __init__(self, filename):
self.workbook = xlrd.open_workbook('tax.xls')
self.sheet_info = \
self.workboo... | 42.224044 | 7,727 |
671 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
{
'name': 'Netherlands - E-Invoicing (NLCIUS 1.0.3)',
'icon': '/l10n_nl/static/description/icon.png',
'version': '0.1',
'category': 'Accounting/Localizations/EDI',
'summary': 'E-Invoicing, Universal Business Language (NLCIUS 1.0.3), nlc',
'description': """
NLCIUS is the ... | 33.55 | 671 |
11,195 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo.addons.account_edi.tests.common import AccountEdiTestCommon
from odoo.tests import tagged
from freezegun import freeze_time
@tagged('post_install_l10n', 'post_install', '-at_install')
class TestUBL(AccountEdiTestCommon):
@classmethod
def setUpClass(cls, chart_template_ref='... | 49.317181 | 11,195 |
7,058 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
import markupsafe
from odoo.addons.account_edi_ubl_bis3.models.account_edi_format import COUNTRY_EAS
from odoo import models, _
class AccountEdiFormat(models.Model):
_inherit = 'account.edi.format'
####################################################
# Import
###############... | 47.053333 | 7,058 |
2,564 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Task Logs',
'version': '1.0',
'category': 'Services/Timesheets',
'sequence': 23,
'summary': 'Track employee time on tasks',
'description': """
This module implements a timesheet system... | 35.611111 | 2,564 |
26,202 | 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
from odoo.exceptions import AccessError, UserError
class TestCommonTimesheet(TransactionCase):
def setUp(self):
super(TestCommonTimesheet, self).setUp()
... | 46.293286 | 26,202 |
1,152 | 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 ProjectTaskCreateTimesheet(models.TransientModel):
_name = 'project.task.create.timesheet'
_description = "Create Timesheet from task"
_sql_constraints = [('time_posit... | 41.142857 | 1,152 |
17,297 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from collections import defaultdict
from lxml import etree
import re
from odoo import api, Command, fields, models, _
from odoo.exceptions import UserError, AccessError
from odoo.osv import expression
class AccountAnal... | 55.085987 | 17,297 |
1,637 | 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.http import request
class Http(models.AbstractModel):
_inherit = 'ir.http'
def session_info(self):
""" The widget 'timesheet_uom' needs to know which UoM conversi... | 37.204545 | 1,637 |
838 | 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 ProjectCollaborator(models.Model):
_inherit = 'project.collaborator'
@api.model
def _toggle_project_sharing_portal_rules(self, active):
super()._toggle_project_sh... | 39.904762 | 838 |
579 | 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'
def _unprotected_uom_xml_ids(self):
# Override
# When timesheet App is installed, we also need to protect the hour ... | 32.166667 | 579 |
452 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models
class IrUiMenu(models.Model):
_inherit = 'ir.ui.menu'
def _load_menus_blacklist(self):
res = super()._load_menus_blacklist()
if self.env.user.has_group('hr_timesheet.gro... | 32.285714 | 452 |
4,061 | 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 ResCompany(models.Model):
_inherit = 'res.company'
@api.model
def _default_project_time_mode_id(self):
uom ... | 48.927711 | 4,061 |
425 | 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'
timesheet_cost = fields.Monetary('Timesheet Cost', currency_field='currency_id',
groups="hr.group_hr_user", default... | 35.416667 | 425 |
2,166 | 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_project_timesheet_synchro = fields.Boolean("Awesome Timesheet",
compute="_co... | 57 | 2,166 |
20,672 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from collections import defaultdict
from odoo import models, fields, api, _, _lt
from odoo.exceptions import UserError, ValidationError, RedirectWarning
PROJECT_TASK_READABLE_FIELDS = {
'allow_subtasks',
'allo... | 52.070529 | 20,672 |
1,606 | 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 ReportProjectTaskUser(models.Model):
_inherit = "report.project.task.user"
hours_planned = fields.Float('Planned Hours', readonly=True)
hours_effective = fields.F... | 47.235294 | 1,606 |
8,369 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from collections import OrderedDict
from dateutil.relativedelta import relativedelta
from operator import itemgetter
from odoo import fields, http, _
from odoo.http import request
from odoo.tools import date_utils, grou... | 47.822857 | 8,369 |
2,354 | 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.http import request
from odoo.osv import expression
from odoo.addons.project.controllers.portal import CustomerPortal
class ProjectCustomerPortal(CustomerPortal):
def... | 46.156863 | 2,354 |
654 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
{
'name': 'Product Email Template',
'depends': ['account'],
'category': 'Accounting/Accounting',
'description': """
Add email templates to products to be sent on invoice confirmation
==================================================================
With this module, link your ... | 34.421053 | 654 |
2,865 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
from odoo.tests import tagged
@tagged('post_install', '-at_install')
class TestAccountMove(AccountTestInvoicingCommon):
def setUp(self):
super().setUp()
Template = self.env['mail.template']
self.... | 40.928571 | 2,865 |
1,192 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import api, models, SUPERUSER_ID
class AccountMove(models.Model):
_inherit = 'account.move'
def invoice_validate_send_email(self):
if self.env.su:
# sending mail in sudo was meant for it being sent from superuser
self = self.with_user(SUPERUS... | 38.451613 | 1,192 |
711 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
from odoo import fields, models
class ProductTemplate(models.Model):
""" Product Template inheritance to add an optional email.template to a
product.template. When validating an invoice, an email will be send to the
customer based on this template. The customer will receive an ema... | 44.4375 | 711 |
436 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': "Project Purchase",
'version': '1.0',
'summary': "Monitor purchase in project",
'description': "",
'category': 'Services/Project',
'depends': ['purchase', 'project'],
'data': [
... | 25.647059 | 436 |
2,508 | 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, _, _lt
class Project(models.Model):
_inherit = "project.project"
purchase_orders_count = fields.Integer('# Purchase Orders', compute='_compute_purchase_orders_count', grou... | 40.451613 | 2,508 |
2,290 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr
{
'name': 'France - Accounting',
'version': '2.1',
'category': 'Accounting/Localizations/Account Charts',
'description': """
This is the ... | 40.875 | 2,289 |
259 | 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_fr.l10n_fr_pcg_chart_template')
| 43.166667 | 259 |
291 | 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_fr')
| 41.571429 | 291 |
253 | 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 ResPartner(models.Model):
_inherit = 'res.partner'
siret = fields.Char(string='SIRET', size=14)
| 25.3 | 253 |
2,722 | 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 ResCompany(models.Model):
_inherit = 'res.company'
l10n_fr_closing_sequence_id = fields.Many2one('ir.sequence', 'Sequence to use to build sale closings', readonly=... | 43.903226 | 2,722 |
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, fields
class AccountChartTemplate(models.Model):
_inherit = 'account.chart.template'
@api.model
def _prepare_all_journals(self, acc_template_ref, company, journals_dict=None):... | 36.3 | 726 |
457 | py | PYTHON | 15.0 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'pos_mrp',
'version': '1.0',
'category': 'Hidden',
'sequence': 6,
'summary': 'Link module between Point of Sale and Mrp',
'description': """
This is a link module between Point of S... | 25.388889 | 457 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.