Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIG][16.0] business_requirement: Migration to 16.0 #369

Merged
merged 74 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
bd1dd10
[ADD] business_requirement
Jun 2, 2016
17a33e2
Reduced outside margin of the icon
Jun 10, 2016
05e30b8
[FIX] business_requirement:
Jun 13, 2016
d2eab31
added the module in the image path in README
Jun 16, 2016
1613c48
[IMP] business_requirement: Adapt current workflow.
Jun 20, 2016
6ba52a4
Update README to correct runbot address + figure (#12)
elicoidal Aug 18, 2016
1272462
[IMP] business_requirement: Improvement on master project related to …
Sep 9, 2016
553a7d7
Improve the README and added functional workflow (#18)
elicoidal Sep 13, 2016
fe048be
[IMP]business_requirement: add test case field (#28)
RawEvan Sep 30, 2016
bb4a3e4
[8.0] Fix Duplicate Function for Business Requirements
astirpe Oct 4, 2016
dad5d0d
[FIX] fix the business_requirement message body empty issue
noahzaozao Jan 19, 2017
de63281
[FIX] business_requirement
Feb 14, 2017
bb5aa7f
[UPD] fix website url in manifest
sbidoul Mar 12, 2017
50da92b
[IMP] followers of master project to BR
YogeshMahera-SerpentCS Mar 23, 2017
c9255c9
[8.0][FIX] Wizard to generate the project (#42)
kl-adonze Mar 25, 2017
f852476
[FIX] Fixed travis
serpentcs-dev1 Mar 30, 2017
1591711
[IMP][MIG] business_requirement (#112)
Apr 14, 2017
82a8d31
[8.0][IMP] Transfer the Gross Profit fields to the Deliverable lines …
sudhir-serpentcs Apr 28, 2017
1e71e32
[FIX]144 In stages missing the stage drop (#165)
serpentcs-dev1 May 30, 2017
5f619a9
[FIX][8.0-i181-BR001028-T22316] BR ordering on Tree view (#201)
sudhir-serpentcs Jul 5, 2017
4eb870f
[8.0]-[BR1030]-[ADD/IMP][Reference field improvements] (#208)
serpentcs-dev1 Jul 10, 2017
6e1726d
[Issue-197][IMP]Improved String (#214)
YogeshMahera-SerpentCS Jul 12, 2017
88934d0
[IMP] [8.0-i195-BR001028-T22321] Added code to search BR based on Na…
sudhir-serpentcs Jul 17, 2017
81d7f71
[IMP][8.0][22070][ISSUE#115]-Modify projects and BR id relationship (…
serpentcs-dev1 Jul 24, 2017
1c758b2
[8.0][I-215][BR1030]-Set Default Values (#219)
YogeshMahera-SerpentCS Jul 24, 2017
ce94c85
[WIP][8.0][BR001024] - Added demo data for BR modules (#212)
serpentcs-dev1 Jul 27, 2017
55d8cb8
[8.0][IMP]-Improved Origin field (#226)
YogeshMahera-SerpentCS Aug 4, 2017
6699f50
init branch 9.0
elicoidal Jul 25, 2017
7b898ba
[MIG]Migrated Business requirement module from 8.0 to 10.0 (#223)
YogeshMahera-SerpentCS Aug 15, 2017
506fa6d
Kanban view move from BRP to BR (#243)
sudhir-serpentcs Sep 11, 2017
f7c0f16
[MIG]-Migrated Business requirement deliverable cost module from 8.0 …
YogeshMahera-SerpentCS Sep 30, 2017
9727486
[IMP] [10.0] BR001208-T24350: Add field "Terms and Conditions" (#266)
Nov 22, 2017
74140c8
[fix][modify][i3991] unread message filter (#277)
Reinhard-sheng Mar 2, 2018
0e1ce43
Added set up section
Apr 29, 2018
eaaa2d9
[MIG] migration business_requirement_resource_template categ_id from …
joycehuan Sep 3, 2018
11bd349
[ADD]business_requirement_earned_value (#278)
Sep 13, 2018
3f901b7
Added translation using Weblate (French)
Yakulu Dec 22, 2018
c95566b
[MIG] business_requirement: Migration to 11.0
Jun 4, 2019
8f659ca
[IMP] business_requirement: Add Report + Portal
Tardo Jun 6, 2019
f498287
[REM] Master project and WBS
Jun 10, 2019
2916028
[IMP] business_requirement: Icon
pedrobaeza Jun 21, 2019
b205665
[MIG] business_requirement: Migration to v12
Jun 26, 2019
c234f1f
[MIG] business_requirement_deliverable: Migration to v12
Jul 25, 2019
6d3ba4b
[IMP] business_requirement: Portal Website Layout
Aug 9, 2019
1defed8
[FIX] business_requirement_deliverable: Portal search by stakeholder
Tardo Aug 19, 2019
17dea6d
[FIX] business_requirement: Give system user BR permissions + add BR …
pedrobaeza Aug 24, 2019
73f18b0
Added translation using Weblate (Portuguese (Brazil))
marcelsavegnago Sep 10, 2019
3dd2440
Translated using Weblate (Portuguese (Brazil))
marcelsavegnago Sep 10, 2019
9e1e50b
Translated using Weblate (Portuguese (Brazil))
Sep 17, 2019
cab5e41
business_requirement: fix kanban column view
DonatasV Nov 12, 2019
7f195f1
Translated using Weblate (Spanish)
chienandalu Nov 28, 2019
070b614
[IMP] business_requirement: Portal list headers
Tardo Jan 10, 2020
a0471b1
[IMP] business_requirement: black, isort
Tardo Jan 24, 2020
04e7fe6
[MIG] business_requirement: Migration to 13.0
Tardo Jan 24, 2020
f8a3409
Translated using Weblate (Portuguese (Brazil))
Mar 21, 2020
14cb6a8
[IMP] business_requirement: Change to logical style size of report
sergio-teruel Mar 10, 2021
682f83d
[IMP] business_requirement: Change track_visibility by tracking
CarlosRoca13 Oct 14, 2021
bd956bf
[MIG] business_requirement: Migration to 14.0
victoralmau Oct 14, 2021
6520998
[UPD] README.rst
OCA-git-bot Oct 14, 2021
f56bc3f
[UPD] Update business_requirement.pot
oca-travis Nov 13, 2021
613a429
Update translation files
oca-transbot Nov 13, 2021
e1f7ce2
[IMP] business_requirement: Improve tests.
victoralmau Nov 11, 2021
f12aa94
[IMP] business_requirement: black, isort, prettier
MosabWadea Mar 5, 2022
a16e821
[MIG] business_requirement: Migration to 15.0
MosabWadea Mar 5, 2022
daef4cf
[UPD] Update business_requirement.pot
Mar 22, 2022
de8de76
[UPD] README.rst
OCA-git-bot Mar 22, 2022
10271cd
[IMP] update dotfiles [ci skip]
OCA-git-bot Mar 30, 2022
d56e865
[FIX] business_requirement: portal access error
victoralmau Jun 2, 2022
650b601
business_requirement 15.0.1.0.1
OCA-git-bot Jun 2, 2022
337d3cd
[IMP] business_requirement: Use _prepare_home_portal_values() function.
victoralmau Sep 2, 2022
19e77df
business_requirement 15.0.1.0.2
OCA-git-bot Mar 5, 2023
fc66110
Translated using Weblate (Slovenian)
sysadminmatmoz Apr 11, 2023
100bc5b
Translated using Weblate (Slovenian)
sysadminmatmoz Apr 12, 2023
deda95f
[MIG] business_requirement: Migration to 16.0
Jul 4, 2023
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
126 changes: 126 additions & 0 deletions business_requirement/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
====================
Business Requirement
====================

.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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%2Fbusiness--requirement-lightgray.png?logo=github
:target: https://github.com/OCA/business-requirement/tree/15.0/business_requirement
:alt: OCA/business-requirement
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/business-requirement-15-0/business-requirement-15-0-business_requirement
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
:target: https://runbot.odoo-community.org/runbot/222/15.0
:alt: Try me on Runbot

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

A **Business requirement** (BR) is the expression of a business need by a customer
or internal project user.

A BR contains multiple different parts to explain the stakeholder need and how to
meet his/her requirements:

* **Customer Story**: this is the requirement as expressed by the customer
* **Scenario**: How/where the current solution can provide a suitable scenario to
answer the customer story
* **Gap**: For the uncovered part of the scenario, elaborate the gap/need for specific
developments/setup
* **Test case**: A set of conditions under which a tester will determine whether the application, software system or
one of its features is working as it was originally established for it to do.
* **Deliverables** to be provided to the customer/user
* **Resources** necessary to achieve the deliverables
* **Additional** information (approval, cost control etc.)

This set of modules was originally designed for the service/IT industry but the
requirement management design has been kept as generic as possible so that it can
apply to many other cases/industries (customer or internal projects):

* Construction
* Trading (New product development)
* Business Consultancy
* Web or IT development
* R&D projects
* etc.

More information about business requirements management:

* `Wikipedia <https://en.wikipedia.org/wiki/Business_requirements>`_
* `Six Sigma <https://www.isixsigma.com/implementation/project-selection-tracking/business-requirements-document-high-level-review/>`_

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/business-requirement/issues>`_.
In case of trouble, please check there if your issue has already been reported.
If you spotted it first, help us smashing it by providing a detailed and welcomed
`feedback <https://github.com/OCA/business-requirement/issues/new?body=module:%20business_requirement%0Aversion:%2015.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
~~~~~~~

* Elico Corp
* Tecnativa

Contributors
~~~~~~~~~~~~

* Eric Caudal <eric.caudal@elico-corp.com>
* Alex Duan <alex.duan@elico-corp.com>
* Xie XiaoPeng <xie.xiaopeng@elico-corp.com>
* Victor M. Martin <victor.martin@elico-corp.com>
* Evan Li <li.aiwen@elico-corp.com>
* Reinhard Sheng <reinhard.sheng@elico-corp.com>

* `Tecnativa <https://www.tecnativa.com>`_:

* Alexandre Diaz
* Pedro M. Baeza
* Victor M.M. Torres
* Víctor Martínez

Other credits
~~~~~~~~~~~~~


* Images:

* `briefcase <https://fontawesome.com/icons/briefcase?style=solid>`__ from `FontAwesome <https://fontawesome.com/license>`__.
* `drafting-compass <https://fontawesome.com/icons/drafting-compass?style=solid>`__ from `FontAwesome <https://fontawesome.com/license>`__.

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/business-requirement <https://github.com/OCA/business-requirement/tree/15.0/business_requirement>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions business_requirement/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2017-2019 Elico Corp (https://www.elico-corp.com).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models
from . import controllers
45 changes: 45 additions & 0 deletions business_requirement/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright 2017-2019 Elico Corp (https://www.elico-corp.com).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Business Requirement",
"category": "Business Requirements Management",
"summary": "Manage the Business Requirements (stories, scenarios, gaps\
and test cases) for your customers",
"version": "16.0.1.0.0",
"website": "https://github.com/OCA/business-requirement",
"author": "Elico Corp, Tecnativa, Odoo Community Association (OCA)",
"depends": ["product", "portal"],
"data": [
"data/business_data.xml",
"security/security.xml",
"security/ir.model.access.csv",
"views/business_view.xml",
"views/br_report.xml",
"views/br_portal_templates.xml",
"report/report.xml",
],
"image": [
"static/description/icon.png",
"static/img/bus_req.png",
"static/img/bus_req_alias.png",
"static/img/bus_req_approved.png",
"static/img/bus_req_cancel.png",
"static/img/bus_req_confirmed.png",
"static/img/bus_req_cust_story.png",
"static/img/bus_req_done.png",
"static/img/bus_req_drop.png",
"static/img/bus_req_tags.png",
"static/img/bus_req_tags2.png",
"static/img/bus_req_tree.png",
"static/img/bus_req_workflow.png",
],
"assets": {
"web.assets_tests": [
"/business_requirement/static/src/js/business_requirement_portal_tour.js",
],
},
"demo": ["data/business_requirement_demo.xml"],
"license": "AGPL-3",
"installable": True,
"application": True,
}
1 change: 1 addition & 0 deletions business_requirement/controllers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import portal
153 changes: 153 additions & 0 deletions business_requirement/controllers/portal.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
# Copyright 2019 Tecnativa - Alexandre Díaz
# Copyright 2022 Tecnativa - Víctor Martínez
from odoo import _, http
from odoo.exceptions import AccessError
from odoo.http import request

from odoo.addons.portal.controllers.portal import (
CustomerPortal,
get_records_pager,
pager as portal_pager,
)


class CustomerPortal(CustomerPortal):
def _prepare_home_portal_values(self, counters):
values = super()._prepare_home_portal_values(counters)
if "business_requirement_count" in counters:
br_model = request.env["business.requirement"]
br_count = (
br_model.search_count(self._prepare_br_base_domain())
if br_model.check_access_rights("read", raise_exception=False)
else 0
)
values["business_requirement_count"] = br_count
return values

def _prepare_br_base_domain(self):
user = request.env.user
return [
("message_partner_ids", "child_of", [user.commercial_partner_id.id]),
("portal_published", "=", True),
]

def _br_get_page_view_values(self, br, access_token, **kwargs):
values = {"business_requirement": br, "page_name": "business_requirement"}
if access_token:
values["no_breadcrumbs"] = True
values["access_token"] = access_token
values["portal_confirmation"] = br.get_portal_confirmation_action()

if kwargs.get("error"):
values["error"] = kwargs["error"]
if kwargs.get("warning"):
values["warning"] = kwargs["warning"]
if kwargs.get("success"):
values["success"] = kwargs["success"]

history = request.session.get("my_br_history", [])
values.update(get_records_pager(history, br))

return values

@http.route(
["/my/business_requirements", "/my/business_requirements/page/<int:page>"],
type="http",
auth="user",
website=True,
)
def portal_my_br(self, page=1, date_begin=None, date_end=None, sortby=None, **kw):
values = self._prepare_portal_layout_values()
BRObj = request.env["business.requirement"]
# Avoid error if the user does not have access.
if not BRObj.check_access_rights("read", raise_exception=False):
return request.redirect("/my")

searchbar_sortings = {
"date": {"label": _("Date"), "order": "date desc"},
"sequence": {"label": _("Sequence"), "order": "sequence"},
}
# default sortby br
if not sortby:
sortby = "sequence"
sort_br = searchbar_sortings[sortby]["order"]

domain = self._prepare_br_base_domain()

if date_begin and date_end:
domain += [("date", ">", date_begin), ("date", "<=", date_end)]

# count for pager
br_count = BRObj.search_count(domain)
# pager
pager = portal_pager(
url="/my/business_requirements",
url_args={"date_begin": date_begin, "date_end": date_end, "sortby": sortby},
total=br_count,
page=page,
step=self._items_per_page,
)
# content according to pager and archive selected
business_requirements = BRObj.search(
domain, order=sort_br, limit=self._items_per_page, offset=pager["offset"]
)
request.session["my_br_history"] = business_requirements.ids[:100]

values.update(
{
"date": date_begin,
"business_requirements": business_requirements.sudo(),
"page_name": "business_requirement",
"pager": pager,
"default_url": "/my/business_requirements",
"searchbar_sortings": searchbar_sortings,
"sortby": sortby,
}
)
return request.render("business_requirement.portal_my_br", values)

@http.route(
["/my/business_requirement/<int:br_id>"],
type="http",
auth="public",
website=True,
)
def portal_br_page(self, br_id=None, access_token=None, **kw):
try:
br_sudo = self._document_check_access(
"business.requirement", br_id, access_token=access_token
)
except AccessError:
return request.redirect("/my")

values = self._br_get_page_view_values(br_sudo, access_token, **kw)
return request.render("business_requirement.portal_br_page", values)

def _get_br_report_name(self):
return "business_requirement." "business_requirement_report"

@http.route(
["/my/business_requirement/pdf/<int:br_id>"],
type="http",
auth="public",
website=True,
)
def portal_br_report(self, br_id, access_token=None, **kw):
try:
br_sudo = self._document_check_access(
"business.requirement", br_id, access_token=access_token
)
except AccessError:
return request.redirect("/my")

# print report as sudo
pdf = (
request.env.ref(self._get_br_report_name())
.sudo()
.render_qweb_pdf([br_sudo.id])[0]
)
pdfhttpheaders = [
("Content-Type", "application/pdf"),
("Content-Length", len(pdf)),
]
return request.make_response(pdf, headers=pdfhttpheaders)
15 changes: 15 additions & 0 deletions business_requirement/data/business_data.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo noupdate="1">
<record id="seq_business_requirement" model="ir.sequence">
<field name="name">Business Requirement</field>
<field name="code">business.requirement</field>
<field name="prefix">BR</field>
<field name="padding">6</field>
<field name="company_id" eval="False" />
</record>
<record model="ir.module.category" id="module_category_business_requirement">
<field name="name">Business Requirement</field>
<field name="description" />
<field name="sequence">9</field>
</record>
</odoo>
Loading