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

[17.0][ADD] sale_project_reimbursement_cost: New module to display provisions and reimbur… #1388

Open
wants to merge 1 commit into
base: 17.0
Choose a base branch
from
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
159 changes: 159 additions & 0 deletions sale_project_reimbursement_cost/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
===============================
Sale project reimbursement cost
===============================

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

.. |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/17.0/sale_project_reimbursement_cost
:alt: OCA/project
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/project-17-0/project-17-0-sale_project_reimbursement_cost
: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=17.0
:alt: Try me on Runboat

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

This module allows the display of provisions and reimbursement costs in
the ``Project Updates`` dashboard.

**Table of contents**

.. contents::
:local:

Use Cases / Context
===================

In businesses, especially those in services or consulting, where
expenses may be incurred on behalf of a client but later need to be
reimbursed by the client, Odoo’s functionality for
``Re-Invoice Expenses`` products (without using the hr_expenses module)
lacks visibility of this information in the project dashboard.

With this module, two sections are added to the project dashboard:

- **Provisions**: Values invoiced to the client in advance to cover any
necessary expenses. This section displays the analytic entries
generated from customer invoices for specific products.
- **Reimbursements cost:** Values generated from vendor bills that need
to be charged to the client. Using Odoo’s functionality, these are
the sales order lines automatically created from a vendor bill when
the product is configured as ``Re-Invoice Expenses``.

Configuration
=============

**To automatically create a project from a sale order:**

- Go to ``Sales > Products > Products``.
- Create a new product with the following options:

- Product Type: Service
- Invoicing Policy: ``Prepaid/Fixed Price``.
- Create on Order: Set an option other than ``Nothing``.

**For Provisions:**

- Go to ``Sales > Products > Products``.
- Create a new product of type Service.

**For Reimbursement:**

- Go to ``Sales > Products > Products``.
- Create a new product with the following options:

- ``Product Type``: Service
- Invoicing Policy: ``Based on Delivered Quantity (Manual)``.
- ``Re-Invoice Expenses``: At cost or Sales price
- Fill in the ``Provision Product`` field created in the previous
step.

Usage
=====

**To generate a new project from a sale order**:

- Go to ``Sales > Orders > Quotations``.
- Create a new sales order and select the first product configured.
- Add a second line with the second configured product for
``Provisions``.
- Confirm the sales order.
- Generated the invoice

**To generate reimbursement costs**:

- Go to ``Invoicing > Vendors > Bills``.
- Create a new bill and select the third product configured for
``Reimbursement``.
- In the invoice line, set the analytic distribution with the analytic
account for the project.
- Confirm the bill, and a new line will be added to the sale order with
the reimbursement cost.
- While the provision has a remaining amount, a new line will be added
to the sale order with the product for Provisions, but with a
negative quantity.

**Project status dashboard**:

- Go to ``Project > Projects``.
- Search for the respective project.
- In the Kanban view, click the top-right icon to display project
settings, then click ``Reporting / Project Updates``.

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:%20sale_project_reimbursement_cost%0Aversion:%2017.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
-------

* Tecnativa

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

- `Tecnativa <https://www.tecnativa.com>`__:

- Pedro M. Baeza
- Carlos López

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/17.0/sale_project_reimbursement_cost>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions sale_project_reimbursement_cost/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
23 changes: 23 additions & 0 deletions sale_project_reimbursement_cost/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2024 Tecnativa - Carlos López
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
{
"name": "Sale project reimbursement cost",
"version": "17.0.1.0.0",
"summary": """Display provisions and reimbursement costs
in the Project Updates dashboard.""",
"author": "Tecnativa,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/project",
"category": "Sales",
"depends": [
"sale_project",
],
"data": ["views/product_template_views.xml", "views/sale_order_line_views.xml"],
"demo": ["demo/product_demo.xml"],
"assets": {
"web.assets_backend": [
"sale_project_reimbursement_cost/static/src/components/project_right_side_panel/**/*",
],
},
"installable": True,
"license": "AGPL-3",
}
28 changes: 28 additions & 0 deletions sale_project_reimbursement_cost/demo/product_demo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2024 Tecnativa - Pedro M. Baeza
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). -->
<odoo>
<record id="product_provision" model="product.product">
<field name="name">Provision</field>
<field name="type">service</field>
<field name="uom_id" ref="uom.product_uom_unit" />
<field name="uom_po_id" ref="uom.product_uom_unit" />
</record>
<record id="product_service_task" model="product.product">
<field name="name">Service task</field>
<field name="type">service</field>
<field name="uom_id" ref="uom.product_uom_hour" />
<field name="uom_po_id" ref="uom.product_uom_hour" />
<field name="service_tracking">task_in_project</field>
<field name="service_policy">ordered_prepaid</field>
</record>
<record id="product_reimbursement" model="product.product">
<field name="name">Reimbursement</field>
<field name="type">service</field>
<field name="uom_id" ref="uom.product_uom_unit" />
<field name="uom_po_id" ref="uom.product_uom_unit" />
<field name="service_policy">delivered_manual</field>
<field name="expense_policy">cost</field>
<field name="provision_product_id" ref="product_provision" />
</record>
</odoo>
85 changes: 85 additions & 0 deletions sale_project_reimbursement_cost/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_project_reimbursement_cost
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-12-10 11:48+0000\n"
"PO-Revision-Date: 2024-12-10 06:51-0500\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: \n"
"X-Generator: Poedit 3.0.1\n"

#. module: sale_project_reimbursement_cost
#. odoo-javascript
#: code:addons/sale_project_reimbursement_cost/static/src/components/project_right_side_panel/project_right_side_panel.xml:0
#, python-format
msgid "Amount"
msgstr "Importe"

#. module: sale_project_reimbursement_cost
#. odoo-javascript
#: code:addons/sale_project_reimbursement_cost/static/src/components/project_right_side_panel/project_right_side_panel.xml:0
#, python-format
msgid "Date"
msgstr "Fecha"

#. module: sale_project_reimbursement_cost
#: model:ir.model,name:sale_project_reimbursement_cost.model_product_template
msgid "Product"
msgstr "Producto"

#. module: sale_project_reimbursement_cost
#: model:ir.model,name:sale_project_reimbursement_cost.model_project_project
msgid "Project"
msgstr "Proyecto"

#. module: sale_project_reimbursement_cost
#. odoo-javascript
#: code:addons/sale_project_reimbursement_cost/static/src/components/project_right_side_panel/project_right_side_panel.xml:0
#: model:product.template,name:sale_project_reimbursement_cost.product_provision_product_template
#, python-format
msgid "Provision"
msgstr "Provisión"

#. module: sale_project_reimbursement_cost
#: model:ir.model.fields,field_description:sale_project_reimbursement_cost.field_product_product__provision_product_id
#: model:ir.model.fields,field_description:sale_project_reimbursement_cost.field_product_template__provision_product_id
msgid "Provision Product"
msgstr "Producto para provisión"

#. module: sale_project_reimbursement_cost
#. odoo-javascript
#: code:addons/sale_project_reimbursement_cost/static/src/components/project_right_side_panel/project_right_side_panel.xml:0
#, python-format
msgid "Provisions"
msgstr "Provisiones"

#. module: sale_project_reimbursement_cost
#: model:product.template,name:sale_project_reimbursement_cost.product_reimbursement_product_template
msgid "Reimbursement"
msgstr "Reembolso"

#. module: sale_project_reimbursement_cost
#: model:ir.actions.act_window,name:sale_project_reimbursement_cost.sol_reimbursement_cost_action
msgid "Reimbursement cost"
msgstr "Reembolso de gastos"

#. module: sale_project_reimbursement_cost
#: model:product.template,name:sale_project_reimbursement_cost.product_service_task_product_template
msgid "Service task"
msgstr "Tarea de servicio"

#. module: sale_project_reimbursement_cost
#. odoo-javascript
#: code:addons/sale_project_reimbursement_cost/static/src/components/project_right_side_panel/project_right_side_panel.xml:0
#, python-format
msgid "Total"
msgstr "Total"
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_project_reimbursement_cost
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 17.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-12-10 11:48+0000\n"
"PO-Revision-Date: 2024-12-10 11:48+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: sale_project_reimbursement_cost
#. odoo-javascript
#: code:addons/sale_project_reimbursement_cost/static/src/components/project_right_side_panel/project_right_side_panel.xml:0
#, python-format
msgid "Amount"
msgstr ""

#. module: sale_project_reimbursement_cost
#. odoo-javascript
#: code:addons/sale_project_reimbursement_cost/static/src/components/project_right_side_panel/project_right_side_panel.xml:0
#, python-format
msgid "Date"
msgstr ""

#. module: sale_project_reimbursement_cost
#: model:ir.model,name:sale_project_reimbursement_cost.model_product_template
msgid "Product"
msgstr ""

#. module: sale_project_reimbursement_cost
#: model:ir.model,name:sale_project_reimbursement_cost.model_project_project
msgid "Project"
msgstr ""

#. module: sale_project_reimbursement_cost
#. odoo-javascript
#: code:addons/sale_project_reimbursement_cost/static/src/components/project_right_side_panel/project_right_side_panel.xml:0
#: model:product.template,name:sale_project_reimbursement_cost.product_provision_product_template
#, python-format
msgid "Provision"
msgstr ""

#. module: sale_project_reimbursement_cost
#: model:ir.model.fields,field_description:sale_project_reimbursement_cost.field_product_product__provision_product_id
#: model:ir.model.fields,field_description:sale_project_reimbursement_cost.field_product_template__provision_product_id
msgid "Provision Product"
msgstr ""

#. module: sale_project_reimbursement_cost
#. odoo-javascript
#: code:addons/sale_project_reimbursement_cost/static/src/components/project_right_side_panel/project_right_side_panel.xml:0
#, python-format
msgid "Provisions"
msgstr ""

#. module: sale_project_reimbursement_cost
#: model:product.template,name:sale_project_reimbursement_cost.product_reimbursement_product_template
msgid "Reimbursement"
msgstr ""

#. module: sale_project_reimbursement_cost
#: model:ir.actions.act_window,name:sale_project_reimbursement_cost.sol_reimbursement_cost_action
msgid "Reimbursement cost"
msgstr ""

#. module: sale_project_reimbursement_cost
#: model:product.template,name:sale_project_reimbursement_cost.product_service_task_product_template
msgid "Service task"
msgstr ""

#. module: sale_project_reimbursement_cost
#. odoo-javascript
#: code:addons/sale_project_reimbursement_cost/static/src/components/project_right_side_panel/project_right_side_panel.xml:0
#, python-format
msgid "Total"
msgstr ""
3 changes: 3 additions & 0 deletions sale_project_reimbursement_cost/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from . import product_template
from . import project_project
from . import account_move_line
Loading
Loading