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 |
|---|---|---|---|---|---|---|
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 |
470 | py | PYTHON | 15.0 | # Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Stock Analytic",
"summary": """
Copies the analytic account of the purchase order item to the stock move""",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"author": "ACSONE SA/N... | 36.153846 | 470 |
2,206 | py | PYTHON | 15.0 | # Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields
from odoo.tests.common import TransactionCase
class TestPurchaseStockAnalytic(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.env = cls.env(contex... | 43.254902 | 2,206 |
685 | py | PYTHON | 15.0 | # Copyright 2020 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class PurchaseOrderLine(models.Model):
_inherit = "purchase.order.line"
def _prepare_stock_moves(self, picking):
res = super(PurchaseOrderLine, self)._prepare_stock_moves(picking)
... | 34.25 | 685 |
625 | py | PYTHON | 15.0 | # Copyright 2011-2018 Camptocamp SA
# Copyright 2013 Daniel Reis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Base Analytic Department Categorization",
"summary": "Add relationship between Analytic and Department",
"version": "15.0.1.0.0",
"author": "Camptocamp, Daniel Reis... | 41.666667 | 625 |
1,141 | py | PYTHON | 15.0 | # Copyright 2016 Yannick Vaucher (Camptocamp)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class LineDepartmentCase(TransactionCase):
@classmethod
def setUpClass(cls):
"""Assign user and department."""
super(LineDepartmentCase, c... | 43.884615 | 1,141 |
399 | py | PYTHON | 15.0 | # Copyright 2020 Ecosoft Co., Ltd (http://ecosoft.co.th/)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo import fields, models
class Department(models.Model):
_inherit = "hr.department"
analytic_account_ids = fields.One2many(
string="Analytic Accounts",
comode... | 28.5 | 399 |
1,256 | py | PYTHON | 15.0 | # Copyright 2011-2016 Camptocamp SA
# Copyright 2013 Daniel Reis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class AnalyticAccount(models.Model):
"""Add Department in analytic account."""
_inherit = "account.analytic.account"
department_id = field... | 30.634146 | 1,256 |
283 | py | PYTHON | 15.0 | # Copyright 2018 Brainbean Apps
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import SUPERUSER_ID, api
def post_init_hook(cr, registry):
env = api.Environment(cr, SUPERUSER_ID, {})
env["account.analytic.account"]._parent_store_compute()
| 28.3 | 283 |
1,008 | py | PYTHON | 15.0 | # Copyright 2017 ForgeFlow S.L.
# Copyright 2017 Luxim d.o.o.
# Copyright 2017 Matmoz d.o.o.
# Copyright 2017 Deneroteam.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# Copyright 2017 Tecnativa
# Copyright 2018 Brainbean Apps
# Copyright 2020 CorporateHub (https://corporatehub.eu)
# License AGPL-3.0 or later ... | 33.6 | 1,008 |
4,554 | py | PYTHON | 15.0 | # Copyright 2017 ForgeFlow S.L.
# Copyright 2017 Luxim d.o.o.
# Copyright 2017 Matmoz d.o.o.
# Copyright 2017 Deneroteam.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# Copyright 2017 Tecnativa
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.exceptions import UserError
from od... | 45.089109 | 4,554 |
5,243 | py | PYTHON | 15.0 | # Copyright 2017 ForgeFlow S.L.
# Copyright 2017 Luxim d.o.o.
# Copyright 2017 Matmoz d.o.o.
# Copyright 2017 Deneroteam.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# Copyright 2018 Brainbean Apps
# Copyright 2019 Pesol
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import ... | 34.721854 | 5,243 |
339 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import SUPERUSER_ID, api
def uninstall_hook(cr, registry):
"""Cleanup all dimensions before uninstalling."""
env = api.Environment(cr, SUPERUSER_ID, {})
env["account.analytic.dimension"].s... | 37.666667 | 339 |
739 | py | PYTHON | 15.0 | # Copyright 2017 PESOL (http://pesol.es) - Angel Moya (angel.moya@pesol.es)
# Copyright 2020 Tecnativa - Carlos Dauden
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Analytic Accounts Dimensions",
"summary": "Group Analytic Entries by Dimen... | 43.470588 | 739 |
8,298 | py | PYTHON | 15.0 | # Copyright 2017 PESOL (http://pesol.es) - Angel Moya (angel.moya@pesol.es)
# Copyright 2020 Tecnativa - Carlos Dauden
# Copyright 2020 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.exceptions import ValidationError
from odoo.tests.common import SavepointCase
fro... | 42.121827 | 8,298 |
3,971 | py | PYTHON | 15.0 | # Copyright 2017 PESOL (http://pesol.es) - Angel Moya (angel.moya@pesol.es)
# Copyright 2020 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from psycopg2 import sql
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class AccountAnalyticDim... | 35.141593 | 3,971 |
393 | py | PYTHON | 15.0 | # Copyright 2017 PESOL (http://pesol.es) - Angel Moya (angel.moya@pesol.es)
# Copyright 2020 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class AccountMoveLine(models.Model):
_name = "account.move.line"
_inherit = ["analytic.dimension.line"... | 35.727273 | 393 |
907 | py | PYTHON | 15.0 | # Copyright 2018 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class AccountInvoiceReport(models.Model):
_inherit = "account.invoice.report"
def _get_dimension_fields(self):
if self.env.context.get("update_custom_fields"):
return []... | 36.28 | 907 |
2,793 | py | PYTHON | 15.0 | # Copyright 2017 PESOL (http://pesol.es) - Angel Moya (angel.moya@pesol.es)
# Copyright 2020 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class AnalyticDimensionLine(models.AbstractModel):
_name = "analytic.dimension.line"
_description... | 38.791667 | 2,793 |
2,968 | py | PYTHON | 15.0 | # Copyright 2017 PESOL (http://pesol.es) - Angel Moya (angel.moya@pesol.es)
# Copyright 2020 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, fields, models
from odoo.exceptions import ValidationError
class AccountAnalyticTag(models.Model):
_inherit = ... | 45.661538 | 2,968 |
396 | py | PYTHON | 15.0 | # Copyright 2017 PESOL (http://pesol.es) - Angel Moya (angel.moya@pesol.es)
# Copyright 2020 Tecnativa - Carlos Dauden
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class AccountAnalyticLine(models.Model):
_name = "account.analytic.line"
_inherit = ["analytic.dimensi... | 36 | 396 |
510 | py | PYTHON | 15.0 | # © 2016 Laetitia Gangloff, Acsone SA/NV (http://www.acsone.eu)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Purchase Analytic",
"version": "15.0.2.0.0",
"author": "Acsone SA/NV, Odoo Community Association (OCA)",
"category": "Purchase Management",
"website": "ht... | 33.933333 | 509 |
2,762 | py | PYTHON | 15.0 | # © 2016 Laetitia Gangloff, Acsone SA/NV (http://www.acsone.eu)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from datetime import datetime
from odoo.tests.common import TransactionCase
class TestPurchaseAnalytic(TransactionCase):
def setUp(self):
super().setUp()
self.par... | 36.813333 | 2,761 |
1,700 | py | PYTHON | 15.0 | # © 2016 Laetitia Gangloff, Acsone SA/NV (http://www.acsone.eu)
# Copyright 2022 ForgeFlow S.L. (https://www.forgeflow.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class PurchaseOrder(models.Model):
_inherit = "purchase.order"
project_id = f... | 36.934783 | 1,699 |
510 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Purchase Analytic (MTO)",
"summary": "This module sets analytic account in purchase order line from "
"sale order analytic account",
"version": "15.0.1.0.0",
"category": "Analytic",
"license": "AGPL-3",
"author": "Te... | 36.428571 | 510 |
3,577 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import common
class TestPurchaseProcurementAnalytic(common.TransactionCase):
"""Use case : Prepare some data for current test case"""
@classmethod
def setUpClass(cls):
super(TestPurchaseProcurementAnalytic, cls).setU... | 37.652632 | 3,577 |
619 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class PurchaseOrderLine(models.Model):
_inherit = "purchase.order.line"
@api.model
def _prepare_purchase_order_line_from_procurement(
self, product_id, product_qty, product_uom, company_id, values, po
... | 32.578947 | 619 |
699 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
def _prepare_procurement_values(self, group_id=False):
res = super()._prepare_procurement_values(group_id)
res.update({"account_analytic_id"... | 36.789474 | 699 |
377 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class StockMove(models.Model):
_inherit = "stock.move"
def _prepare_procurement_values(self):
res = super()._prepare_procurement_values()
res.update(
{"account_analytic_id": self.group_id.sale... | 26.928571 | 377 |
490 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class StockRule(models.Model):
_inherit = "stock.rule"
def _make_po_get_domain(self, company_id, values, partner):
res = super()._make_po_get_domain(company_id, values, partner)
res += (
(
... | 27.222222 | 490 |
465 | py | PYTHON | 15.0 | # Copyright 2020 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Account Analytic Tag Default",
"summary": "Set default tags on analytic accounts.",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"author": "ForgeFlow, Odoo Community Association (OCA)",
... | 38.75 | 465 |
3,920 | py | PYTHON | 15.0 | # Copyright 2020 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import TransactionCase
class TestAccountAnalyticTagDefault(TransactionCase):
def setUp(self):
super().setUp()
self.analytic_account_obj = self.env["account.analytic.account... | 43.076923 | 3,920 |
1,684 | py | PYTHON | 15.0 | # Copyright 2020 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, fields, models
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
# make standard field a stored, computed, editable field.
analytic_tag_ids = fields.Many2many(
... | 38.272727 | 1,684 |
309 | py | PYTHON | 15.0 | # Copyright 2020 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class AccountAnalyticAccount(models.Model):
_inherit = "account.analytic.account"
default_analytic_tag_ids = fields.Many2many(comodel_name="account.analytic.tag")
| 30.9 | 309 |
572 | py | PYTHON | 15.0 | # Copyright 2015 ACSONE SA/NV
# Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "POS Analytic Config",
"summary": "Use analytic account defined on POS configuration for POS orders",
"author": "ACSONE SA/NV, Tecnativa, Odoo Community Asso... | 40.857143 | 572 |
5,371 | py | PYTHON | 15.0 | # Copyright 2015 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields
from odoo.tests import common
class TestPosAnalyticConfig(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.aml_obj = cls.env["account.m... | 40.383459 | 5,371 |
770 | py | PYTHON | 15.0 | # Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import api, models
class AccountMoveLine(models.Model):
_inherit = "account.move.line"
@api.onchange("product_id")
def _onchange_product_id(self):
analytic_account_id = self.an... | 40.526316 | 770 |
1,655 | py | PYTHON | 15.0 | # Copyright 2021 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import models
class PosSession(models.Model):
_inherit = "pos.session"
def _credit_amounts(
self,
partial_move_line_vals,
amount,
amount_converted,
... | 42.435897 | 1,655 |
318 | py | PYTHON | 15.0 | # Copyright 2015 ACSONE SA/NV
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class PosConfig(models.Model):
_inherit = "pos.config"
account_analytic_id = fields.Many2one(
comodel_name="account.analytic.account", string="Analytic Account"
)
| 28.909091 | 318 |
878 | py | PYTHON | 15.0 | # Copyright 2015 ACSONE SA/NV
# Copyright 2020 Tecnativa - David Vidal
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import models
class PosOrder(models.Model):
_inherit = "pos.order"
def _prepare_invoice_line(self, line):
"""The method that allowed to add the analyt... | 38.173913 | 878 |
516 | py | PYTHON | 15.0 | # Copyright 2011-2020 Akretion - Alexis de Lattre
# Copyright 2016-2020 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": "Account Analytic Required",
"version": "15.0.1.0.2",
"category": "Analytic Accounting",
"license": "AGPL-3",
"author": "Akretion, Odoo Commu... | 36.857143 | 516 |
7,728 | py | PYTHON | 15.0 | # Copyright 2014 Acsone
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from datetime import datetime
from odoo import exceptions
from odoo.tests import common
class TestAccountAnalyticRequired(common.TransactionCase):
@classmethod
def setUpClass(cls):
super(TestAccountAnalyticRequired... | 38.64 | 7,728 |
4,759 | py | PYTHON | 15.0 | # Copyright 2011-2020 Akretion - Alexis de Lattre
# Copyright 2016-2020 Camptocamp SA
# Copyright 2020 Druidoo - Iván Todorovich
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo import _, api, exceptions, fields, models
class AccountAccountType(models.Model):
_inherit = "account.account.t... | 38.064 | 4,758 |
839 | py | PYTHON | 15.0 | # Copyright 2015 ForgeFlow - Jordi Ballester Alomar
# Copyright 2015 Pedro M. Baeza - Antiun Ingeniería
# Copyright 2021 Daniel Reis - Open Source Integrators
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Analytic for manufacturing",
"summary": "Adds the analytic account to the pr... | 38 | 836 |
2,318 | py | PYTHON | 15.0 | # Copyright 2015 Pedro M. Baeza - Antiun Ingeniería
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo.tests import common
class TestMrpAnalytic(common.TransactionCase):
def setUp(self):
super(TestMrpAnalytic, self).setUp()
self.analytic_account = self.env["account.analyti... | 36.777778 | 2,317 |
1,095 | py | PYTHON | 15.0 | # Copyright (C) 2021 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class StockMove(models.Model):
_inherit = "stock.move"
def _generate_valuation_lines_data(
self,
partner_id,
qty,
debit_value,
credit_... | 26.707317 | 1,095 |
344 | py | PYTHON | 15.0 | # Copyright 2015 ForgeFlow - Jordi Ballester Alomar
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import fields, models
class MrpProduction(models.Model):
_inherit = "mrp.production"
analytic_account_id = fields.Many2one(
comodel_name="account.analytic.account", string="... | 28.666667 | 344 |
594 | py | PYTHON | 15.0 | # Copyright 2015 Pedro M. Baeza - Antiun Ingeniería
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import fields, models
class AnalyticAccount(models.Model):
_inherit = "account.analytic.account"
def _compute_num_productions(self):
production = self.env["mrp.production"]
... | 37.0625 | 593 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.