Skip to content

Commit 26982e6

Browse files
committed
[ADD] sale_report_delivered_price_compliance
1 parent e378f2f commit 26982e6

14 files changed

Lines changed: 662 additions & 0 deletions

File tree

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
========================================
2+
Sale Report Delivered - Price Compliance
3+
========================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:fd8bc3be5e3f8810fca5a332a20a88535ffee3997514b37ccb50d6ea8aaf3537
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Alpha-red.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Alpha
16+
.. |badge2| image:: https://img.shields.io/badge/licence-LGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/lgpl-3.0-standalone.html
18+
:alt: License: LGPL-3
19+
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fsale--reporting-lightgray.png?logo=github
20+
:target: https://github.com/OCA/sale-reporting/tree/16.0/sale_report_delivered_price_compliance
21+
:alt: OCA/sale-reporting
22+
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23+
:target: https://translation.odoo-community.org/projects/sale-reporting-16-0/sale-reporting-16-0-sale_report_delivered_price_compliance
24+
:alt: Translate me on Weblate
25+
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/sale-reporting&target_branch=16.0
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module extends the functionality of Sale Report Delivered to
32+
support view Price Compliance Tiers and to allow you to have a better
33+
view of Pricing Compliance on Deliveries.
34+
35+
.. IMPORTANT::
36+
This is an alpha version, the data model and design can change at any time without warning.
37+
Only for development or testing purpose, do not use in production.
38+
`More details on development status <https://odoo-community.org/page/development-status>`_
39+
40+
**Table of contents**
41+
42+
.. contents::
43+
:local:
44+
45+
Use Cases / Context
46+
===================
47+
48+
This module was developed because we want to show Price Compliance Tiers
49+
on Sale Report Delivered report.
50+
51+
It will be useful for you if want to analyize information of your Price
52+
Compliance Tiers.
53+
54+
Usage
55+
=====
56+
57+
To use this module, you need to:
58+
59+
1. Go to Sales and create and send products with Price Compliance Tiers
60+
set
61+
2. Go to Sale Delivered Report
62+
3. Check Price Compliance Tier can be grouped
63+
64+
Bug Tracker
65+
===========
66+
67+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/sale-reporting/issues>`_.
68+
In case of trouble, please check there if your issue has already been reported.
69+
If you spotted it first, help us to smash it by providing a detailed and welcomed
70+
`feedback <https://github.com/OCA/sale-reporting/issues/new?body=module:%20sale_report_delivered_price_compliance%0Aversion:%2016.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
71+
72+
Do not contact contributors directly about support or help with technical issues.
73+
74+
Credits
75+
=======
76+
77+
Authors
78+
-------
79+
80+
* Moduon
81+
82+
Contributors
83+
------------
84+
85+
- Eduardo de Miguel (`Moduon <https://www.moduon.team/>`__)
86+
87+
Maintainers
88+
-----------
89+
90+
This module is maintained by the OCA.
91+
92+
.. image:: https://odoo-community.org/logo.png
93+
:alt: Odoo Community Association
94+
:target: https://odoo-community.org
95+
96+
OCA, or the Odoo Community Association, is a nonprofit organization whose
97+
mission is to support the collaborative development of Odoo features and
98+
promote its widespread use.
99+
100+
.. |maintainer-Shide| image:: https://github.com/Shide.png?size=40px
101+
:target: https://github.com/Shide
102+
:alt: Shide
103+
.. |maintainer-rafaelbn| image:: https://github.com/rafaelbn.png?size=40px
104+
:target: https://github.com/rafaelbn
105+
:alt: rafaelbn
106+
107+
Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:
108+
109+
|maintainer-Shide| |maintainer-rafaelbn|
110+
111+
This module is part of the `OCA/sale-reporting <https://github.com/OCA/sale-reporting/tree/16.0/sale_report_delivered_price_compliance>`_ project on GitHub.
112+
113+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import report
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright 2026 Moduon Team S.L.
2+
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl-3.0)
3+
4+
{
5+
"name": "Sale Report Delivered - Price Compliance",
6+
"summary": "Allow to view Price Compliance Tiers on Sale Report Delivered",
7+
"version": "16.0.1.0.0",
8+
"development_status": "Alpha",
9+
"category": "Sales",
10+
"website": "https://github.com/OCA/sale-reporting",
11+
"author": "Moduon, Odoo Community Association (OCA)",
12+
"maintainers": ["Shide", "rafaelbn"],
13+
"license": "LGPL-3",
14+
"application": False,
15+
"installable": True,
16+
"depends": [
17+
"sale_report_delivered",
18+
"sale_price_compliance",
19+
],
20+
"data": [
21+
"views/sale_report_delivered_views.xml",
22+
],
23+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This module was developed because we want to show Price Compliance Tiers on Sale Report Delivered report.
2+
3+
It will be useful for you if want to analyize information of your Price Compliance Tiers.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Eduardo de Miguel ([Moduon](https://www.moduon.team/))
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This module extends the functionality of Sale Report Delivered to support view Price Compliance Tiers and to allow you to have a better view of Pricing Compliance on Deliveries.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
To use this module, you need to:
2+
3+
1. Go to Sales and create and send products with Price Compliance Tiers set
4+
1. Go to Sale Delivered Report
5+
1. Check Price Compliance Tier can be grouped
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import sale_report_delivered
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Copyright 2025 Moduon Team S.L.
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl-3.0)
3+
4+
from odoo import api, fields, models
5+
6+
7+
class SaleReportDelivered(models.Model):
8+
_inherit = "sale.report.delivered"
9+
10+
@api.model
11+
def _get_price_compliance_tiers(self):
12+
return self.env["sale.order.line"]._get_price_compliance_selection_tiers_text()
13+
14+
line_price_compliance_tier = fields.Selection(
15+
selection="_get_price_compliance_tiers",
16+
string="Price Compliance Tier",
17+
help="Indicates the Tier of Price Compliance based on the unit price and "
18+
"applied discount compared to defined thresholds.",
19+
)
20+
21+
def _select(self):
22+
res = super()._select()
23+
res += ", sub.line_price_compliance_tier"
24+
return res
25+
26+
def _sub_select(self):
27+
res = super()._sub_select()
28+
res += ", sol.price_compliance_tier as line_price_compliance_tier"
29+
return res
30+
31+
def _group_by(self):
32+
res = super()._group_by()
33+
res += ", sub.line_price_compliance_tier"
34+
return res
9.23 KB
Loading

0 commit comments

Comments
 (0)