Skip to content

Commit

Permalink
Merge pull request #263 from OCA/18.0
Browse files Browse the repository at this point in the history
Syncing from upstream OCA/sale-reporting (18.0)
  • Loading branch information
bt-admin authored Feb 4, 2025
2 parents 71077a0 + 0e687f1 commit d60c1b6
Show file tree
Hide file tree
Showing 18 changed files with 724 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Available addons
addon | version | maintainers | summary
--- | --- | --- | ---
[sale_order_line_position](sale_order_line_position/) | 18.0.1.0.0 | | Adds position number on sale order line.
[sale_report_salesperson_from_partner](sale_report_salesperson_from_partner/) | 18.0.1.0.0 | [![pilarvargas-tecnativa](https://github.com/pilarvargas-tecnativa.png?size=30px)](https://github.com/pilarvargas-tecnativa) | Sale Report Salesperson From Partner

[//]: # (end addons)

Expand Down
87 changes: 87 additions & 0 deletions sale_report_salesperson_from_partner/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
====================================
Sale Report Salesperson From Partner
====================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:2a38996f02bca89933e3b8787d199ce7b7a3af19f83c85521c30d22e8cfc0561
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Fsale--reporting-lightgray.png?logo=github
:target: https://github.com/OCA/sale-reporting/tree/18.0/sale_report_salesperson_from_partner
:alt: OCA/sale-reporting
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/sale-reporting-18-0/sale-reporting-18-0-sale_report_salesperson_from_partner
: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/sale-reporting&target_branch=18.0
:alt: Try me on Runboat

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

This module extends the sales report in Odoo to allow sales to be
grouped by the sales person assigned to the partner.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-reporting/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/sale-reporting/issues/new?body=module:%20sale_report_salesperson_from_partner%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
-------

* Tecnativa

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

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

- Pilar Vargas

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.

.. |maintainer-pilarvargas-tecnativa| image:: https://github.com/pilarvargas-tecnativa.png?size=40px
:target: https://github.com/pilarvargas-tecnativa
:alt: pilarvargas-tecnativa

Current `maintainer <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-pilarvargas-tecnativa|

This module is part of the `OCA/sale-reporting <https://github.com/OCA/sale-reporting/tree/18.0/sale_report_salesperson_from_partner>`_ 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_report_salesperson_from_partner/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import report
15 changes: 15 additions & 0 deletions sale_report_salesperson_from_partner/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright 2024 Tecnativa - Pilar Vargas
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Sale Report Salesperson From Partner",
"version": "18.0.1.0.0",
"author": "Tecnativa," "Odoo Community Association (OCA)",
"website": "https://github.com/OCA/sale-reporting",
"category": "Sales",
"license": "AGPL-3",
"data": ["views/sale_report_views.xml"],
"depends": ["sale"],
"maintainers": ["pilarvargas-tecnativa"],
"installable": True,
"application": False,
}
35 changes: 35 additions & 0 deletions sale_report_salesperson_from_partner/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_report_salesperson_from_partner
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 15.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-11-29 07:18+0000\n"
"PO-Revision-Date: 2024-11-29 08:20+0100\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: nplurals=2; plural=(n != 1);\n"
"X-Generator: Poedit 3.4.2\n"

#. module: sale_report_salesperson_from_partner
#: model:ir.model,name:sale_report_salesperson_from_partner.model_sale_report
msgid "Sales Analysis Report"
msgstr "Informe de análisis de ventas"

#. module: sale_report_salesperson_from_partner
#: model:ir.model.fields,field_description:sale_report_salesperson_from_partner.field_sale_report__user_from_partner_id
#: model_terms:ir.ui.view,arch_db:sale_report_salesperson_from_partner.view_order_product_search
msgid "Salesperson From Partner"
msgstr "Comercial del cliente"

#~ msgid "Sales Order"
#~ msgstr "Pedido de venta"

#~ msgid "The internal user in charge of this contact."
#~ msgstr "El usuario interno a cargo de este contacto."
28 changes: 28 additions & 0 deletions sale_report_salesperson_from_partner/i18n/it.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_report_salesperson_from_partner
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: 2024-12-09 10:06+0000\n"
"Last-Translator: mymage <[email protected]>\n"
"Language-Team: none\n"
"Language: it\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 5.6.2\n"

#. module: sale_report_salesperson_from_partner
#: model:ir.model,name:sale_report_salesperson_from_partner.model_sale_report
msgid "Sales Analysis Report"
msgstr "Resoconto analisi vendite"

#. module: sale_report_salesperson_from_partner
#: model:ir.model.fields,field_description:sale_report_salesperson_from_partner.field_sale_report__user_from_partner_id
#: model_terms:ir.ui.view,arch_db:sale_report_salesperson_from_partner.view_order_product_search
msgid "Salesperson From Partner"
msgstr "Venditore dal partner"
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * sale_report_salesperson_from_partner
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 18.0\n"
"Report-Msgid-Bugs-To: \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_report_salesperson_from_partner
#: model:ir.model,name:sale_report_salesperson_from_partner.model_sale_report
msgid "Sales Analysis Report"
msgstr ""

#. module: sale_report_salesperson_from_partner
#: model:ir.model.fields,field_description:sale_report_salesperson_from_partner.field_sale_report__user_from_partner_id
#: model_terms:ir.ui.view,arch_db:sale_report_salesperson_from_partner.view_order_product_search
msgid "Salesperson From Partner"
msgstr ""
3 changes: 3 additions & 0 deletions sale_report_salesperson_from_partner/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions sale_report_salesperson_from_partner/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- [Tecnativa](https://www.tecnativa.com):

> - Pilar Vargas
2 changes: 2 additions & 0 deletions sale_report_salesperson_from_partner/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
This module extends the sales report in Odoo to allow sales to be
grouped by the sales person assigned to the partner.
1 change: 1 addition & 0 deletions sale_report_salesperson_from_partner/report/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import sale_report
21 changes: 21 additions & 0 deletions sale_report_salesperson_from_partner/report/sale_report.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from odoo import fields, models


class SaleReport(models.Model):
_inherit = "sale.report"

user_from_partner_id = fields.Many2one(
"res.users",
string="Salesperson From Partner",
readonly=True,
)

def _group_by_sale(self):
res = super()._group_by_sale()
res += """,partner.user_id"""
return res

def _select_additional_fields(self):
res = super()._select_additional_fields()
res["user_from_partner_id"] = "partner.user_id"
return res
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d60c1b6

Please sign in to comment.