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 |
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 |
726 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Project Stock",
"version": "15.0.1.0.4",
"category": "Project Management",
"website": "https://github.com/OCA/project",
"author": "Tecnativa, Odoo Community Association (OCA)",
... | 31.478261 | 724 |
401 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openupgradelib import openupgrade
_table_renamed = [
(
"account_analytic_tag_project_task_rel",
"account_analytic_tag_project_task_stock_rel",
),
]
@openupgrade.migrate()
de... | 24.9375 | 399 |
12,263 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields
from odoo.tests import Form
from odoo.tests.common import users
from .common import TestProjectStockBase
class TestProjectStock(TestProjectStockBase):
@classmethod
def setUpCla... | 46.443182 | 12,261 |
4,253 | py | PYTHON | 15.0 | # Copyright 2022-2023 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import Form, common, new_test_user
class TestProjectStockBase(common.TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.product_a = cls.en... | 41.271845 | 4,251 |
1,122 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo import api, fields, models
class StockMove(models.Model):
_inherit = "stock.scrap"
task_id = fields.Many2one(
comodel_name="project.task", string="Task", check_company=True
)
... | 33.939394 | 1,120 |
4,803 | py | PYTHON | 15.0 | # Copyright 2022-2023 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo import api, fields, models
class StockMove(models.Model):
_inherit = "stock.move"
task_id = fields.Many2one(
comodel_name="project.task",
string="Related Task",
c... | 38.103175 | 4,801 |
10,204 | py | PYTHON | 15.0 | # Copyright 2022-2023 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class ProjectTask(models.Model):
_inherit = "project.task"
scrap_ids = fields.One2many(
comodel_name="stock.sc... | 37.369963 | 10,202 |
1,594 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo import api, fields, models
class ProjectProject(models.Model):
_inherit = "project.project"
picking_type_id = fields.Many2one(
comodel_name="stock.picking.type",
string="Opera... | 34.608696 | 1,592 |
844 | py | PYTHON | 15.0 | # Copyright 2022 Tecnativa - Víctor Martínez
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo import fields, models
class AccountAnalyticLine(models.Model):
_inherit = "account.analytic.line"
stock_task_id = fields.Many2one(
comodel_name="project.task", string="Project Task", ... | 40.095238 | 842 |
450 | py | PYTHON | 15.0 | # Copyright 2016-2017 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
def post_init_hook(cr, registry):
"""Put the date with 00:00:00 as the date_time for the line."""
cr.execute(
"""UPDATE account_analytic_line
SET date_time = to_timestamp(date || '... | 34.615385 | 450 |
1,005 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2016 Tecnativa - Sergio Teruel
# Copyright 2016-2018 Tecnativa - Pedro M. Baeza
# Copyright 2018 Tecnativa - Ernesto Tejeda
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Project timesheet time control",
"version": "15.0.1.1... | 33.5 | 1,005 |
13,178 | py | PYTHON | 15.0 | # Copyright 2016-2018 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0
from datetime import date, datetime, timedelta
from odoo import exceptions
from odoo.tests import Form, common
from odoo.tools.float_utils import float_compare
class TestProjectTimesheetTimeControl(common.Tr... | 45.441379 | 13,178 |
2,807 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
class HrTimesheetTimeControlMixin(models.AbstractModel):
_name = "hr.timesheet.time_control.mixin"
_description = "Mixin for... | 37.426667 | 2,807 |
985 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
class ProjectTask(models.Model):
_name = "project.task"
_inherit = ["project.task", "hr.timesheet.time_control.mixin"]
@api.model
def _relation_with_timesheet_line(... | 31.774194 | 985 |
957 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
class ProjectProject(models.Model):
_name = "project.project"
_inherit = ["project.project", "hr.timesheet.time_control.mixin"]
@api.model
def _relation_with_timesh... | 34.178571 | 957 |
4,380 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Antonio Espinosa
# Copyright 2016 Tecnativa - Sergio Teruel
# Copyright 2016-2018 Tecnativa - Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from datetime import datetime
from dateutil.relativedelta import relativedelta
from odoo import _, api, fields, mo... | 34.488189 | 4,380 |
7,781 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import UserError
from odoo.osv import expression
class HrTimesheetSwitch(models.TransientModel):
_name = "hr.timesheet.switch"
_description =... | 36.190698 | 7,781 |
648 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Project Template & Milestone",
"summary": """Adds function to copy of milestones when creating
a project from template""",
"author": "Patrick Wilson, Odoo Community Association (OCA),"
"Open Source Integrators"... | 36 | 648 |
3,140 | py | PYTHON | 15.0 | # Copyright 2019 Patrick Wilson <patrickraymondwilson@gmail.com>
# Copyright (C) 2021 Open Source Integrators
# Copyright (C) 2021 Serpent Consulting Services
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import common
class TestProjectTemplate(common.TransactionCase):
def setUp... | 35.681818 | 3,140 |
957 | py | PYTHON | 15.0 | # Copyright 2019 Patrick Wilson <patrickraymondwilson@gmail.com>
# Copyright (C) 2021 Open Source Integrators
# Copyright (C) 2021 Serpent Consulting Services
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models
class ProjectTemplate(models.Model):
_inherit = "project.project"
... | 41.608696 | 957 |
639 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Project Forecast Lines Bokeh Chart",
"summary": "Project Forecast Lines Bokeh Chart",
"version": "15.0.1.0.2",
"author": "Camptocamp SA, Odoo Community Association (OCA)",
"license": "AGPL-3",
... | 35.5 | 639 |
8,504 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import json
# pylint: disable=W7936
from bokeh import palettes
from bokeh.embed import components
from bokeh.layouts import column
from bokeh.models import ColumnDataSource, FactorRange
from bokeh.plotting import figure
fro... | 38.297297 | 8,502 |
746 | py | PYTHON | 15.0 | # Copyright 2018 Onestein (<http://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Project Timeline - Timesheet",
"summary": "Shows the progress of tasks on the timeline view.",
"author": "Onestein, Odoo Community Association (OCA)",
"license": "AGPL-3",
... | 35.52381 | 746 |
578 | py | PYTHON | 15.0 | # Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# Copyright 2020 CorporateHub (https://corporatehub.eu)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Projects List View",
"version": "15.0.2.0.0",
"category": "Project",
"website": "https://github.com/OCA/pr... | 34 | 578 |
1,057 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import SUPERUSER_ID, api
def uninstall_hook(cr, registry):
"""Restore project.project_project_manager_rule"""
env = api.Environment(cr, SUPERUSER_ID, {})
# Removing the 'group_full_project... | 45.956522 | 1,057 |
479 | py | PYTHON | 15.0 | {
"name": "Project Administrator Restricted Visibility",
"version": "15.0.1.0.0",
"summary": "Adds a 'Project Administrator' access group "
"with restricted visibility to 'Projects'",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/project",
"licen... | 36.846154 | 479 |
1,909 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.tests.common import TransactionCase, new_test_user, users
class TestAccountPaymentTermSecurity(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cl... | 38.959184 | 1,909 |
698 | py | PYTHON | 15.0 | # Copyright 2016-2020 Onestein (<http://www.onestein.eu>)
# Copyright 2020 Tecnativa - Manuel Calero
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Project Task Dependencies",
"version": "15.0.1.0.0",
"category": "Project",
"website": "https://github.com/OCA/project",
... | 36.736842 | 698 |
632 | py | PYTHON | 15.0 | from openupgradelib import openupgrade
xml_ids = ["project_task_form"]
@openupgrade.migrate()
def migrate(env, version):
openupgrade.delete_records_safely_by_xml_id(env, xml_ids)
env.cr.execute(
"""
INSERT INTO task_dependencies_rel(task_id, depends_on_id)
SELECT task_id, dependency_t... | 30.095238 | 632 |
1,066 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa <vicent.cubells@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import SUPERUSER_ID, api
def pre_init_hook(cr):
"""
With this pre-init-hook we want to avoid error when creating the UNIQUE
code constraint when the module is installed and ... | 32.30303 | 1,066 |
650 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa <vicent.cubells@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sequential Code for Tasks",
"version": "15.0.1.0.4",
"category": "Project Management",
"author": "OdooMRP team, "
"AvanzOSC, "
"Tecnativa, "
"Odoo Community A... | 27.083333 | 650 |
1,529 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa <vicent.cubells@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import odoo.tests.common as common
class TestProjectTaskCode(common.TransactionCase):
def setUp(self):
super().setUp()
self.project_task_model = self.env["project.task"]
... | 38.225 | 1,529 |
1,225 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa <vicent.cubells@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
class ProjectTask(models.Model):
_inherit = "project.task"
code = fields.Char(
string="Task Number",
required=True,
defaul... | 27.840909 | 1,225 |
753 | py | PYTHON | 15.0 | # Copyright 2012 - 2013 Daniel Reis
# Copyright 2015 - Antiun Ingeniería S.L. - Sergio Teruel
# Copyright 2016 - Tecnativa - Vicent Cubells
# Copyright 2017 - Tecnativa - David Vidal
# Copyright 2018 - Brain-tec AG - Carlos Jesus Cebrian
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0).
{
"name": ... | 41.777778 | 752 |
1,836 | py | PYTHON | 15.0 | # Copyright 2016 Tecnativa - Vicent Cubells
# Copyright 2018 - Brain-tec AG - Carlos Jesus Cebrian
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0).
from odoo.exceptions import ValidationError
from .common import TestProjectCases
class ProjectTaskMaterial(TestProjectCases):
def test_manager_ad... | 31.118644 | 1,836 |
1,141 | py | PYTHON | 15.0 | # Copyright 2018 - Brain-tec AG - Carlos Jesus Cebrian
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0).
from odoo.tests.common import TransactionCase
class TestProjectCases(TransactionCase):
"""Prepare data to test the module."""
def setUp(self):
"""Create user, task, project as w... | 36.806452 | 1,141 |
1,336 | py | PYTHON | 15.0 | # Copyright 2012 - 2013 Daniel Reis
# Copyright 2015 - Antiun Ingeniería S.L. - Sergio Teruel
# Copyright 2016 - Tecnativa - Vicent Cubells
# Copyright 2018 - Brain-tec AG - Carlos Jesus Cebrian
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl-3.0).
from odoo import _, api, fields, models
from odoo.except... | 31.046512 | 1,335 |
589 | py | PYTHON | 15.0 | # Copyright 2019 Patrick Wilson <patrickraymondwilson@gmail.com>
# License LGPLv3.0 or later (https://www.gnu.org/licenses/lgpl-3.0.en.html).
{
"name": "Project Templates",
"summary": """Project Templates""",
"author": "Patrick Wilson, Odoo Community Association (OCA)",
"website": "https://github.com/O... | 34.647059 | 589 |
2,390 | py | PYTHON | 15.0 | # Copyright 2019 Patrick Wilson <patrickraymondwilson@gmail.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests import common
class TestProjectTemplate(common.TransactionCase):
def setUp(self):
super().setUp()
self.test_customer = self.env["res.partner"].create({... | 37.936508 | 2,390 |
2,102 | py | PYTHON | 15.0 | # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class Project(models.Model):
_inherit = "project.project"
is_template = fields.Boolean(copy=False)
# CREATE A PROJECT FROM A TEMPLATE AND OPEN THE NEWLY CREATED PROJECT
def create_project_from_templ... | 38.218182 | 2,102 |
883 | py | PYTHON | 15.0 | import logging
from odoo.api import SUPERUSER_ID, Environment
logger = logging.getLogger(__name__)
def pre_init_hook(cr):
env = Environment(cr, SUPERUSER_ID, {})
# avoid crashing installation because of having same complete_wbs_code
for aa in (
env["account.analytic.account"]
.with_conte... | 30.448276 | 883 |
911 | py | PYTHON | 15.0 | # Copyright 2017-19 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Luxim d.o.o.
# Copyright 2017 Matmoz d.o.o.
# Copyright 2017 Deneroteam.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Project Work Breakdow... | 31.413793 | 911 |
5,583 | py | PYTHON | 15.0 | # Copyright 2017-19 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Luxim d.o.o.
# Copyright 2017 Matmoz d.o.o.
# Copyright 2017 Deneroteam.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo.exceptions import Validati... | 41.051471 | 5,583 |
7,314 | py | PYTHON | 15.0 | # Copyright 2017-19 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Luxim d.o.o.
# Copyright 2017 Matmoz d.o.o.
# Copyright 2017 Deneroteam.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, mo... | 30.731092 | 7,314 |
11,642 | py | PYTHON | 15.0 | # Copyright 2017-19 Eficent Business and IT Consulting Services S.L.
# Copyright 2017 Luxim d.o.o.
# Copyright 2017 Matmoz d.o.o.
# Copyright 2017 Deneroteam.
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from odoo import _, api, fields, mo... | 34.960961 | 11,642 |
425 | py | PYTHON | 15.0 | # Copyright 2017-2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
def uninstall_hook(cr, registry): # pragma: no cover
# Convert priority from High and Very High to Normal
# to avoid inconsistency after the module is uninstalled
cr.execute(
... | 38.636364 | 425 |
647 | py | PYTHON | 15.0 | # Copyright 2016-2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Project Task Add Very High",
"summary": "Adds extra options 'High' and 'Very High' on tasks",
"version": "15.0.1.0.0",
"development_status": "Production/Stable",
"a... | 35.944444 | 647 |
306 | py | PYTHON | 15.0 | # Copyright 2016-2020 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProjectTask(models.Model):
_inherit = "project.task"
priority = fields.Selection(selection_add=[("2", "High"), ("3", "Very High")])
| 30.6 | 306 |
697 | py | PYTHON | 15.0 | # Copyright (C) 2019 - TODAY, Patrick Wilson
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Project - Stock Request",
"summary": "Create stock requests from a projects and project tasks",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"author": "Pavlov Media, Odoo Communi... | 30.304348 | 697 |
412 | py | PYTHON | 15.0 | # Copyright (C) 2019 - TODAY, Patrick Wilson
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class StockRequestOrder(models.Model):
_inherit = "stock.request.order"
project_id = fields.Many2one("project.project", string="Project", tracking=True)
project_ta... | 31.692308 | 412 |
341 | py | PYTHON | 15.0 | # Copyright (C) 2019 - TODAY, Patrick Wilson
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProjectTask(models.Model):
_inherit = "project.task"
stock_request_order_ids = fields.One2many(
"stock.request.order", "project_task_id", string="Stock R... | 28.416667 | 341 |
335 | py | PYTHON | 15.0 | # Copyright (C) 2019 - TODAY, Patrick Wilson
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class Project(models.Model):
_inherit = "project.project"
stock_request_order_ids = fields.One2many(
"stock.request.order", "project_id", string="Stock Request... | 27.916667 | 335 |
586 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
"name": "Project - Create Purchase Orders with Analytic Account",
"version": "15.0.1.0.1",
"author": "Camptocamp, Odoo Community Association (OCA)",
"maintainer": "Camptocamp",
"license": "AGPL-3",
"... | 32.555556 | 586 |
1,743 | py | PYTHON | 15.0 | # Copyright 2023 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from datetime import date
from odoo.tests.common import Form, TransactionCase
class TestProjectPurchaseAnalyticGlobal(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.Pro... | 39.613636 | 1,743 |
606 | py | PYTHON | 15.0 | # Copyright 2023 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl)
from odoo import api, models
class PurchaseOrderLine(models.Model):
_inherit = "purchase.order.line"
@api.depends("product_id", "date_order")
def _compute_account_analytic_id(self):
# prevent standard ... | 35.647059 | 606 |
819 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
from odoo import models
class Project(models.Model):
_inherit = "project.project"
def action_open_project_purchase_orders(self):
action_window = super().action_open_project_purchase_orders()
purchas... | 34.125 | 819 |
1,249 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Project Forecast Lines",
"summary": "Project Forecast Lines",
"version": "15.0.1.3.1",
"author": "Camptocamp SA, Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Project... | 32.868421 | 1,249 |
43,609 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from datetime import date
from freezegun import freeze_time
from odoo.tests.common import Form, TransactionCase, tagged
@tagged("-at_install", "post_install")
class BaseForecastLineTest(TransactionCase):
@classmethod... | 42.462512 | 43,609 |
3,255 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import logging
from odoo import _, api, fields, models
_logger = logging.getLogger(__name__)
class HrLeave(models.Model):
_name = "hr.leave"
_inherit = ["hr.leave", "forecast.line.mixin"]
@api.model_create_m... | 37.848837 | 3,255 |
1,046 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class SaleOrder(models.Model):
_inherit = "sale.order"
default_forecast_date_start = fields.Date()
default_forecast_date_end = fields.Date()
# XXX rewrite this based on a t... | 31.69697 | 1,046 |
1,689 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from dateutil.relativedelta import relativedelta
from odoo import api, models
class ResourceCalendarLeaves(models.Model):
_name = "resource.calendar.leaves"
_inherit = ["resource.calendar.leaves", "forecast.line.m... | 33.117647 | 1,689 |
19,521 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import logging
from datetime import datetime, time
import pytz
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models
from odoo.tools import date_utils, mute_logger
_logger = logging.getLogg... | 39.596349 | 19,521 |
410 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProjectProjectStage(models.Model):
_inherit = "project.project.stage"
forecast_line_type = fields.Selection(
[("forecast", "Forecast"), ("confirmed", "Confirmed")],
... | 34.166667 | 410 |
5,170 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import logging
from odoo import api, fields, models
_logger = logging.getLogger(__name__)
class SaleOrderLine(models.Model):
_name = "sale.order.line"
_inherit = ["sale.order.line", "forecast.line.mixin"]
fo... | 37.737226 | 5,170 |
550 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import models
class ForecastLineModelMixin(models.Model):
_name = "forecast.line.mixin"
_description = "mixin for models which generate forecast lines"
def _get_forecast_lines(self, domain=None):
... | 36.666667 | 550 |
279 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProductTemplate(models.Model):
_inherit = "product.template"
forecast_role_id = fields.Many2one("forecast.role", ondelete="restrict")
| 31 | 279 |
316 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ForecastRole(models.Model):
_name = "forecast.role"
_description = "Employee role for task matching"
name = fields.Char(required=True)
description = fields.Text()
| 28.727273 | 316 |
876 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
forecast_line_granularity = fields.Selection(
[("day", "Day"), ("week", "Week"), ("month", "Month")],
defaul... | 35.04 | 876 |
6,293 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models
class HrJob(models.Model):
_inherit = "hr.job"
role_id = fields.Many2one("forecast.role", ondelete="restrict")
class HrEmpl... | 36.587209 | 6,293 |
9,118 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
import logging
import random
from odoo import api, fields, models
_logger = logging.getLogger(__name__)
class ProjectTask(models.Model):
_name = "project.task"
_inherit = ["project.task", "forecast.line.mixin"]
... | 39.816594 | 9,118 |
641 | py | PYTHON | 15.0 | # Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
forecast_line_granularity = fields.Selection(
related="company_id.forecast_line_granularity"... | 33.736842 | 641 |
539 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Project HR",
"summary": "Link HR with project",
"development_status": "Production/Stable",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"author": "Tecnativa, Odoo Community As... | 35.933333 | 539 |
392 | py | PYTHON | 15.0 | # Copyright 2023 Tecnativa - Pilar Vargas
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from openupgradelib import openupgrade
@openupgrade.migrate()
def migrate(env, version):
# Convert m2o to m2m in 'project.task'
openupgrade.m2o_to_x2m(
env.cr,
env["project.task"],
... | 24.5 | 392 |
4,708 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
_logger = logging.getLogger(__name__)
class TestProjectHr(TransactionCase):
@classmethod
def s... | 39.563025 | 4,708 |
403 | py | PYTHON | 15.0 | # Copyright 2019 Tecnativa - Victor M.M. Torres
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, models
class HrEmployee(models.Model):
_inherit = "hr.employee"
@api.model
def create(self, vals):
employee = super().create(vals)
if employee.category_id... | 26.866667 | 403 |
800 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ResUsers(models.Model):
_inherit = "res.users"
hr_category_ids = fields.Many2many(
comodel_name="hr.employee.category",
string="HR categories... | 34.782609 | 800 |
3,892 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Pedro M. Baeza
# Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, exceptions, fields, models
class ProjectTask(models.Model):
_inherit = "project.task"
employee_ids = fields.Many2ma... | 40.968421 | 3,892 |
466 | py | PYTHON | 15.0 | # Copyright 2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProjectProject(models.Model):
_inherit = "project.project"
hr_category_ids = fields.Many2many(
comodel_name="hr.employee.category",
string="Employ... | 31.066667 | 466 |
843 | py | PYTHON | 15.0 | # Copyright 2018-2019 Brainbean Apps (https://brainbeanapps.com)
# Copyright 2020-2022 CorporateHub (https://corporatehub.eu)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
{
"name": "Project Roles",
"version": "15.0.1.0.1",
"category": "Project",
"website": "https://github.com/O... | 33.72 | 843 |
11,149 | py | PYTHON | 15.0 | # Copyright 2018-2019 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from unittest import mock
from psycopg2 import IntegrityError
from odoo.exceptions import UserError, ValidationError
from odoo.tests import common
from odoo.tools.misc import mute_lo... | 35.733974 | 11,149 |
483 | py | PYTHON | 15.0 | # Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
project_inherit_assignments = fields.Boolean(
string="Projects Inherit Assignments",
... | 28.411765 | 483 |
533 | py | PYTHON | 15.0 | # Copyright 2019 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
project_inherit_assignments = fields.Boolean(
related="company_... | 31.352941 | 533 |
1,711 | py | PYTHON | 15.0 | # Copyright 2018-2019 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ProjectProject(models.Model):
_inherit = "project.project"
assignment_ids = fields.One2many(
string="Project Assignments",
... | 33.54902 | 1,711 |
4,351 | py | PYTHON | 15.0 | # Copyright 2018-2019 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
from odoo.tools.translate import html_translate
class ProjectRole(models.Model):
_name = "project.r... | 31.759124 | 4,351 |
5,256 | py | PYTHON | 15.0 | # Copyright 2018-2019 Brainbean Apps (https://brainbeanapps.com)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class ProjectAssignment(models.Model):
_name = "project.assignment"
_description = "Project Ass... | 33.477707 | 5,256 |
561 | py | PYTHON | 15.0 | # Copyright (C) 2021 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
{
"name": "Project Duplicate subtask",
"version": "15.0.1.0.0",
"category": "Project",
"website": "https://github.com/OCA/project",
"summary": "The module adds an action to duplicate tasks with ... | 35.0625 | 561 |
1,891 | py | PYTHON | 15.0 | # Copyright (C) 2021 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo.tests.common import TransactionCase
class TestProjectDuplicateSubtask(TransactionCase):
def setUp(self):
super().setUp()
self.project1 = self.env["project.project"].create({"name": ... | 37.078431 | 1,891 |
1,361 | py | PYTHON | 15.0 | # Copyright (C) 2021 ForgeFlow S.L.
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html)
from odoo import models
class ProjectTask(models.Model):
_inherit = "project.task"
def action_duplicate_subtasks(self):
action = self.env.ref("project.action_view_task")
result = action.r... | 34.897436 | 1,361 |
554 | py | PYTHON | 15.0 | # Copyright 2014 Daniel Reis
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Add State field to Project Stages",
"version": "15.0.1.0.1",
"category": "Project Management",
"summary": "Restore State attribute removed from Project Stages in 8.0",
"author": "Daniel Reis, Od... | 36.933333 | 554 |
445 | py | PYTHON | 15.0 | # Copyright 2014 Daniel Reis
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import fields, models
_TASK_STATE = [
("draft", "New"),
("open", "In Progress"),
("pending", "Pending"),
("done", "Done"),
("cancelled", "Cancelled"),
]
class ProjectTaskType(models.Model):
... | 22.25 | 445 |
304 | py | PYTHON | 15.0 | # Copyright 2014 Daniel Reis
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from odoo import fields, models
class ProjectTask(models.Model):
"""Added state in the Project Task."""
_inherit = "project.task"
state = fields.Selection(related="stage_id.state", store=True)
| 25.333333 | 304 |
1,032 | py | PYTHON | 15.0 | # Copyright 2021 Moka Tourisme (https://www.mokatourisme.fr).
# @author Iván Todorovich <ivan.todorovich@gmail.com>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Point of Sale Event Sessions",
"summary": "Sell event sessions from Point of Sale",
"author": "Moka Tourisme, Odoo ... | 33.258065 | 1,031 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.