forked from OCA/sale-reporting
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #241 from OCA/16.0
Syncing from upstream OCA/sale-reporting (16.0)
- Loading branch information
Showing
18 changed files
with
667 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
=========================== | ||
Sale Report Filter by State | ||
=========================== | ||
|
||
.. | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! This file is generated by oca-gen-addon-readme !! | ||
!! changes will be overwritten. !! | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
!! source digest: sha256:d101143695d9ce5dc9d1cd209770f0eac630e7c9e47f758e05cb63ddb6b2aa41 | ||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
.. |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/16.0/sale_report_country_state | ||
: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-16-0/sale-reporting-16-0-sale_report_country_state | ||
: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=16.0 | ||
:alt: Try me on Runboat | ||
|
||
|badge1| |badge2| |badge3| |badge4| |badge5| | ||
|
||
This module allows to filter by partner's state in the sale reports. | ||
|
||
**Table of contents** | ||
|
||
.. contents:: | ||
:local: | ||
|
||
Usage | ||
===== | ||
|
||
To filter by state you can either: | ||
|
||
#. Go to *Sales > Reporting > Sales* | ||
#. Group by *Customer State* or filter for such criteria. | ||
|
||
#. Go to *Sales > Products > Products* and select a product. | ||
#. Press the sales analysis smart button at the top. | ||
#. Filter or group by the *Customer State* | ||
|
||
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_country_state%0Aversion:%2016.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>`_: | ||
|
||
* David Vidal | ||
* João Marques | ||
* 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/sale-reporting <https://github.com/OCA/sale-reporting/tree/16.0/sale_report_country_state>`_ project on GitHub. | ||
|
||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import reports |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright 2020 Tecnativa - David Vidal | ||
# Copyright 2024 Tecnativa - Carlos López | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
{ | ||
"name": "Sale Report Filter by State", | ||
"version": "16.0.1.0.0", | ||
"author": "Tecnativa, Odoo Community Association (OCA)", | ||
"website": "https://github.com/OCA/sale-reporting", | ||
"category": "Sales", | ||
"license": "AGPL-3", | ||
"depends": ["sale"], | ||
"data": ["reports/sale_report_views.xml"], | ||
"installable": True, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_country_state | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.0\n" | ||
"Report-Msgid-Bugs-To: \n" | ||
"POT-Creation-Date: 2024-10-07 16:53+0000\n" | ||
"PO-Revision-Date: 2024-10-07 16:53+0000\n" | ||
"Last-Translator: \n" | ||
"Language-Team: \n" | ||
"Language: \n" | ||
"MIME-Version: 1.0\n" | ||
"Content-Type: text/plain; charset=UTF-8\n" | ||
"Content-Transfer-Encoding: \n" | ||
"Plural-Forms: \n" | ||
|
||
#. module: sale_report_country_state | ||
#: model:ir.model.fields,field_description:sale_report_country_state.field_sale_report__state_id | ||
#: model_terms:ir.ui.view,arch_db:sale_report_country_state.view_order_product_search | ||
msgid "Customer State" | ||
msgstr "Provincia del cliente" | ||
|
||
#. module: sale_report_country_state | ||
#: model:ir.model,name:sale_report_country_state.model_sale_report | ||
msgid "Sales Analysis Report" | ||
msgstr "Informe de análisis de ventas" |
25 changes: 25 additions & 0 deletions
25
sale_report_country_state/i18n/sale_report_country_state.pot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_country_state | ||
# | ||
msgid "" | ||
msgstr "" | ||
"Project-Id-Version: Odoo Server 16.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_country_state | ||
#: model:ir.model.fields,field_description:sale_report_country_state.field_sale_report__state_id | ||
#: model_terms:ir.ui.view,arch_db:sale_report_country_state.view_order_product_search | ||
msgid "Customer State" | ||
msgstr "" | ||
|
||
#. module: sale_report_country_state | ||
#: model:ir.model,name:sale_report_country_state.model_sale_report | ||
msgid "Sales Analysis Report" | ||
msgstr "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
* `Tecnativa <https://www.tecnativa.com>`_: | ||
|
||
* David Vidal | ||
* João Marques | ||
* Carlos López |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This module allows to filter by partner's state in the sale reports. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
To filter by state you can either: | ||
|
||
#. Go to *Sales > Reporting > Sales* | ||
#. Group by *Customer State* or filter for such criteria. | ||
|
||
#. Go to *Sales > Products > Products* and select a product. | ||
#. Press the sales analysis smart button at the top. | ||
#. Filter or group by the *Customer State* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from . import sale_report |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Copyright 2020 Tecnativa - David Vidal | ||
# Copyright 2024 Tecnativa - Carlos López | ||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
from odoo import fields, models | ||
|
||
|
||
class SaleReport(models.Model): | ||
_inherit = "sale.report" | ||
|
||
state_id = fields.Many2one( | ||
comodel_name="res.country.state", | ||
string="Customer State", | ||
readonly=True, | ||
) | ||
|
||
def _select_additional_fields(self): | ||
res = super()._select_additional_fields() | ||
res["state_id"] = "partner.state_id" | ||
return res | ||
|
||
def _group_by_sale(self): | ||
res = super()._group_by_sale() | ||
res += ", partner.state_id" | ||
return res |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<odoo> | ||
|
||
<record id="view_order_product_search" model="ir.ui.view"> | ||
<field name="model">sale.report</field> | ||
<field name="inherit_id" ref="sale.view_order_product_search" /> | ||
<field name="arch" type="xml"> | ||
<filter name="country_id" position="after"> | ||
<filter | ||
string="Customer State" | ||
name="state_id" | ||
context="{'group_by':'state_id'}" | ||
/> | ||
</filter> | ||
</field> | ||
</record> | ||
|
||
</odoo> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.