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,171 | py | PYTHON | 15.0 | # Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class MgmtsystemNonconformityOrigin(models.Model):
_name = "mgmtsystem.nonconformity.origin"
_description = "Origin of nonconformity of... | 33.457143 | 1,171 |
7,745 | py | PYTHON | 15.0 | # Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
class MgmtsystemNonconformity(models.Model):
_name = "mgmtsystem.nonconformity"
_description = "Nonconformity"
_inherit = ... | 34.422222 | 7,745 |
1,230 | py | PYTHON | 15.0 | # Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, fields, models
_STATES = [
("draft", _("Draft")),
("analysis", _("Analysis")),
("pending", _("Action Plan")),
("open", _("In Progress")),
... | 33.243243 | 1,230 |
610 | py | PYTHON | 15.0 | # Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class MgmtsystemNonconformitySeverity(models.Model):
"""Nonconformity Severity - Critical, Major, Minor, Invalid, ..."""
_name = "mgmt... | 35.882353 | 610 |
1,320 | py | PYTHON | 15.0 | # Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class MgmtsystemNonconformityAbstract(models.AbstractModel):
_name = "mgmtsystem.nonconformity.abstract"
_description = "Nonconfo... | 33 | 1,320 |
609 | py | PYTHON | 15.0 | # Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class MgmtsystemAction(models.Model):
_inherit = "mgmtsystem.action"
nonconformity_immediate_id = fields.One2many(
"mgmtsystem.... | 30.45 | 609 |
1,222 | py | PYTHON | 15.0 | # Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class MgmtsystemNonconformityCause(models.Model):
"""Cause of the nonconformity of the management system."""
_name = "mgmtsystem.nonco... | 33.944444 | 1,222 |
634 | py | PYTHON | 15.0 | # Copyright 2022 - TODAY, Escodoo
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Mgmtsystem Nonconformity Quality Control Oca",
"summary": """
Bridge module between Quality Control and Non Conformities""",
"version": "15.0.1.0.1",
"license": "AGPL-3",
"author": ... | 30.190476 | 634 |
2,195 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import common
class TestQualityControl(common.TransactionCase):
@classmethod
def setUpClass(cls):
"""
Sets some enviroment
"""
super().setUpClass()
cls.test = cls.env.ref("quality_control_o... | 37.844828 | 2,195 |
352 | py | PYTHON | 15.0 | # Copyright 2022 - TODAY, Marcel Savegnago <marcel.savegnago@escodoo.com.br>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class MgmtsystemNonconformity(models.Model):
_inherit = "mgmtsystem.nonconformity"
qc_inspection_id = fields.Many2one("qc.inspection"... | 32 | 352 |
1,796 | py | PYTHON | 15.0 | # Copyright 2022 - TODAY, Marcel Savegnago <marcel.savegnago@escodoo.com.br>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class QcInspection(models.Model):
_inherit = "qc.inspection"
mgmtsystem_nonconformity_ids = fields.One2many(
"mgmtsystem... | 35.92 | 1,796 |
1,326 | py | PYTHON | 15.0 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Ge... | 44.2 | 1,326 |
728 | py | PYTHON | 15.0 | # Copyright 2019 Marcelo Frare (Ass. PNLUG - Gruppo Odoo <http://odoo.pnlug.it>)
# Copyright 2019 Stefano Consolaro (Ass. PNLUG - Gruppo Odoo <http://odoo.pnlug.it>)
{
"name": "Management System - Action Template",
"summary": "Add Template management for Actions.",
"version": "15.0.1.1.0",
"author": "A... | 38.315789 | 728 |
1,013 | py | PYTHON | 15.0 | from odoo import _
from odoo.tests.common import TransactionCase
class TestModelNonConformity(TransactionCase):
def setUp(self):
"""
Sets some enviroment
"""
super(TestModelNonConformity, self).setUp()
self.action_model = self.env["mgmtsystem.action"]
self.action_t... | 29.794118 | 1,013 |
1,128 | py | PYTHON | 15.0 | # Copyright 2020 Creu Blanca
# Copyright 2019 Marcelo Frare (Ass. PNLUG - Gruppo Odoo <http://odoo.pnlug.it>)
# Copyright 2019 Stefano Consolaro (Ass. PNLUG - Gruppo Odoo <http://odoo.pnlug.it>)
from odoo import fields, models
class MgmtsystemActionTemplate(models.Model):
"""
Define a support structure to se... | 33.176471 | 1,128 |
1,024 | py | PYTHON | 15.0 | # Copyright 2019 Marcelo Frare (Ass. PNLUG - Gruppo Odoo <http://odoo.pnlug.it>)
# Copyright 2019 Stefano Consolaro (Ass. PNLUG - Gruppo Odoo <http://odoo.pnlug.it>)
# Copyright 2020 Creu Blanca
from odoo import _, api, fields, models
class MgmtsystemAction(models.Model):
"""
Extend actions adding template r... | 31.030303 | 1,024 |
1,449 | py | PYTHON | 15.0 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010 Savoir-faire Linux (<http://www.savoirfairelinux.com>).
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
#
# This program is free software: you can... | 46.741935 | 1,449 |
719 | py | PYTHON | 15.0 | # Copyright 2019 Stefano Consolaro (Ass. PNLUG - Gruppo Odoo <http://odoo.pnlug.it>)
{
"name": "Management System - Nonconformity Type",
"summary": "Add Nonconformity classification for the root context.",
"version": "15.0.1.0.0",
"development_status": "Beta",
"author": "Associazione PNLUG - Gruppo... | 39.944444 | 719 |
2,394 | py | PYTHON | 15.0 | from odoo import _
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
class TestModelNonConformity(TransactionCase):
def setUp(self):
"""
Sets some enviroment
"""
super(TestModelNonConformity, self).setUp()
self.nc_model = self.env["m... | 34.2 | 2,394 |
3,426 | py | PYTHON | 15.0 | # Copyright 2019 Stefano Consolaro (Ass. PNLUG - Gruppo Odoo <http://odoo.pnlug.it>)
from odoo import _, api, fields, models
class MgmtsystemNonconformity(models.Model):
"""
Extend nonconformity adding fields for type,
quantity checked and quantity non compliant,
adding method to send email
"""
... | 34.606061 | 3,426 |
647 | py | PYTHON | 15.0 | # Copyright 2016-2022 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Account Banking Mandate Sale",
"version": "15.0.1.0.0",
"category": "Banking addons",
"license": "AGPL-3",
"summary": "Adds mandates on sale or... | 30.809524 | 647 |
569 | py | PYTHON | 15.0 | # Copyright 2016-2022 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class SaleAdvancePaymentInv(models.TransientModel):
_inherit = "sale.advance.payment.inv"
def _prepare_invoice_values(self, order, name, am... | 37.933333 | 569 |
2,071 | py | PYTHON | 15.0 | # Copyright 2014-2022 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class SaleOrder(models.Model):
_inherit = "sale.order"
commercial_invoice_partner_id = fields.Many2one(
related="partn... | 35.706897 | 2,071 |
795 | py | PYTHON | 15.0 | # Copyright 2016-2020 Akretion France (<https://www.akretion.com>)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Account Payment Mode",
"version": "15.0.1.0.2",
"development_status": "Mature",
"license": "AGPL... | 34.565217 | 795 |
5,279 | py | PYTHON | 15.0 | # Copyright 2016-2020 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo.exceptions import UserError, ValidationError
from odoo.tests.common import TransactionCase
class TestAccountPaymentMode(TransactionCase):
@classmethod
def setUpClass(cls):
super().setU... | 39.691729 | 5,279 |
2,612 | py | PYTHON | 15.0 | # Copyright 2016-2020 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, models
from odoo.exceptions import ValidationError
class AccountJournal(models.Model):
_inheri... | 37.855072 | 2,612 |
1,371 | py | PYTHON | 15.0 | # Copyright 2016-2020 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class AccountPaymentMethod(models.Model):
_inherit = "account.payment.method"
... | 34.275 | 1,371 |
5,956 | py | PYTHON | 15.0 | # Copyright 2016-2020 Akretion France (http://www.akretion.com/)
# @author: Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class AccountPaymentMode(models.Model):... | 44.447761 | 5,956 |
1,348 | py | PYTHON | 15.0 | import setuptools
with open('VERSION.txt', 'r') as f:
version = f.read().strip()
setuptools.setup(
name="odoo-addons-oca-bank-payment",
description="Meta package for oca-bank-payment Odoo addons",
version=version,
install_requires=[
'odoo-addon-account_banking_mandate>=15.0dev,<15.1dev',
... | 43.483871 | 1,348 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
100 | py | PYTHON | 15.0 | import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
| 16.666667 | 100 |
634 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Account Banking Mandate Contact",
"summary": "Assign specific banking mandates in contact level",
"version": "15.0.1.0.0",
"development_status": "Production/Stable",
"category": "Ba... | 35.222222 | 634 |
6,063 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl
from unittest.mock import patch
from odoo import fields
from odoo.tests.common import Form, TransactionCase
from odoo.addons.account.models.account_payment_method import AccountPaymentMethod
class TestAccoun... | 42.985816 | 6,061 |
901 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import models
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
# Extended to use partner_shipping_id mandate if it have set
def _prepare_payment_line_vals(self, ... | 33.37037 | 901 |
715 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
contact_mandate_id = fields.Many2one(
comodel_name="account.banking.mandate",
string="Cont... | 34.047619 | 715 |
646 | py | PYTHON | 15.0 | # Copyright 2014-2016 Akretion (http://www.akretion.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# @author Alexis de Lattre <alexis.delattre@akretion.com>
{
"name": "Account Payment Sale",
"version": "15.0.1.0.0",
"category": "Banking addons",
"license": "AGPL-3",
"summary":... | 40.375 | 646 |
2,542 | py | PYTHON | 15.0 | # Copyright 2018 Camptocamp
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class CommonTestCase(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(context=dict(cls.env.context, tracking_disa... | 35.802817 | 2,542 |
3,794 | py | PYTHON | 15.0 | # Copyright 2018 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import Form
from .common import CommonTestCase
class TestSaleOrder(CommonTestCase):
def create_sale_order(self, payment_mode=None):
with Form(self.env["sale.order"]) as sale_form:
s... | 38.714286 | 3,794 |
504 | py | PYTHON | 15.0 | # Copyright 2016-2020 Akretion - Alexis de Lattre
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class SaleAdvancePaymentInv(models.TransientModel):
_inherit = "sale.advance.payment.inv"
def _prepare_invoice_values(self, order, name, amount, so_line):
"""Copy... | 36 | 504 |
1,425 | py | PYTHON | 15.0 | # Copyright 2014-2020 Akretion - Alexis de Lattre
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class SaleOrder(models.Model):
_inherit = "sale.order"
payment_mode_id = fields.Many2one(
comodel_name="account.payment.mode",
compute="_comp... | 33.928571 | 1,425 |
1,299 | py | PYTHON | 15.0 | # Copyright 2013-2020 Akretion (www.akretion.com)
# Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2014-2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Account Banking SEPA Direct Debit",
"summary": "Create SEPA files for Direct Debit",
... | 35.108108 | 1,299 |
14,244 | py | PYTHON | 15.0 | # Copyright 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2018-2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import base64
from lxml import etree
from odoo import fields
from odoo.tests.common import TransactionCase
from odoo.tools impo... | 40.465909 | 14,244 |
1,804 | py | PYTHON | 15.0 | # Copyright 2016-2020 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from dateutil.relativedelta import relativedelta
from odoo import fields
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase
class TestMan... | 37.583333 | 1,804 |
2,383 | py | PYTHON | 15.0 | # Copyright 2019 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, models
from odoo.exceptions import UserError
class AccountPaymentLine(models.Model):
_inherit = "account.payment.line"
def draft2open_payment_line_check(self):
res = super().draft2open_p... | 42.553571 | 2,383 |
13,403 | py | PYTHON | 15.0 | # Copyright 2020 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2018-2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from lxml import etree
from odoo import _, exceptions, fields, models
from odoo.exceptions import UserError
class AccountPayme... | 43.800654 | 13,403 |
4,449 | py | PYTHON | 15.0 | # Copyright 2020 Akretion - Alexis de Lattre
# Copyright 2014 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import logging
from datetime import datetime
from dateutil.relativedelta import relativedelta
from odoo import _, api, fields, models
from odoo.exceptions impo... | 36.467213 | 4,449 |
1,423 | py | PYTHON | 15.0 | # Copyright 2020 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class AccountPaymentMethod(models.Model):
_inherit = "account.payment.method"
pain_version = fields.Selection(
select... | 34.707317 | 1,423 |
1,172 | py | PYTHON | 15.0 | # Copyright 2013-2016 Akretion - Alexis de Lattre
# Copyright 2014 Tecnativa - Pedro M. Baeza
# Copyright 2016 Tecnativa - Antonio Espinosa
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from stdnum.eu.at_02 import is_valid
from odoo import _, api, fields, models
from odoo.exceptions import Val... | 36.625 | 1,172 |
1,207 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from stdnum.eu.at_02 import is_valid
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class AccountPaymentMode(models.Model):
_inherit = "account.payment.mode"
... | 36.575758 | 1,207 |
356 | py | PYTHON | 15.0 | # Copyright 2016 Akretion - Alexis de Lattre
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
sepa_creditor_identifier = fields.Char(
related="company_id.sepa_credito... | 29.666667 | 356 |
1,028 | py | PYTHON | 15.0 | # Copyright 2013-2016 Akretion - Alexis de Lattre
# Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2021 Tecnativa - Carlos Roca
# Copyright 2014-2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Account Banking PAIN Base Module",
"summary"... | 38.074074 | 1,028 |
384 | py | PYTHON | 15.0 | # © 2015-2016 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import SUPERUSER_ID, api
def set_default_initiating_party(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
for company in env["res.company"].sear... | 31.916667 | 383 |
7,518 | py | PYTHON | 15.0 | # Copyright 2013-2016 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# Copyright 2021 Tecnativa - Carlos Roca
# Copyright 2014-2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class AccountPaymentLine(models.Model):... | 41.766667 | 7,518 |
27,828 | py | PYTHON | 15.0 | # Copyright 2013-2016 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# Copyright 2016 Antiun Ingenieria S.L. - Antonio Espinosa
# Copyright 2021 Tecnativa - Carlos Roca
# Copyright 2014-2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import logging
from... | 40.38897 | 27,828 |
1,219 | py | PYTHON | 15.0 | # Copyright 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, fields, models
from odoo.exceptions import UserError
class AccountPaymentMethod(models.Model):
_inherit = "account.payment.method"
pain_versio... | 36.939394 | 1,219 |
1,211 | py | PYTHON | 15.0 | # Copyright 2019 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import re
from odoo import _, api, models
from odoo.exceptions import ValidationError
BIC_REGEX = re.compile(r"[A-Z]{6}[A-Z2-9][A-NP-Z0-9]([A-Z0-9]{3})?$")
class ResBank(models.Model):
_inherit = "res.bank"
@api.... | 34.6 | 1,211 |
2,172 | py | PYTHON | 15.0 | # Copyright 2013-2016 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# Copyright 2013 Noviat (http://www.noviat.com) - Luc de Meyer
# Copyright 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import logging
from odoo import fields, models... | 39.490909 | 2,172 |
972 | py | PYTHON | 15.0 | # Copyright 2016 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# Copyright 2017 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
initi... | 38.88 | 972 |
1,570 | py | PYTHON | 15.0 | # Copyright 2013-2016 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# Copyright 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza
# Copyright 2016 Antiun Ingenieria S.L. - Antonio Espinosa
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AccountPaym... | 41.315789 | 1,570 |
1,155 | py | PYTHON | 15.0 | # Copyright 2014 Compassion CH - Cyril Sester <csester@compassion.ch>
# Copyright 2015-2020 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# Copyright 2017 Tecnativa - Carlos Dauden
# Copyright 2014-2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
... | 36.09375 | 1,155 |
10,693 | py | PYTHON | 15.0 | # Copyright 2017 Creu Blanca
# Copyright 2017-2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from unittest.mock import patch
from odoo import fields
from odoo.exceptions import UserError
from odoo.tests.common import TransactionCase
from odoo.addons.account.mode... | 34.717532 | 10,693 |
8,765 | py | PYTHON | 15.0 | # © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from datetime import timedelta
from odoo import fields
from odoo.exceptions import UserError, ValidationError
from odoo.tests.common import TransactionCase
class TestMandate(Tran... | 37.613734 | 8,764 |
2,724 | py | PYTHON | 15.0 | # Copyright 2014 Compassion CH - Cyril Sester <csester@compassion.ch>
# Copyright 2014 Tecnativa - Pedro M. Baeza
# Copyright 2015-16 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
from odoo.except... | 41.272727 | 2,724 |
2,036 | py | PYTHON | 15.0 | # Copyright 2020 Marçal Isern <marsal.isern@qubiq.es>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class AccountMove(models.Model):
_inherit = "account.move"
mandate_id = fields.Many2one(
"account.banking.mandate",
string="Direct... | 35.086207 | 2,035 |
7,694 | py | PYTHON | 15.0 | # Copyright 2014 Compassion CH - Cyril Sester <csester@compassion.ch>
# Copyright 2014 Tecnativa - Pedro M. Baeza
# Copyright 2015-2020 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# Copyright 2020 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo i... | 36.813397 | 7,694 |
1,214 | py | PYTHON | 15.0 | # Copyright Akretion (http://www.akretion.com/)
# Copyright 2017 Carlos Dauden <carlos.dauden@tecnativa.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import models
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
def _prepare_payment_line_vals(self,... | 36.787879 | 1,214 |
458 | py | PYTHON | 15.0 | # Copyright 2016-2020 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AccountPaymentMethod(models.Model):
_inherit = "account.payment.method"
mandate_required = fields.Boolean(
help... | 35.230769 | 458 |
1,463 | py | PYTHON | 15.0 | # Copyright 2014 Compassion CH - Cyril Sester <csester@compassion.ch>
# Copyright 2014 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class ResPartnerBank(models.Model):
_inherit ... | 35.682927 | 1,463 |
1,913 | py | PYTHON | 15.0 | # Copyright 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# Copyright 2017 Carlos Dauden <carlos.dauden@tecnativa.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ResPartner(models.Model):
_inherit = "res.partner"
mandate_coun... | 40.702128 | 1,913 |
658 | py | PYTHON | 15.0 | from odoo.tools import sql
def pre_init_hook(cr):
"""Prepare new partner_bank_id computed field.
Add column to avoid MemoryError on an existing Odoo instance
with lots of data.
partner_bank_id on account.move.line requires payment_order_ok to be True
which it won't be as it's newly introduced - ... | 41.125 | 658 |
1,563 | py | PYTHON | 15.0 | # © 2009 EduSense BV (<http://www.edusense.nl>)
# © 2011-2013 Therp BV (<https://therp.nl>)
# © 2013-2014 ACSONE SA (<https://acsone.eu>).
# © 2016 Akretion (<https://www.akretion.com>).
# © 2016 Aselcis (<https://www.aselcis.com>).
# © 2014-2023 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.o... | 36.209302 | 1,557 |
252 | py | PYTHON | 15.0 | # Copyright 2023 ForgeFlow S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade
@openupgrade.migrate()
def migrate(env, version):
openupgrade.remove_tables_fks(env.cr, ["bank_payment_line"])
| 31.5 | 252 |
6,959 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from openupgradelib import openupgrade
_logger = logging.getLogger(__name__)
def _insert_account_payments(env):
openupgrade.logged_query(
env.cr, "ALTER TABLE account_payment ADD ol... | 38.236264 | 6,959 |
15,918 | py | PYTHON | 15.0 | # © 2017 Camptocamp SA
# © 2017 Creu Blanca
# Copyright 2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from datetime import date, datetime, timedelta
from odoo import fields
from odoo.exceptions import UserError, ValidationError
from odoo.tests import Form, tagged
fr... | 38.25 | 15,912 |
4,753 | py | PYTHON | 15.0 | # Copyright 2017 Camptocamp SA
# Copyright 2017 Creu Blanca
# Copyright 2019-2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from datetime import date, timedelta
from odoo.exceptions import UserError, ValidationError
from odoo.tests import tagged
from odoo.tests.common... | 39.280992 | 4,753 |
7,060 | py | PYTHON | 15.0 | # Copyright 2019 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from unittest.mock import patch
from odoo.tests import tagged
from odoo.addons.account.models.account_payment_method import AccountPaymentMethod
from odoo.addons.account.tests.common import AccountTestInvoicingCommon
@tag... | 43.04878 | 7,060 |
403 | py | PYTHON | 15.0 | # © 2017 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
class TestBank(TransactionCase):
def test_bank(self):
bank = self.env["res.bank"].search([], limit=1)
self.assertTrue(ban... | 30.923077 | 402 |
3,171 | py | PYTHON | 15.0 | # © 2017 Creu Blanca
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from unittest.mock import patch
from odoo.tests.common import TransactionCase
from odoo.addons.account.models.account_payment_method import AccountPaymentMethod
class TestPaymentMode(TransactionCase):
def setUp(self):
... | 34.835165 | 3,170 |
650 | py | PYTHON | 15.0 | # © 2016 Akretion (<https://www.akretion.com>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import models
class AccountInvoicePaymentLineMulti(models.TransientModel):
_name = "account.invoice.payment.line.multi"
_description = "Create payment lines from invoice tree view"
... | 36.055556 | 649 |
6,742 | py | PYTHON | 15.0 | # © 2009 EduSense BV (<http://www.edusense.nl>)
# © 2011-2013 Therp BV (<https://therp.nl>)
# © 2014-2015 ACSONE SA/NV (<https://acsone.eu>)
# © 2015-2016 Akretion (<https://www.akretion.com>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
class AccountP... | 38.067797 | 6,738 |
9,065 | py | PYTHON | 15.0 | # © 2015-2016 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class AccountPaymentLine(models.Model):
_name = "account.payment.line"
_description = "P... | 39.068966 | 9,064 |
17,302 | py | PYTHON | 15.0 | # © 2009 EduSense BV (<http://www.edusense.nl>)
# © 2011-2013 Therp BV (<https://therp.nl>)
# © 2016 Akretion (Alexis de Lattre - alexis.delattre@akretion.com)
# Copyright 2016-2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import base64
from odoo import _, api, ... | 38.103524 | 17,299 |
6,033 | py | PYTHON | 15.0 | # © 2013-2014 ACSONE SA (<https://acsone.eu>).
# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza
# © 2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
clas... | 41.586207 | 6,030 |
1,188 | py | PYTHON | 15.0 | # Copyright 2019 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AccountJournal(models.Model):
_inherit = "account.journal"
inbound_payment_order_only = fields.Boolean(
compute="_compute_inbound_payment_order_only", readonly=Tru... | 36 | 1,188 |
5,755 | py | PYTHON | 15.0 | # © 2014-2016 Akretion (Alexis de Lattre <alexis.delattre@akretion.com>)
# © 2014 Serv. Tecnol. Avanzados - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
from odoo.fields import first
class AccountMoveLine(models.Model):
_inherit = "acco... | 41.388489 | 5,753 |
431 | py | PYTHON | 15.0 | # Copyright 2019 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class AccountPaymentMethod(models.Model):
_inherit = "account.payment.method"
payment_order_only = fields.Boolean(
string="Only for payment orders",
help="This option... | 28.733333 | 431 |
846 | py | PYTHON | 15.0 | # © 2015-2016 Akretion - Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, models
from odoo.exceptions import ValidationError
class ResBank(models.Model):
_inherit = "res.bank"
@api.constrains("bic")
def check_b... | 33.8 | 845 |
2,102 | py | PYTHON | 15.0 | # Copyright 2019 ACSONE SA/NV
# Copyright 2022 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AccountPayment(models.Model):
_inherit = "account.payment"
payment_order_id = fields.Many2one(comodel_name="account.payment.ord... | 42.897959 | 2,102 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.