Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions project_task_code_portal/tests/test_portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

import re
from urllib.parse import urlparse

from lxml import html

Expand Down Expand Up @@ -47,7 +48,10 @@ def test_portal_tasks_list_access(self):
link = tree.xpath(f"//td[a/span[contains(text(), '{self.task_1.name}')]]//a")[
0
].attrib["href"]
self.assertEqual(link, self.url_task_code_pattern.format(self.task_1.code))
self.assertEqual(
urlparse(link),
urlparse(self.url_task_code_pattern.format(self.task_1.code)),
)

def test_portal_task_access(self):
self.authenticate("portal", "portal")
Expand Down Expand Up @@ -83,8 +87,10 @@ def test_portal_task_search_link_format(self):
0
].attrib["href"]
self.assertEqual(
link,
self.url_task_code_pattern.format(self.task_1.code)[:-1] + query_params,
urlparse(link),
urlparse(
self.url_task_code_pattern.format(self.task_1.code)[:-1] + query_params
),
)

def test_portal_task_report(self):
Expand Down Expand Up @@ -265,7 +271,7 @@ def test_portal_project_tasks_list_access(self):
0
].attrib["href"]
expected_link = f"/my/projects/{project_id}/task/{self.task_3.code}?"
self.assertEqual(link, expected_link)
self.assertEqual(urlparse(link), urlparse(expected_link))

def test_portal_my_project_task_ok(self):
self._project_share(access_mode="edit")
Expand Down
80 changes: 80 additions & 0 deletions website_project_task_code/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
==================================================
Show task code in project task creation in website
==================================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:76e4bbcc6a15f0cff69d4570934bea72700bc018299abe8e50cd31ec905fcc9d
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
:alt: License: AGPL-3
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fproject-lightgray.png?logo=github
:target: https://github.com/OCA/project/tree/18.0/website_project_task_code
:alt: OCA/project
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/project-18-0/project-18-0-website_project_task_code
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/project&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module acts as a glue module to show the task code in the creation
of tasks from website form.

**Table of contents**

.. contents::
:local:

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/project/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/project/issues/new?body=module:%20website_project_task_code%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

Do not contact contributors directly about support or help with technical issues.

Credits
=======

Authors
-------

* DixmitAvanzOSC
* Tecnativa

Contributors
------------

- `Dixmit <https://www.dixmit.com>`__

- Enric Tobella

Maintainers
-----------

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.

This module is part of the `OCA/project <https://github.com/OCA/project/tree/18.0/website_project_task_code>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Empty file.
18 changes: 18 additions & 0 deletions website_project_task_code/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2016 Tecnativa <vicent.cubells@tecnativa.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

{
"name": "Show task code in project task creation in website",
"version": "18.0.1.0.1",
"category": "Project Management",
"author": "Dixmit" "AvanzOSC, " "Tecnativa, " "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/project",
"license": "AGPL-3",
"depends": [
"project_task_code",
"website_project",
],
"data": [
"views/templates.xml",
],
}
3 changes: 3 additions & 0 deletions website_project_task_code/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
2 changes: 2 additions & 0 deletions website_project_task_code/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- [Dixmit](https://www.dixmit.com)
- Enric Tobella
1 change: 1 addition & 0 deletions website_project_task_code/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This module acts as a glue module to show the task code in the creation of tasks from website form.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading