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
|
556
|
py
|
PYTHON
|
15.0
|
# Copyright 2015 Therp BV <http://therp.nl>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Matomo analytics",
"version": "15.0.1.0.0",
"author": "Onestein,Therp BV,Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Website",
"summary": "Track website users using matomo",
"website": "https://github.com/OCA/website",
"depends": [
"website",
],
"data": [
"views/res_config_settings.xml",
"views/templates.xml",
],
"installable": True,
}
| 27.8
| 556
|
4,668
|
py
|
PYTHON
|
15.0
|
# Copyright 2023 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
from lxml import html
from odoo.tests import common, tagged
@tagged("-at_install", "post_install")
class TestWebsiteAnalyticsMatomo(common.HttpCase):
def setUp(self):
super().setUp()
self.website = self.env.ref("website.default_website")
self.base_view = self.env["ir.ui.view"].create(
{
"name": "Base",
"type": "qweb",
"arch": """<t name="Homepage" t-name="website.base_view">
<t t-call="website.layout">
I am a generic page
</t>
</t>""",
"key": "test.base_view",
}
)
self.page = self.env["website.page"].create(
{
"view_id": self.base_view.id,
"url": "/page_1",
"is_published": True,
"website_id": self.website.id,
}
)
def test_01_defaults(self):
"""Check default values"""
self.assertFalse(self.website.has_matomo_analytics)
self.assertEqual(self.website.matomo_analytics_id, "1")
self.assertFalse(self.website.matomo_analytics_host)
self.assertFalse(self.website.matomo_analytics_host_url)
self.assertFalse(self.website.matomo_enable_heartbeat)
self.assertEqual(self.website.matomo_heartbeat_timer, 15)
self.assertFalse(self.website.matomo_enable_userid)
self.assertFalse(self.website.matomo_get_userid)
def test_02_compute_matomo_analytics_host_url(self):
"""Computation of field matomo_analytics_host_url"""
self.website.has_matomo_analytics = True
self.assertEqual(self.website.matomo_analytics_host_url, "")
self.website.matomo_analytics_host = "matomo.example.host"
self.assertIn("https://", self.website.matomo_analytics_host_url)
self.assertIn("matomo.example.host", self.website.matomo_analytics_host_url)
self.website.matomo_analytics_host = "http://matomo.example.host"
self.assertIn("http://", self.website.matomo_analytics_host_url)
self.assertIn("matomo.example.host", self.website.matomo_analytics_host_url)
self.website.matomo_analytics_host = ""
self.assertEqual(self.website.matomo_analytics_host_url, "")
def test_03_compute_matomo_userid(self):
"""Computation of field matomo_get_userid"""
self.website.has_matomo_analytics = True
self.website.matomo_analytics_host = "matomo.example.host"
self.assertEqual(self.website.matomo_get_userid, "")
self.website.matomo_enable_userid = True
self.assertTrue(self.website.matomo_get_userid)
self.assertEqual(self.website.matomo_get_userid, str(self.env.user.id))
self.assertNotEqual(self.website.matomo_get_userid, self.website.user_id.login)
self.website.matomo_analytics_host = ""
self.assertEqual(self.website.matomo_get_userid, "")
def test_04_tracker_script_in_page(self):
"""Check matomo tracker script in the page"""
# matomo tracker script not in the page
self.authenticate("admin", "admin")
r = self.url_open(self.page.url)
self.assertEqual(r.status_code, 200)
root_html = html.fromstring(r.content)
tracking_script = root_html.xpath('//script[@id="matomo_analytics"]')
self.assertFalse(tracking_script)
# enable analytics tracker
self.website.has_matomo_analytics = True
self.website.matomo_analytics_host = "matomo.example.host"
# matomo tracker script present in the page
self.authenticate("admin", "admin")
r = self.url_open(self.page.url)
self.assertEqual(r.status_code, 200)
root_html = html.fromstring(r.content)
tracking_script = root_html.xpath('//script[@id="matomo_analytics"]')[0]
self.assertIn("trackPageView", tracking_script.text)
self.assertIn("enableLinkTracking", tracking_script.text)
self.assertIn("setSiteId", tracking_script.text)
self.assertNotIn("setUserId", tracking_script.text)
# enable User ID feature
self.website.matomo_enable_userid = True
# Tracking User ID enabled in the page
r = self.url_open(self.page.url)
self.assertEqual(r.status_code, 200)
root_html = html.fromstring(r.content)
tracking_script = root_html.xpath('//script[@id="matomo_analytics"]')[0]
self.assertIn("setUserId", tracking_script.text)
| 42.436364
| 4,668
|
1,015
|
py
|
PYTHON
|
15.0
|
# Copyright 2015 Therp BV <http://therp.nl>
# Copyright 2023 Onestein (<https://www.onestein.eu>)
# 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"
has_matomo_analytics = fields.Boolean(
"Matomo Analytics",
related="website_id.has_matomo_analytics",
readonly=False,
)
matomo_analytics_id = fields.Char(
related="website_id.matomo_analytics_id", readonly=False
)
matomo_analytics_host = fields.Char(
related="website_id.matomo_analytics_host", readonly=False
)
matomo_enable_heartbeat = fields.Boolean(
related="website_id.matomo_enable_heartbeat", readonly=False
)
matomo_heartbeat_timer = fields.Integer(
related="website_id.matomo_heartbeat_timer", readonly=False
)
matomo_enable_userid = fields.Boolean(
related="website_id.matomo_enable_userid", readonly=False
)
| 33.833333
| 1,015
|
2,743
|
py
|
PYTHON
|
15.0
|
# Copyright 2015 Therp BV <http://therp.nl>
# Copyright 2023 Onestein (<https://www.onestein.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from urllib.parse import urlparse
from odoo import api, fields, models
class Website(models.Model):
_inherit = "website"
has_matomo_analytics = fields.Boolean("Matomo Analytics")
matomo_analytics_id = fields.Char(
"Matomo website ID",
help="The ID Matomo uses to identify the website",
default="1",
)
matomo_analytics_host = fields.Char(
"Matomo host",
help="The host/path your Matomo installation is "
"accessible by on the internet.",
)
matomo_analytics_host_url = fields.Char(
string="Matomo host URL",
compute="_compute_matomo_analytics_host_url",
store=True,
)
matomo_enable_heartbeat = fields.Boolean()
matomo_heartbeat_timer = fields.Integer(
help="How many seconds a tab needs to be active to be counted as viewed.",
default=15,
)
matomo_enable_userid = fields.Boolean()
matomo_get_userid = fields.Char(compute="_compute_matomo_userid")
@api.depends("matomo_analytics_host")
def _compute_matomo_analytics_host_url(self):
"""Formats a proper Matomo host URL based on matomo_analytics_host"""
for website in self.filtered(lambda w: not w.matomo_analytics_host):
website.matomo_analytics_host_url = ""
for website in self.filtered(lambda w: w.matomo_analytics_host):
parsed_url = urlparse(website.matomo_analytics_host)
if parsed_url.scheme not in ("http", "https"):
parsed_url = parsed_url._replace(scheme="https")
host_url = parsed_url.geturl()
host_url = host_url.rstrip("/") # Remove potential trailing slash
website.matomo_analytics_host_url = host_url
@api.depends_context("uid")
@api.depends("matomo_analytics_host", "matomo_enable_userid")
def _compute_matomo_userid(self):
"""Gets the unique user ID of the current user. Here we assume that user ID
is the "login" field of "res.users".
Override this method if you want to use a different user ID.
"""
for website in self.filtered(
lambda w: not w.matomo_analytics_host or not w.matomo_enable_userid
):
website.matomo_get_userid = ""
for website in self.filtered(
lambda w: w.matomo_analytics_host and w.matomo_enable_userid
):
if self.env.user != website.user_id: # current user is logged in
website.matomo_get_userid = str(self.env.user.id)
else:
website.matomo_get_userid = ""
| 40.940299
| 2,743
|
596
|
py
|
PYTHON
|
15.0
|
# Copyright 2021 Studio73 - Ioan Galan <ioan@studio73.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Website Cookiefirst",
"summary": "Cookiefirst integration",
"category": "Website",
"version": "15.0.1.0.0",
"author": "Studio73, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/website",
"license": "AGPL-3",
"depends": ["portal", "website"],
"data": [
"data/cookies_policy.xml",
"views/portal_template.xml",
"views/res_config_settings_views.xml",
],
"installable": True,
}
| 33.111111
| 596
|
995
|
py
|
PYTHON
|
15.0
|
# Copyright 2021 Studio73 - Ioan Galan <ioan@studio73.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
@api.depends("website_id.cookiefirst_identifier")
def _compute_cookiefirst_enabled(self):
for record in self:
record.update({"cookiefirst_enabled": bool(record.cookiefirst_identifier)})
def _inverse_cookiefirst_enabled(self):
for record in self:
if not record.cookiefirst_enabled:
record.website_id.update({"cookiefirst_identifier": False})
cookiefirst_identifier = fields.Char(
string="Cookiefirst ID",
related="website_id.cookiefirst_identifier",
readonly=False,
)
cookiefirst_enabled = fields.Boolean(
string="Use Cookiefirst",
compute="_compute_cookiefirst_enabled",
inverse="_inverse_cookiefirst_enabled",
)
| 34.310345
| 995
|
372
|
py
|
PYTHON
|
15.0
|
# Copyright 2021 Studio73 - Ioan Galan <ioan@studio73.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class Website(models.Model):
_inherit = "website"
cookiefirst_identifier = fields.Char(
string="Cookiefirst ID",
help="This field holds the ID, needed for Cookiefirst functionality.",
)
| 28.615385
| 372
|
858
|
py
|
PYTHON
|
15.0
|
# Copyright 2022 Odoo S. A.
# Copyright 2022 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
{
"name": "Plausible analytics",
"version": "15.0.1.1.0",
"author": "Odoo S.A., ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/website",
"maintainers": ["LoisRForgeFlow"],
"license": "LGPL-3",
"category": "Website",
"summary": "Track website users using plausible",
"depends": ["website"],
"data": [
"views/website_config_settings.xml",
"views/templates.xml",
],
"assets": {
"web.assets_backend": [
"website_plausible/static/src/scss/website.backend.scss",
],
"web.assets_qweb": [
"website_plausible/static/src/xml/website.backend.xml",
],
},
"installable": True,
}
| 30.642857
| 858
|
1,755
|
py
|
PYTHON
|
15.0
|
# Copyright 2022 Odoo S. A.
# Copyright 2022 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
from werkzeug import urls
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
plausible_shared_key = fields.Char(
"Plausible auth Key", related="website_id.plausible_shared_key", readonly=False
)
plausible_site = fields.Char(
"Plausible Site (e.g. domain.com)",
related="website_id.plausible_site",
readonly=False,
)
has_plausible_shared_key = fields.Boolean(
"Plausible Analytics",
compute="_compute_has_plausible_shared_key",
inverse="_inverse_has_plausible_shared_key",
)
@api.onchange("plausible_shared_key")
def _onchange_shared_key(self):
for config in self:
value = config.plausible_shared_key
if value and value.startswith("http"):
try:
url = urls.url_parse(value)
config.plausible_shared_key = urls.url_decode(url.query).get(
"auth", ""
)
config.plausible_site = url.path.split("/")[-1]
except Exception: # pylint: disable=W7938
pass
@api.depends("website_id")
def _compute_has_plausible_shared_key(self):
for config in self:
config.has_plausible_shared_key = bool(config.plausible_shared_key)
def _inverse_has_plausible_shared_key(self):
for config in self:
if config.has_plausible_shared_key:
continue
config.plausible_shared_key = False
config.plausible_site = False
| 34.411765
| 1,755
|
1,124
|
py
|
PYTHON
|
15.0
|
# Copyright 2022 Odoo S. A.
# Copyright 2022 ForgeFlow S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html)
from werkzeug import urls
from odoo import fields, models
class Website(models.Model):
_inherit = "website"
plausible_shared_key = fields.Char()
plausible_site = fields.Char()
def _get_plausible_script_url(self):
return (
self.env["ir.config_parameter"]
.sudo()
.get_param(
"website.plausible_script", "https://plausible.io/js/plausible.js"
)
)
def _get_plausible_server(self):
return (
self.env["ir.config_parameter"]
.sudo()
.get_param("website.plausible_server", "https://plausible.io")
)
def _get_plausible_share_url(self):
embed_url = (
f"/share/{self.plausible_site}"
f"?auth={self.plausible_shared_key}&embed=true&theme=system"
)
return (
self.plausible_shared_key
and urls.url_join(self._get_plausible_server(), embed_url)
or ""
)
| 27.414634
| 1,124
|
757
|
py
|
PYTHON
|
15.0
|
from odoo import http
from odoo.http import request
from odoo.addons.website.controllers.backend import WebsiteBackend
class WebsitePlausibleBackend(WebsiteBackend):
@http.route("/website/fetch_dashboard_data", type="json", auth="user")
def fetch_dashboard_data(self, website_id, date_from, date_to):
res = super().fetch_dashboard_data(website_id, date_from, date_to)
Website = request.env["website"]
request.env.user.has_group("website.group_website_designer")
current_website = (
website_id and Website.browse(website_id) or Website.get_current_website()
)
res["dashboards"][
"plausible_share_url"
] = current_website._get_plausible_share_url()
return res
| 39.842105
| 757
|
607
|
py
|
PYTHON
|
15.0
|
# Copyright 2014 Jorge Camacho <jcamacho@trey.es>
# Copyright 2015 Antonio Espinosa <antonioea@antiun.com>
# Copyright 2016-2018 Vicent Cubells <vicent.cubells@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Website CRM privacy policy",
"category": "Website",
"version": "15.0.1.1.0",
"website": "https://github.com/OCA/website",
"author": "Trey, Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"installable": True,
"depends": ["website_crm", "website_legal_page"],
"data": ["templates/contactus.xml"],
}
| 40.466667
| 607
|
685
|
py
|
PYTHON
|
15.0
|
# Copyright 2016 ABF OSIELL <http://osiell.com>
# Copyright 2018 Tecnativa - Cristina Martin R.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Google Tag Manager",
"version": "15.0.2.0.0",
"author": "ABF OSIELL, Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"category": "Website",
"website": "https://github.com/OCA/website",
"summary": "Add support for Google Tag Manager",
"depends": ["website"],
"data": ["views/res_config_settings_view.xml", "views/website_templates.xml"],
"images": ["static/description/website_google_tag_manager.png"],
}
| 40.294118
| 685
|
413
|
py
|
PYTHON
|
15.0
|
# Copyright 2016 ABF OSIELL <http://osiell.com>
# Copyright 2018 Tecnativa - Cristina Martin R.
# 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"
google_tag_manager_key = fields.Char(
"Container ID", related="website_id.google_tag_manager_key", readonly=False
)
| 31.769231
| 413
|
307
|
py
|
PYTHON
|
15.0
|
# Copyright 2016 ABF OSIELL <http://osiell.com>
# Copyright 2018 Tecnativa - Cristina Martin R.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class Website(models.Model):
_inherit = "website"
google_tag_manager_key = fields.Char("Container ID")
| 27.909091
| 307
|
646
|
py
|
PYTHON
|
15.0
|
# Copyright 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# Copyright 2019 Tecnativa - Cristina Martin R.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
{
"name": "Website Breadcrumbs",
"summary": "Let you have breadcrumbs in website pages",
"version": "15.0.1.0.0",
"category": "Website",
"website": "https://github.com/OCA/website",
"author": "Grupo ESOC Ingeniería de Servicios, Odoo Community Association (OCA)",
"license": "LGPL-3",
"application": False,
"installable": True,
"depends": ["website"],
"data": ["views/templates.xml", "views/layout.xml"],
}
| 40.25
| 644
|
986
|
py
|
PYTHON
|
15.0
|
# Copyright 2015 Grupo ESOC Ingeniería de Servicios, S.L.U. - Jairo Llopis
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
from odoo import models
class WebsiteMenu(models.Model):
_inherit = "website.menu"
def get_parents(self, revert=False, include_self=False):
"""List current menu's parents.
:param bool revert:
Indicates if the result must be revert before returning.
Activating this will mean that the result will be ordered from
parent to child.
:param bool include_self:
Indicates if the current menu item must be included in the result.
:return list:
Menu items ordered from child to parent, unless ``revert=True``.
"""
result = list()
menu = self if include_self else self.parent_id
while menu:
result.append(menu)
menu = menu.parent_id
return reversed(result) if revert else result
| 33.965517
| 985
|
789
|
py
|
PYTHON
|
15.0
|
# Copyright 2023 Tecnativa - Carlos Roca
# License LGPL-3.0 or later (http://www.gnu.org/licenses/lgpl.html).
{
"name": "Website Form Require Legal",
"summary": "Add possibility to require confirm legal terms.",
"version": "15.0.1.0.0",
"category": "Website",
"license": "LGPL-3",
"website": "https://github.com/OCA/website",
"author": "Tecnativa, Odoo Community Association (OCA)",
"application": False,
"installable": True,
"depends": ["website"],
"data": ["views/snippets.xml"],
"assets": {
"website.assets_wysiwyg": [
"website_form_require_legal/static/src/js/options.js"
],
"web.assets_frontend": [
"website_form_require_legal/static/src/scss/website_form_legal.scss"
],
},
}
| 34.304348
| 789
|
645
|
py
|
PYTHON
|
15.0
|
# Copyright 2020 Trey - Antonio González <antonio@trey.es>
# Copyright 2021 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Website Cookiebot",
"summary": "Ask for cookies consent connecting with Cookiebot",
"category": "Website",
"version": "15.0.1.0.0",
"author": "Trey (www.trey.es), Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/website",
"license": "AGPL-3",
"depends": ["website"],
"data": [
"templates/assets.xml",
"templates/website.xml",
"wizards/res_config_settings_views.xml",
],
}
| 35.777778
| 644
|
372
|
py
|
PYTHON
|
15.0
|
# Copyright 2020 Trey - Antonio González <antonio@trey.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class Website(models.Model):
_inherit = "website"
cookiebot_dgid = fields.Char(
string="Cookiebot Domain Group ID",
help="Get this code from Cookiebot to enable it on the website.",
)
| 28.538462
| 371
|
763
|
py
|
PYTHON
|
15.0
|
# Copyright 2020 Trey - Antonio González <antonio@trey.es>
# Copyright 2021 Tecnativa - Jairo Llopis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
cookiebot_dgid = fields.Char(
string="Domain Group ID",
related="website_id.cookiebot_dgid",
readonly=False,
)
cookiebot_enabled = fields.Boolean(
string="Cookiebot",
compute="_compute_cookiebot_enabled",
readonly=False,
)
@api.depends("website_id.cookiebot_dgid")
def _compute_cookiebot_enabled(self):
for record in self:
record.cookiebot_enabled = bool(record.cookiebot_dgid)
| 30.48
| 762
|
642
|
py
|
PYTHON
|
15.0
|
# Copyright 2023 Onestein (<http://www.onestein.eu>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Website Snippet Dynamic Link",
"category": "Website",
"version": "15.0.1.0.0",
"author": "Onestein, Odoo Community Association (OCA)",
"license": "AGPL-3",
"website": "https://github.com/OCA/website",
"depends": [
"website",
"web_editor",
],
"data": [
"security/ir.model.access.csv",
"views/website_dynamic_link_view.xml",
"views/snippets/snippets.xml",
"views/snippets/s_dynamic_link.xml",
"menuitems.xml",
],
}
| 30.571429
| 642
|
392
|
py
|
PYTHON
|
15.0
|
from odoo import fields, models
class WebsiteDynamicLink(models.Model):
_name = "website.dynamic.link"
_description = "Website Dynamic Link"
active = fields.Boolean(default=True)
name = fields.Char(required=True)
url = fields.Char(required=True)
website_id = fields.Many2one("website")
icon = fields.Image("Logo", max_height=128, max_width=128, required=True)
| 30.153846
| 392
|
534
|
py
|
PYTHON
|
15.0
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Project Task Milestones",
"summary": "Project Task Milestones",
"author": "Mantas Šniukas, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/project",
"category": "Project Management",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"depends": ["project"],
"data": [
"views/project_task.xml",
],
"application": False,
"development_status": "Beta",
"maintainers": ["mantux11"],
}
| 29.611111
| 533
|
1,800
|
py
|
PYTHON
|
15.0
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.tests import common
class TestProjectMilestone(common.TransactionCase):
def setUp(self):
super().setUp()
self.test_project = self.env["project.project"].create({"name": "TestProject"})
self.test_project_milestone_1 = self.env["project.milestone"].create(
{"name": "TestMilestone_1", "project_id": self.test_project.id}
)
self.test_project_milestone_2 = self.env["project.milestone"].create(
{"name": "TestMilestone_2", "project_id": self.test_project.id}
)
self.test_open_stage = self.env["project.task.type"].create(
{"name": "TestOpenStage"}
)
self.test_close_stage = self.env["project.task.type"].create(
{"name": "TestCloseStage", "is_closed": True}
)
self.test_task = self.env["project.task"].create(
{
"name": "TestTask",
"project_id": self.test_project.id,
"milestone_id": self.test_project_milestone_1.id,
"stage_id": self.test_open_stage.id,
}
)
self.env["project.task"].create(
{
"name": "TestTask",
"project_id": self.test_project.id,
"milestone_id": self.test_project_milestone_1.id,
"stage_id": self.test_close_stage.id,
}
)
def test_read_group_milestone_ids(self):
domain = [("project_id", "=", self.test_project.id)]
Task = self.env["project.task"]
Task = Task.with_context(default_project_id=self.test_project.id)
grouped_tasks = Task.read_group(domain, ["name"], ["milestone_id"])
self.assertEqual(len(grouped_tasks), 2)
| 40.909091
| 1,800
|
696
|
py
|
PYTHON
|
15.0
|
# 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"
milestone_id = fields.Many2one(
"project.milestone",
string="Milestone",
group_expand="_read_group_milestone_ids",
domain="[('project_id', '=', project_id)]",
)
@api.model
def _read_group_milestone_ids(self, milestone_ids, domain, order):
if "default_project_id" in self.env.context:
milestone_ids = self.env["project.milestone"].search(
[("project_id", "=", self.env.context["default_project_id"])]
)
return milestone_ids
| 31.636364
| 696
|
282
|
py
|
PYTHON
|
15.0
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProjectMilestone(models.Model):
_inherit = "project.milestone"
project_task_ids = fields.One2many(
"project.task", "milestone_id", string="Project Tasks"
)
| 25.636364
| 282
|
612
|
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 Product Set",
"version": "15.0.1.0.2",
"category": "Project Management",
"website": "https://github.com/OCA/project",
"author": "Tecnativa, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["project_stock", "sale_product_set"],
"installable": True,
"data": [
"security/ir.model.access.csv",
"wizard/product_set_add.xml",
"views/project_task_view.xml",
],
"maintainers": ["victoralmau"],
}
| 33.888889
| 610
|
3,098
|
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
from odoo.tests.common import users
from odoo.addons.project_stock.tests.common import TestProjectStockBase
class TestProjectStockProductSet(TestProjectStockBase):
@classmethod
def setUpClass(cls):
super().setUpClass()
cls.task = cls._create_task(cls, [])
cls.product_set = cls.env["product.set"].create(
{
"name": "Test product set",
"set_line_ids": [
(0, 0, {"product_id": cls.product_a.id, "quantity": 2}),
(0, 0, {"product_id": cls.product_b.id, "quantity": 1}),
],
}
)
@users("project-task-user")
def test_wizard_product_set_add_1(self):
self.assertFalse(self.task.move_ids)
wizard_form = Form(
self.env["product.set.add.from.task"].with_context(
default_task_id=self.task.id
)
)
wizard_form.product_set_id = self.product_set
wizard = wizard_form.save()
wizard.add_set()
self.assertTrue(self.task.group_id)
self.assertEqual(len(self.task.move_ids), 2)
self.assertIn(self.product_a, self.task.move_ids.mapped("product_id"))
self.assertIn(self.product_b, self.task.move_ids.mapped("product_id"))
self.assertEqual(sum(self.task.move_ids.mapped("product_uom_qty")), 3)
@users("project-task-user")
def test_wizard_product_set_add_2(self):
# Create manual product before
task_form = Form(self.task)
with task_form.move_ids.new() as move_form:
move_form.product_id = self.product_c
move_form.product_uom_qty = 1
task_form.save()
self.assertEqual(len(self.task.move_ids), 1)
self.assertTrue(self.task.group_id)
# Wizard to add set
wizard_form = Form(
self.env["product.set.add.from.task"].with_context(
default_task_id=self.task.id
)
)
wizard_form.product_set_id = self.product_set
wizard = wizard_form.save()
wizard.add_set()
self.assertTrue(self.task.group_id)
self.assertEqual(len(self.task.move_ids), 3)
self.assertIn(self.product_a, self.task.move_ids.mapped("product_id"))
self.assertIn(self.product_b, self.task.move_ids.mapped("product_id"))
self.assertEqual(sum(self.task.move_ids.mapped("product_uom_qty")), 4)
self.task.action_confirm()
self.assertEqual(len(self.task.move_ids), 3)
move_a = self.task.move_ids.filtered(lambda x: x.product_id == self.product_a)
self.assertEqual(move_a.group_id, self.task.group_id)
move_b = self.task.move_ids.filtered(lambda x: x.product_id == self.product_b)
self.assertEqual(move_b.group_id, self.task.group_id)
move_c = self.task.move_ids.filtered(lambda x: x.product_id == self.product_c)
self.assertEqual(move_c.group_id, self.task.group_id)
| 43
| 3,096
|
1,312
|
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 ProductSetAddFromTask(models.TransientModel):
_inherit = "product.set.add"
_name = "product.set.add.from.task"
_description = "product.set.add.from.task"
order_id = fields.Many2one(required=False)
task_id = fields.Many2one(
comodel_name="project.task",
string="Task",
required=True,
default=lambda self: self.env.context.get("active_id")
if self.env.context.get("active_model") == "project.task"
else None,
ondelete="cascade",
)
def _prepare_stock_move_lines(self):
move_lines = []
for _seq, set_line in enumerate(self._get_lines(), start=1):
values = set_line._prepare_stock_move_values(self.task_id, self.quantity)
move_lines.append((0, 0, values))
return move_lines
def add_set(self):
if not self.task_id:
return super().add_set()
self._check_partner()
self.task_id._set_procurement_group_id() # We make sure it is defined
move_lines = self._prepare_stock_move_lines()
if move_lines:
self.task_id.write({"move_ids": move_lines})
return move_lines
| 35.405405
| 1,310
|
1,047
|
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 models
class ProductSetLine(models.Model):
_inherit = "product.set.line"
def _prepare_stock_move_values(self, task, quantity):
self.ensure_one()
return {
"name": self.product_id.display_name,
"product_id": self.product_id.id,
"product_uom_qty": self.quantity * quantity,
"product_uom": self.product_id.uom_id.id,
# According to default values set from stock_move field in task form
"location_id": (task.location_id.id or task.project_id.location_id.id),
"location_dest_id": (
task.location_dest_id.id or task.project_id.location_dest_id.id
),
"group_id": task.group_id.id,
"state": "draft",
"raw_material_task_id": task.id,
"picking_type_id": task.picking_type_id.id
or task.project_id.picking_type_id.id,
}
| 40.192308
| 1,045
|
617
|
py
|
PYTHON
|
15.0
|
# Copyright 2017 Specialty Medical Drugstore
# Copyright 2018 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Project Task Pull Request",
"summary": "Adds a field for a PR URI to project tasks",
"version": "15.0.1.0.1",
"category": "Project Management",
"website": "https://github.com/OCA/project",
"author": "SMDrugstore, " "Tecnativa, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
"application": False,
"installable": True,
"depends": ["project"],
"data": ["views/project_task_pull_request_view.xml"],
}
| 38.5625
| 617
|
2,630
|
py
|
PYTHON
|
15.0
|
# Copyright 2017 Specialty Medical Drugstore
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
class TestProjectTaskPullRequest(TransactionCase):
post_install = True
at_install = False
def setUp(self):
super(TestProjectTaskPullRequest, self).setUp()
project_obj = self.env["project.project"]
task_obj = self.env["project.task"]
self.new_stage = self.ref("project.project_stage_0")
self.inprogress_stage = self.ref("project.project_stage_1")
self.done_stage = self.ref("project.project_stage_2")
self.cancel_stage = self.ref("project.project_stage_3")
self.project_1 = project_obj.create(
{"name": "Test Project 1", "pr_required_states": [(4, self.done_stage)]}
)
self.project_2 = project_obj.create(
{
"name": "Test Project 2",
"pr_required_states": [
(4, self.done_stage),
(4, self.inprogress_stage),
],
}
)
self.task_1 = task_obj.create(
{
"name": "Test Task 1",
"project_id": self.project_1.id,
"pr_uri": False,
"stage_id": self.new_stage,
}
)
self.task_2 = task_obj.create(
{
"name": "Test Task 2",
"project_id": self.project_2.id,
"pr_uri": False,
"stage_id": self.new_stage,
}
)
self.task_3 = task_obj.create(
{
"name": "Test Task 3",
"project_id": self.project_2.id,
"pr_uri": "github.com",
"stage_id": self.new_stage,
}
)
def test_write_allowed_when_allowed(self):
self.task_1.write({"stage_id": self.inprogress_stage})
self.task_1.refresh()
self.assertEqual(self.inprogress_stage, self.task_1.stage_id.id)
def test_write_not_allowed_without_pr(self):
with self.assertRaises(ValidationError):
self.task_1.write({"stage_id": self.done_stage})
def test_write_not_allowed_without_pr_multiple_stages(self):
with self.assertRaises(ValidationError):
self.task_2.write({"stage_id": self.inprogress_stage})
def test_write_allowed_with_pr(self):
self.task_3.write({"stage_id": self.done_stage})
self.task_3.refresh()
self.assertEqual(self.done_stage, self.task_3.stage_id.id)
| 34.605263
| 2,630
|
928
|
py
|
PYTHON
|
15.0
|
# Copyright 2017 Specialty Medical Drugstore
# 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"
pr_uri = fields.Char(string="PR URI", tracking=True)
pr_required_states = fields.Many2many(related="project_id.pr_required_states")
@api.constrains("pr_uri", "stage_id", "project_id")
def _check_pr_uri_required(self):
for task in self:
stages_pr_req = task.project_id.pr_required_states
is_stage_pr_req = task.stage_id in stages_pr_req
if not task.pr_uri and stages_pr_req and is_stage_pr_req:
raise exceptions.ValidationError(
_(
"Please add the URI for the pull request "
"before moving the task to this stage."
)
)
| 37.12
| 928
|
418
|
py
|
PYTHON
|
15.0
|
# Copyright 2017 Specialty Medical Drugstore
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields, models
class Project(models.Model):
_inherit = "project.project"
_name = "project.project"
pr_required_states = fields.Many2many(
"project.task.type",
"project_pr_required",
"project_id",
"state_id",
"PR Required States",
)
| 24.588235
| 418
|
703
|
py
|
PYTHON
|
15.0
|
# Copyright 2023 Moduon Team S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
{
"name": "Project Sequence",
"summary": "Add a sequence field to projects, filled automatically",
"version": "15.0.0.2.1",
"development_status": "Alpha",
"category": "Services/Project",
"website": "https://github.com/OCA/project",
"author": "Moduon, Odoo Community Association (OCA)",
"maintainers": ["yajo", "anddago78"],
"license": "LGPL-3",
"application": False,
"installable": True,
"depends": ["project"],
"data": [
"data/ir_sequence.xml",
"views/project_project.xml",
"wizards/res_config_settings_view.xml",
],
}
| 31.954545
| 703
|
5,762
|
py
|
PYTHON
|
15.0
|
# Copyright 2023 Moduon Team S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from freezegun import freeze_time
from psycopg2 import IntegrityError
from odoo.tests.common import Form, SavepointCase, new_test_user, users
from odoo.tools import mute_logger
@freeze_time("2023-01-01 12:00:00")
class TestProjectSequence(SavepointCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
new_test_user(
cls.env,
"manager",
"project.group_project_manager,analytic.group_analytic_accounting",
)
cls.pjr_seq = cls.env.ref("project_sequence.seq_project_sequence")
cls.pjr_seq.date_range_ids.unlink()
cls.analytic_account = cls.env["account.analytic.account"].create(
{"name": "aaa"}
)
def setUp(self):
super().setUp()
self.pjr_seq._get_current_sequence().number_next = 11
@users("manager")
def test_sequence_after_creation(self):
"""Sequence is applied only after project creation."""
prj_f = Form(self.env["project.project"])
self.assertFalse(prj_f.name)
self.assertFalse(prj_f.sequence_code)
proj = prj_f.save()
self.assertTrue(proj.sequence_code)
self.assertEqual(proj.name, proj.sequence_code)
self.assertEqual(proj.sequence_code, "23-00011")
self.assertEqual(proj.display_name, "23-00011")
def test_analytic_account_after_creation_no_name(self):
"""Project's analytic account is named like project's default name."""
proj = self.env["project.project"].create(
{"analytic_account_id": self.analytic_account.id}
)
self.assertEqual(proj.sequence_code, "23-00011")
self.assertEqual(proj.name, "23-00011")
self.assertEqual(proj.display_name, "23-00011")
self.assertEqual(proj.analytic_account_id.name, "23-00011")
def test_analytic_account_after_creation_named(self):
"""Project's analytic account is named like project's display name."""
proj = self.env["project.project"].create(
{"name": "whatever", "analytic_account_id": self.analytic_account.id}
)
self.assertEqual(proj.sequence_code, "23-00011")
self.assertEqual(proj.name, "whatever")
self.assertEqual(proj.display_name, "23-00011 - whatever")
self.assertEqual(proj.analytic_account_id.name, "23-00011 - whatever")
@users("manager")
def test_sequence_copied_to_name_if_emptied(self):
"""Sequence is copied to project name if user removes it."""
proj = self.env["project.project"].create(
{"name": "whatever", "analytic_account_id": self.analytic_account.id}
)
self.assertEqual(proj.name, "whatever")
self.assertEqual(proj.sequence_code, "23-00011")
self.assertEqual(proj.display_name, "23-00011 - whatever")
self.assertEqual(proj.analytic_account_id.name, "23-00011 - whatever")
with Form(proj) as prj_f:
prj_f.name = False
self.assertEqual(proj.name, "23-00011")
self.assertEqual(proj.sequence_code, "23-00011")
self.assertEqual(proj.display_name, "23-00011")
self.assertEqual(proj.analytic_account_id.name, "23-00011")
@users("manager")
def test_sequence_not_copied_to_another_project(self):
"""Sequence is not duplicated to another project."""
proj1 = self.env["project.project"].create({"name": "whatever"})
proj2 = proj1.copy()
self.assertEqual(proj1.sequence_code, "23-00011")
self.assertEqual(proj2.sequence_code, "23-00012")
@users("manager")
@mute_logger("odoo.sql_db")
def test_sequence_unique(self):
"""Sequence cannot have duplicates."""
proj1 = self.env["project.project"].create({"name": "one"})
self.assertEqual(proj1.sequence_code, "23-00011")
self.pjr_seq._get_current_sequence().number_next = 11
with self.assertRaises(IntegrityError), self.env.cr.savepoint():
proj1 = self.env["project.project"].create({"name": "two"})
@users("manager")
def test_project_without_sequence(self):
"""Preexisting projects had no sequence, and they should display fine."""
proj1 = self.env["project.project"].create(
{"name": "one", "sequence_code": False}
)
self.assertEqual(proj1.display_name, "one")
self.assertFalse(proj1.sequence_code)
# Make sure that the sequence is not increased
proj2 = self.env["project.project"].create({"name": "two"})
self.assertEqual(proj2.sequence_code, "23-00011")
self.assertEqual(proj2.display_name, "23-00011 - two")
def test_custom_pattern(self):
"""Display name pattern can be customized."""
self.env["ir.config_parameter"].set_param(
"project_sequence.display_name_pattern", "%(name)s/%(sequence_code)s"
)
proj = self.env["project.project"].create({"name": "one"})
self.assertEqual(proj.display_name, "one/23-00011")
self.assertEqual(proj.sequence_code, "23-00011")
self.env["ir.config_parameter"].set_param(
"project_sequence.display_name_pattern", "%(name)s"
)
proj = self.env["project.project"].create({"name": "two"})
self.assertEqual(proj.display_name, "two")
self.assertEqual(proj.sequence_code, "23-00012")
self.env["ir.config_parameter"].set_param(
"project_sequence.display_name_pattern", "%(sequence_code)s"
)
proj = self.env["project.project"].create({"name": "three"})
self.assertEqual(proj.display_name, "23-00013")
self.assertEqual(proj.sequence_code, "23-00013")
| 44.666667
| 5,762
|
3,860
|
py
|
PYTHON
|
15.0
|
# Copyright 2023 Moduon Team S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import api, fields, models
class ProjectProject(models.Model):
_inherit = "project.project"
_sql_constraints = [
# Ensure compatibility with other modules that always expect a value in name
("name_required", "CHECK(name IS NOT NULL)", "Project name is required"),
(
"sequence_code_unique",
"UNIQUE(sequence_code)",
"Sequence code must be unique",
),
]
sequence_code = fields.Char(
copy=False,
readonly=True,
)
name = fields.Char(
# We actually require it with the SQL constraint, but it is disabled
# here to let users create/write projects without name, and let this module
# add a default name if needed
required=False,
)
def _sync_analytic_account_name(self):
"""Set analytic account name equal to project's display name."""
for rec in self:
if not rec.analytic_account_id:
continue
rec.analytic_account_id.name = rec.display_name
def name_get(self):
"""Prefix name with sequence code if they are different."""
old_result = super().name_get()
result = []
sequence_pattern = (
self.env["ir.config_parameter"]
.sudo()
.get_param(
"project_sequence.display_name_pattern",
default="%(sequence_code)s - %(name)s",
)
)
for id_, name in old_result:
project = self.browse(id_)
if project.sequence_code and project.sequence_code != name:
name = sequence_pattern % {
"name": name,
"sequence_code": project.sequence_code,
}
result.append((id_, name))
return result
@api.model
def name_search(self, name="", args=None, operator="ilike", limit=100):
"""Allow searching by sequence code by default."""
# Do not add any domain when user just clicked on search widget
if not (name == "" and operator == "ilike"):
# The dangling | is needed to combine with the domain added by super()
args = (args or []) + ["|", ("sequence_code", operator, name)]
return super().name_search(name, args, operator, limit)
@api.model_create_multi
def create(self, vals_list):
"""Apply sequence code and a default name if not set."""
# It is important to set sequence_code before calling super() because
# other modules such as hr_timesheet expect the name to always have a value
for vals in vals_list:
if "sequence_code" not in vals:
vals["sequence_code"] = self.env["ir.sequence"].next_by_code(
"project.sequence"
)
if not vals.get("name"):
vals["name"] = vals["sequence_code"]
res = super().create(vals_list)
# The analytic account is created with just the project name, but
# it is more useful to let it contain the project sequence too
res._sync_analytic_account_name()
return res
def write(self, vals):
"""Sync name and analytic account name when name is changed."""
# If name isn't changing, nothing special to do
if "name" not in vals and "sequence_name" not in vals:
return super().write(vals)
# When changing name, we need to update the analytic account name too
for one in self:
sequence_code = vals.get("sequence_code", one.sequence_code)
name = vals.get("name") or sequence_code
super().write(dict(vals, name=name))
self._sync_analytic_account_name()
return True
| 39.387755
| 3,860
|
560
|
py
|
PYTHON
|
15.0
|
# Copyright 2023 Moduon Team S.L.
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
project_display_name_pattern = fields.Char(
config_parameter="project_sequence.display_name_pattern",
default="%(sequence_code)s - %(name)s",
help=(
"Use %(sequence_code)s and %(name)s to include the sequence code "
"and the name of the project in the display name."
),
)
| 31.111111
| 560
|
594
|
py
|
PYTHON
|
15.0
|
# Copyright 2022 ForgeFlow S.L.
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
{
"name": "Project Stage Management",
"version": "15.0.1.0.0",
"development_status": "Beta",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"summary": "Allows to assign and create task stages on project creation wizard",
"website": "https://github.com/OCA/project",
"category": "Project",
"depends": ["project"],
"data": [
"views/project.xml",
],
"license": "AGPL-3",
"installable": True,
"maintainers": ["DavidJForgeFlow"],
}
| 33
| 594
|
507
|
py
|
PYTHON
|
15.0
|
# Copyright 2021 Open Source Integrators - Daniel Reis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
def populate_date_start(cr, registry):
"""
The date_start was introduced to be used instead of date_assign.
To keep same behaviour on upgrade, initialize it
to have the same data as before.
"""
cr.execute(
"UPDATE project_task "
"SET date_start = date_assign "
"WHERE date_start IS NULL "
"AND date_assign IS NOT NULL"
)
| 31.6875
| 507
|
908
|
py
|
PYTHON
|
15.0
|
# Copyright 2016-2017 Tecnativa - Pedro M. Baeza
# Copyright 2017 Tecnativa - Carlos Dauden
# Copyright 2021 Open Source Integrators - Daniel Reis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Project timeline",
"summary": "Timeline view for projects",
"version": "15.0.1.1.0",
"category": "Project Management",
"website": "https://github.com/OCA/project",
"author": "Tecnativa, Onestein, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["project", "web_timeline"],
"data": [
"views/project_project_view.xml",
"views/project_task_view.xml",
],
"demo": ["demo/project_project_demo.xml", "demo/project_task_demo.xml"],
"post_init_hook": "populate_date_start",
"assets": {
"web.assets_backend": [
"/project_timeline/static/src/scss/project_timeline.scss"
]
},
}
| 34.923077
| 908
|
716
|
py
|
PYTHON
|
15.0
|
# Copyright 2018 Onestein
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import fields
from odoo.tests.common import TransactionCase
class TestProjectTimeline(TransactionCase):
def test_date_end_doesnt_unset(self):
stage_id = self.ref("project.project_stage_2")
task = self.env["project.task"].create(
{
"name": "1",
"date_assign": "2018-05-01 00:00:00",
"date_end": "2018-05-07 00:00:00",
}
)
task.write({"stage_id": stage_id, "date_end": "2018-10-07 00:00:00"})
self.assertEqual(
task.date_end, fields.Datetime.from_string("2018-10-07 00:00:00")
)
| 34.095238
| 716
|
505
|
py
|
PYTHON
|
15.0
|
# Copyright 2016-2017 Tecnativa - Pedro M. Baeza
# Copyright 2017 Tecnativa - Carlos Dauden
# Copyright 2021 Open Source Integrators - Daniel Reis
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ProjectTask(models.Model):
_inherit = "project.task"
date_start = fields.Datetime("Start Date")
def update_date_end(self, stage_id):
res = super().update_date_end(stage_id)
res.pop("date_end", None)
return res
| 29.705882
| 505
|
513
|
py
|
PYTHON
|
15.0
|
# Copyright 2022 Moduon - Eduardo de Miguel <edu@moduon.team>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Project Task Personal Stage auto Fold",
"summary": "Moves task to the first fold personal stage when done",
"version": "15.0.1.0.3",
"category": "Project",
"website": "https://github.com/OCA/project",
"author": "Moduon, Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["project"],
"data": [],
"installable": True,
}
| 34.2
| 513
|
5,977
|
py
|
PYTHON
|
15.0
|
# Copyright 2022 Moduon - Eduardo de Miguel <edu@moduon.team>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests import TransactionCase
class TestAutoFoldPersonalStages(TransactionCase):
@classmethod
def setUpClass(cls):
super().setUpClass()
user_group_employee = cls.env.ref("base.group_user")
user_group_project_user = cls.env.ref("project.group_project_user")
user_group_project_manager = cls.env.ref("project.group_project_manager")
cls.partner_1 = cls.env["res.partner"].create(
{"name": "Valid Lelitre", "email": "valid.lelitre@agrolait.com"}
)
# Test users to use through the various tests
Users = cls.env["res.users"].with_context(no_reset_password=True)
cls.user_projectuser = Users.create(
{
"name": "Armande ProjectUser",
"login": "armandel",
"password": "armandel",
"email": "armande.projectuser@example.com",
"groups_id": [
(6, 0, [user_group_employee.id, user_group_project_user.id])
],
}
)
cls.user_projectmanager = Users.create(
{
"name": "Bastien ProjectManager",
"login": "bastien",
"email": "bastien.projectmanager@example.com",
"groups_id": [
(6, 0, [user_group_employee.id, user_group_project_manager.id])
],
}
)
# Test 'Pigs' project
cls.project_pigs = (
cls.env["project.project"]
.with_context(mail_create_nolog=True)
.create(
{
"name": "Pigs",
"privacy_visibility": "employees",
"alias_name": "project+pigs",
"partner_id": cls.partner_1.id,
}
)
)
cls.project_task_stages = cls.env["project.task.type"].create(
[
{"sequence": 1, "name": "New"},
{"sequence": 2, "name": "In progress"},
{"sequence": 3, "name": "Finished", "is_closed": True},
{"sequence": 4, "name": "Canceled", "is_closed": True},
]
)
cls.project_pigs.type_ids = [(6, 0, cls.project_task_stages.ids)]
cls.task_3 = cls.env["project.task"].create(
{
"name": "Multiple Assigned Task",
"user_ids": [
(6, 0, [cls.user_projectmanager.id, cls.user_projectuser.id])
],
"project_id": cls.project_pigs.id,
}
)
cls.task_3.with_user(cls.user_projectmanager)._compute_personal_stage_id()
cls.task_3.with_user(cls.user_projectuser)._compute_personal_stage_id()
def setUp(self):
"""Save user_projectuser initial personal stage"""
super().setUp()
self.task_3_projectuser_initial_personal_stage = self.task_3.with_user(
self.user_projectuser
).personal_stage_id.stage_id
def tearDown(self):
"""Personal Stage no other assignees shouldn't be modified
Personal Stage on other Task assignees shouldn't be modified
by the actions of the user that performs task closing.
"""
super().tearDown()
self.assertEqual(
self.task_3_projectuser_initial_personal_stage,
self.task_3.with_user(self.user_projectuser).personal_stage_id.stage_id,
"Personal Stage on other assignees has been modified",
)
def test_personal_stage_not_change(self):
"""Personal Stage don't change
Personal stage don't change if task stage is not on a closing stage.
"""
target_task_stage = self.project_task_stages[1] # In progress stage
old_personal_stage = self.task_3.with_user(
self.user_projectmanager
).personal_stage_id.stage_id
self.task_3.with_user(self.user_projectmanager).stage_id = target_task_stage.id
new_personal_stage = self.task_3.with_user(
self.user_projectmanager
).personal_stage_id.stage_id
self.assertEqual(old_personal_stage, new_personal_stage)
def test_personal_stage_changes_to_one_with_the_same_name(self):
"""Personal Stage changes to the same name as Task Stage
Personal stage change if task stage is on a closing stage and changes
to the one with the same name of the task stage.
"""
target_task_stage = self.project_task_stages[3] # Canceled stage
self.task_3.with_user(self.user_projectmanager).stage_id = target_task_stage.id
new_personal_stage = self.task_3.with_user(
self.user_projectmanager
).personal_stage_id.stage_id
self.assertEqual(new_personal_stage.name, target_task_stage.name)
def test_personal_stage_changes_to_first_personal_closing_stage(self):
"""Personal Stage changes to the first closing or folded stage
Personal stage changes to a closing or fold stage
if task stage is on a closing stage
and the name of the personal stage is not found.
"""
personal_target_closing_stage = self.env["project.task.type"].search(
[
("user_id", "=", self.user_projectmanager.id),
"|",
("fold", "=", True),
("is_closed", "=", True),
],
order="is_closed desc",
limit=1,
)
target_task_stage = self.project_task_stages[2] # Finished stage
self.task_3.with_user(self.user_projectmanager).stage_id = target_task_stage.id
new_personal_stage = self.task_3.with_user(
self.user_projectmanager
).personal_stage_id.stage_id
self.assertEqual(new_personal_stage, personal_target_closing_stage)
| 41.506944
| 5,977
|
1,225
|
py
|
PYTHON
|
15.0
|
from odoo import models
class Task(models.Model):
_inherit = "project.task"
def write(self, vals):
result = super().write(vals)
if (
vals.get("stage_id")
and self.env["project.task.type"].browse(vals.get("stage_id")).is_closed
):
self._fold_personal_stage_task()
return result
def _fold_personal_stage_task(self):
# Find all folded personal stages
folded_stages = (
self.env["project.task.type"]
.search(
[
("user_id", "=", self.env.user.id),
"|",
("fold", "=", True),
("is_closed", "=", True),
],
)
.sorted(lambda ptt: ptt.is_closed, reverse=True)
)
if not folded_stages:
return
# Allow to find personal stage with same name as shared stage
stage_by_name = {stage.name: stage for stage in folded_stages}
# Apply best matching personal stage
for task in self:
task.personal_stage_type_id = stage_by_name.get(
task.stage_id.name,
folded_stages[0],
)
| 31.410256
| 1,225
|
489
|
py
|
PYTHON
|
15.0
|
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Project Milestones",
"summary": "Project Milestones",
"author": "Patrick Wilson, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/project",
"category": "Project Management",
"version": "15.0.1.0.1",
"license": "AGPL-3",
"depends": ["project_task_milestone"],
"application": False,
"development_status": "Beta",
"maintainers": ["patrickrwilson"],
}
| 32.6
| 489
|
361
|
py
|
PYTHON
|
15.0
|
from openupgradelib import openupgrade
namespec = [("project_milestone", "project_task_milestone")]
field_spec = [
("project.milestone", "project_milestone", "target_date", "deadline"),
]
@openupgrade.migrate()
def migrate(env, version):
openupgrade.update_module_names(env.cr, namespec, False)
openupgrade.rename_fields(env, field_spec, False)
| 27.769231
| 361
|
622
|
py
|
PYTHON
|
15.0
|
# Copyright 2017 C2i Change 2 improve - Eduardo Magdalena <emagdalena@c2i.es>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Project Parent Task Filter",
"summary": "Add a filter to show the parent tasks",
"version": "15.0.1.1.0",
"category": "Project",
"website": "https://github.com/OCA/project",
"author": "C2i Change 2 improve, " "Odoo Community Association (OCA)",
"license": "AGPL-3",
"depends": ["project"],
"data": ["data/res_config_data.xml", "views/project_task.xml"],
"installable": True,
"post_init_hook": "_add_task_display_project",
}
| 38.875
| 622
|
1,728
|
py
|
PYTHON
|
15.0
|
from odoo import api, models
class TaskSub(models.Model):
_inherit = "project.task"
@api.model_create_multi
def create(self, vals_list):
res = super(TaskSub, self).create(vals_list)
for vals in vals_list:
if vals.get("parent_id", False):
res["display_project_id"] = (
self.env["project.task"].browse(vals.get("parent_id")).project_id.id
)
return res
def action_subtask(self):
if self._context.get("default_project_id"):
default_project = self.env["project.project"].browse(
self.env.context["default_project_id"]
)
else:
default_project = self.project_id or self.project_id.subtask_project_id
ctx = dict(self.env.context)
ctx = {k: v for k, v in ctx.items() if not k.startswith("search_default_")}
ctx.update(
{
"default_name": self.env.context.get("name", self.name) + ": ",
"default_parent_id": self.id,
"default_company_id": default_project.company_id.id
if default_project
else self.env.company.id,
}
)
action = {
"type": "ir.actions.act_window",
"name": "Subtasks of " + self.name,
"res_model": "project.task",
"view_mode": "kanban,tree,form,calendar,pivot,graph,activity",
"search_view_id": [
self.env.ref("project.view_task_search_form").id,
"search",
],
"domain": [("id", "!=", self.id), ("id", "child_of", self.id)],
}
action["context"] = ctx
return action
| 35.265306
| 1,728
|
603
|
py
|
PYTHON
|
15.0
|
# Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Project Forecast Lines Holidays Public",
"summary": "Project Forecast Lines taking public holidays into account",
"version": "15.0.1.1.0",
"author": "Camptocamp SA, Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Project",
"website": "https://github.com/OCA/project",
"depends": ["project_forecast_line", "hr_holidays_public"],
"data": ["views/res_config_settings_views.xml"],
"development_status": "Alpha",
"installable": True,
}
| 40.2
| 603
|
1,516
|
py
|
PYTHON
|
15.0
|
# Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from freezegun import freeze_time
from odoo import fields
from odoo.addons.project_forecast_line.tests import test_forecast_line
class PublicHolidaysForecastTest(test_forecast_line.BaseForecastLineTest):
@classmethod
@freeze_time("2022-01-01")
def setUpClass(cls):
super().setUpClass()
# for this test, we use a daily granularity
cls.env.company.write(
{
"forecast_line_granularity": "month",
"forecast_line_horizon": 1, # months
}
)
@freeze_time("2022-04-01")
def test_forecast_with_public_holidays(self):
self.env["hr.holidays.public"].create(
{
"year": 2022,
"line_ids": [
fields.Command.create(
{"date": "2022-04-18", "name": "Easter Monday"}
)
],
}
)
lines = self.env["forecast.line"].search(
[
("employee_id", "=", self.employee_dev.id),
("forecast_role_id", "=", self.role_developer.id),
("res_model", "=", "hr.employee.forecast.role"),
]
)
self.assertEqual(len(lines), 1) # 1 month horizon
self.assertEqual(
lines.mapped("forecast_hours"),
# number of days April, minus easter
[(21.0 - 1) * 8],
)
| 32.255319
| 1,516
|
586
|
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 ForecastLine(models.Model):
_inherit = "forecast.line"
def prepare_forecast_lines(self, *args, **kwargs):
self = self.with_context(exclude_public_holidays=True)
return super().prepare_forecast_lines(*args, **kwargs)
def _cron_recompute_all(self, force_company_id=None, force_delete=False):
self = self.with_context(exclude_public_holidays=True)
return super()._cron_recompute_all(force_company_id, force_delete)
| 39.066667
| 586
|
611
|
py
|
PYTHON
|
15.0
|
# Copyright 2022 Camptocamp SA
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import api, models
class HrHolidaysPublicLine(models.Model):
_inherit = "hr.holidays.public.line"
@api.model_create_multi
def create(self, values):
records = super().create(values)
# TODO: only recompute if one of the created line is a public holiday
# in the horizon and immediate_compute_forecast_line is checked
if self.env.company.immediate_compute_forecast_line:
self.env["forecast.line"].sudo()._cron_recompute_all()
return records
| 38.1875
| 611
|
425
|
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"
immediate_compute_forecast_line = fields.Boolean(
string="Recompute forecast lines immediately",
default=True,
help="If checked will force forecast lines recomputation on public holidays creation.",
)
| 32.692308
| 425
|
353
|
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"
immediate_compute_forecast_line = fields.Boolean(
related="company_id.immediate_compute_forecast_line", readonly=False
)
| 32.090909
| 353
|
648
|
py
|
PYTHON
|
15.0
|
# Copyright 2015 Incaser Informatica S.L. - Sergio Teruel
# Copyright 2015 Incaser Informatica S.L. - Carlos Dauden
# Copyright 2018 Tecnativa - Ernesto Tejeda
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Project Task Default Stage",
"summary": "Recovery default task stages for projects from v8",
"version": "15.0.1.0.0",
"category": "Project",
"author": "Tecnativa, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/project",
"license": "AGPL-3",
"depends": ["project"],
"data": ["views/project_view.xml", "data/project_data.xml"],
"installable": True,
}
| 40.5
| 648
|
580
|
py
|
PYTHON
|
15.0
|
# Copyright 2015 Incaser Informatica S.L. - Sergio Teruel
# Copyright 2015 Incaser Informatica S.L. - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.tests.common import TransactionCase
class TestProjectCaseDefault(TransactionCase):
# Use case : Prepare some data for current test case
def setUp(self):
super(TestProjectCaseDefault, self).setUp()
self.project = self.env["project.project"].create({"name": "Project Test"})
def test_project_new(self):
self.assertEqual(len(self.project.type_ids), 7)
| 38.666667
| 580
|
547
|
py
|
PYTHON
|
15.0
|
# Copyright 2015 Incaser Informatica S.L. - Sergio Teruel
# Copyright 2015 Incaser Informatica S.L. - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProjectTaskType(models.Model):
_inherit = "project.task.type"
case_default = fields.Boolean(
string="Default for New Projects",
help="If you check this field, this stage will be proposed by default "
"on each new project. It will not assign this stage to existing "
"projects.",
)
| 36.466667
| 547
|
513
|
py
|
PYTHON
|
15.0
|
# Copyright 2015 Incaser Informatica S.L. - Sergio Teruel
# Copyright 2015 Incaser Informatica S.L. - Carlos Dauden
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProjectProject(models.Model):
_inherit = "project.project"
def _get_default_type_common(self):
ids = self.env["project.task.type"].search([("case_default", "=", True)])
return ids
type_ids = fields.Many2many(default=lambda self: self._get_default_type_common())
| 36.642857
| 513
|
499
|
py
|
PYTHON
|
15.0
|
# Copyright 2014 Joël Grand-Guillaume (Camptocamp)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Project Department Categorization",
"version": "15.0.1.0.1",
"author": "Camptocamp, Daniel Reis, Odoo Community Association (OCA)",
"license": "AGPL-3",
"category": "Generic Modules/Projects & Services",
"website": "https://github.com/OCA/project",
"depends": [
"project",
"hr",
],
"data": ["views/project.xml"],
}
| 33.2
| 498
|
568
|
py
|
PYTHON
|
15.0
|
# © 2014 Joël Grand-Guillaume (Camptocamp)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import fields, models
class ProjectTask(models.Model):
_inherit = "project.task"
project_department_id = fields.Many2one(
related="project_id.department_id",
string="Project Department",
store=True,
readonly=True,
)
class ProjectProject(models.Model):
_inherit = "project.project"
department_id = fields.Many2one(
comodel_name="hr.department", string="Project Department"
)
| 25.727273
| 566
|
651
|
py
|
PYTHON
|
15.0
|
# Copyright 2015 ADHOC SA (http://www.adhoc.com.ar)
# Copyright 2017 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Project Types",
"version": "15.0.1.0.1",
"category": "Project",
"author": "ADHOC SA," "Tecnativa, " "Onestein, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/project",
"license": "AGPL-3",
"depends": ["project"],
"data": [
"views/project_type_views.xml",
"views/project_project_views.xml",
"views/project_task_views.xml",
"security/ir.model.access.csv",
],
"installable": True,
}
| 32.55
| 651
|
830
|
py
|
PYTHON
|
15.0
|
# Copyright 2019 Onestein
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo.exceptions import ValidationError
from odoo.tests.common import TransactionCase
class TestProjectType(TransactionCase):
def setUp(self):
super(TestProjectType, self).setUp()
self.cat = self.env["project.type"].create({"name": "General"})
self.cat2 = self.env["project.type"].create({"name": "Discussion"})
def test_complete_name(self):
self.cat2.parent_id = self.cat.id
self.assertEqual(self.cat.complete_name, "General")
self.assertEqual(self.cat2.complete_name, "General / Discussion")
def test_no_recursion(self):
self.cat2.parent_id = self.cat.id
with self.assertRaises(ValidationError):
self.cat.parent_id = self.cat2.parent_id.id
| 37.727273
| 830
|
287
|
py
|
PYTHON
|
15.0
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProjectTask(models.Model):
_inherit = "project.task"
type_id = fields.Many2one(
comodel_name="project.type", string="Type", domain="[('task_ok', '=', True)]"
)
| 26.090909
| 287
|
333
|
py
|
PYTHON
|
15.0
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import fields, models
class ProjectProject(models.Model):
_inherit = "project.project"
type_id = fields.Many2one(
comodel_name="project.type",
string="Type",
copy=False,
domain="[('project_ok', '=', True)]",
)
| 23.785714
| 333
|
1,463
|
py
|
PYTHON
|
15.0
|
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class ProjectType(models.Model):
_name = "project.type"
_description = "Project Type"
_rec_name = "complete_name"
parent_id = fields.Many2one(comodel_name="project.type", string="Parent Type")
child_ids = fields.One2many(
comodel_name="project.type", inverse_name="parent_id", string="Subtypes"
)
name = fields.Char(required=True, translate=True)
complete_name = fields.Char(
compute="_compute_complete_name", store=True, recursive=True
)
description = fields.Text(translate=True)
project_ok = fields.Boolean(string="Can be applied for projects", default=True)
task_ok = fields.Boolean(string="Can be applied for tasks")
code = fields.Char(copy=False)
@api.constrains("parent_id")
def check_parent_id(self):
if not self._check_recursion():
raise ValidationError(_("You cannot create recursive project types."))
@api.depends("name", "parent_id.complete_name")
def _compute_complete_name(self):
for project_type in self:
if project_type.parent_id:
project_type.complete_name = "{} / {}".format(
project_type.parent_id.complete_name, project_type.name
)
else:
project_type.complete_name = project_type.name
| 38.5
| 1,463
|
604
|
py
|
PYTHON
|
15.0
|
{
"name": "Project Status",
"summary": """
Project Status""",
"author": "Patrick Wilson, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/project",
"category": "Project Management",
"version": "15.0.1.0.0",
"license": "AGPL-3",
"depends": ["project"],
"data": [
"views/project_status.xml",
"views/project.xml",
"security/ir.model.access.csv",
"security/project_status.xml",
"data/data.xml",
],
"application": False,
"development_status": "Beta",
"maintainers": ["patrickrwilson"],
}
| 28.761905
| 604
|
859
|
py
|
PYTHON
|
15.0
|
import odoo.tests.common as common
class TestProjectTaskCode(common.TransactionCase):
def setUp(self):
super().setUp()
self.ProjectStatus = self.env["project.status"]
self.status = self.ProjectStatus.create(
{
"name": "New Status",
}
)
def _create_project(self):
project = self.env["project.project"].create(
{
"name": "Project 1",
"project_status": self.status.id,
}
)
return project
def test_01_project_status(self):
project = self._create_project()
self.assertEqual(project.project_status.id, self.status.id)
statuses = project._read_group_status_ids(
project.project_status, [], "status_sequence"
)
self.assertTrue(len(statuses) >= 1)
| 29.62069
| 859
|
879
|
py
|
PYTHON
|
15.0
|
from odoo import api, fields, models
class ProjectStatus(models.Model):
_name = "project.status"
_order = "status_sequence"
_description = "Project Status"
name = fields.Char(
required=True,
translate=True,
)
company_id = fields.Many2one(
comodel_name="res.company",
string="Company",
default=lambda self: self.env.company,
)
description = fields.Char(translate=True)
status_sequence = fields.Integer(string="Sequence")
is_closed = fields.Boolean(
string="Is Closed Status",
help="Specify if this is a closing status.",
)
fold = fields.Boolean(string="Folded")
@api.model
def create(self, vals):
seq = self.env["ir.sequence"].next_by_code("project.status") or 0
vals["status_sequence"] = seq
return super(ProjectStatus, self).create(vals)
| 29.3
| 879
|
526
|
py
|
PYTHON
|
15.0
|
from odoo import SUPERUSER_ID, api, fields, models
class Project(models.Model):
_inherit = "project.project"
@api.model
def _read_group_status_ids(self, statuses, domain, order):
statuse_ids = statuses._search([], order=order, access_rights_uid=SUPERUSER_ID)
return statuses.browse(statuse_ids)
project_status = fields.Many2one(
comodel_name="project.status",
group_expand="_read_group_status_ids",
copy=False,
ondelete="restrict",
index=True,
)
| 29.222222
| 526
|
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
|
2,534
|
py
|
PYTHON
|
15.0
|
import setuptools
with open('VERSION.txt', 'r') as f:
version = f.read().strip()
setuptools.setup(
name="odoo-addons-oca-project",
description="Meta package for oca-project Odoo addons",
version=version,
install_requires=[
'odoo-addon-project_administrator_restricted_visibility>=15.0dev,<15.1dev',
'odoo-addon-project_department>=15.0dev,<15.1dev',
'odoo-addon-project_duplicate_subtask>=15.0dev,<15.1dev',
'odoo-addon-project_forecast_line>=15.0dev,<15.1dev',
'odoo-addon-project_forecast_line_bokeh_chart>=15.0dev,<15.1dev',
'odoo-addon-project_forecast_line_holidays_public>=15.0dev,<15.1dev',
'odoo-addon-project_hr>=15.0dev,<15.1dev',
'odoo-addon-project_list>=15.0dev,<15.1dev',
'odoo-addon-project_milestone>=15.0dev,<15.1dev',
'odoo-addon-project_parent_task_filter>=15.0dev,<15.1dev',
'odoo-addon-project_purchase_analytic_global>=15.0dev,<15.1dev',
'odoo-addon-project_role>=15.0dev,<15.1dev',
'odoo-addon-project_sequence>=15.0dev,<15.1dev',
'odoo-addon-project_stage_mgmt>=15.0dev,<15.1dev',
'odoo-addon-project_status>=15.0dev,<15.1dev',
'odoo-addon-project_stock>=15.0dev,<15.1dev',
'odoo-addon-project_stock_product_set>=15.0dev,<15.1dev',
'odoo-addon-project_stock_request>=15.0dev,<15.1dev',
'odoo-addon-project_task_add_very_high>=15.0dev,<15.1dev',
'odoo-addon-project_task_code>=15.0dev,<15.1dev',
'odoo-addon-project_task_default_stage>=15.0dev,<15.1dev',
'odoo-addon-project_task_dependency>=15.0dev,<15.1dev',
'odoo-addon-project_task_material>=15.0dev,<15.1dev',
'odoo-addon-project_task_milestone>=15.0dev,<15.1dev',
'odoo-addon-project_task_personal_stage_auto_fold>=15.0dev,<15.1dev',
'odoo-addon-project_task_pull_request>=15.0dev,<15.1dev',
'odoo-addon-project_task_stage_state>=15.0dev,<15.1dev',
'odoo-addon-project_template>=15.0dev,<15.1dev',
'odoo-addon-project_template_milestone>=15.0dev,<15.1dev',
'odoo-addon-project_timeline>=15.0dev,<15.1dev',
'odoo-addon-project_timeline_hr_timesheet>=15.0dev,<15.1dev',
'odoo-addon-project_timesheet_time_control>=15.0dev,<15.1dev',
'odoo-addon-project_type>=15.0dev,<15.1dev',
'odoo-addon-project_wbs>=15.0dev,<15.1dev',
],
classifiers=[
'Programming Language :: Python',
'Framework :: Odoo',
'Framework :: Odoo :: 15.0',
]
)
| 49.686275
| 2,534
|
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
|
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
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.