Skip to content

Commit

Permalink
[17.0][IMP] Added operating units group filter for PoS Orders Report
Browse files Browse the repository at this point in the history
  • Loading branch information
BT-dherreros committed Dec 23, 2024
1 parent 1d47c77 commit 3c419e9
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 7 deletions.
1 change: 1 addition & 0 deletions pos_operating_unit/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Contributors
- Ooops404 <https://ooops404.com>

- Ilyas <[email protected]>
- Daniel Herreros <[email protected]>

Maintainers
-----------
Expand Down
1 change: 1 addition & 0 deletions pos_operating_unit/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from . import models
from . import report
1 change: 1 addition & 0 deletions pos_operating_unit/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"license": "LGPL-3",
"data": [
"security/pos_security.xml",
"views/pos_order_report_view.xml",
"views/pos_views.xml",
"views/res_config_settings_views.xml",
],
Expand Down
1 change: 1 addition & 0 deletions pos_operating_unit/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- Ooops404 \<<https://ooops404.com>\>
- Ilyas \<<[email protected]>\>
- Daniel Herreros \<<[email protected]>\>
3 changes: 3 additions & 0 deletions pos_operating_unit/report/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from . import pos_order_report
15 changes: 15 additions & 0 deletions pos_operating_unit/report/pos_order_report.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from odoo import fields, models


class PosOrderReport(models.Model):
_inherit = "report.pos.order"

operating_unit_ids = fields.Many2many(
"operating.unit",
relation="pos_order_operating_unit_rel",
column1="pos_order_id",
column2="operating_unit_id",
string="Operating Units",
)
12 changes: 5 additions & 7 deletions pos_operating_unit/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.
Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -275,7 +274,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: gray; } /* line numbers */
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -301,7 +300,7 @@
span.pre {
white-space: pre }

span.problematic, pre.problematic {
span.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -420,16 +419,15 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
<ul class="simple">
<li>Ooops404 &lt;<a class="reference external" href="https://ooops404.com">https://ooops404.com</a>&gt;<ul>
<li>Ilyas &lt;<a class="reference external" href="mailto:irazor147&#64;gmail.com">irazor147&#64;gmail.com</a>&gt;</li>
<li>Daniel Herreros &lt;<a class="reference external" href="mailto:daniel.herreros&#64;braintec.com">daniel.herreros&#64;braintec.com</a>&gt;</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>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.</p>
Expand Down
19 changes: 19 additions & 0 deletions pos_operating_unit/views/pos_order_report_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>

<record id="view_report_pos_order_search" model="ir.ui.view">
<field name="name">report.pos.order.search</field>
<field name="model">report.pos.order</field>
<field name="inherit_id" ref="point_of_sale.view_report_pos_order_search" />
<field name="arch" type="xml">
<filter name="product_category" position="after">
<filter
string="Operating Units"
name="operating_units"
context="{'group_by':'operating_unit_ids'}"
/>
</filter>
</field>
</record>

</odoo>

0 comments on commit 3c419e9

Please sign in to comment.