Skip to content

Commit 144375d

Browse files
committed
[FIX]pos_partner_ref: fixed the issue of if we have a lot of customers and we search a customer using the ref with the button search more, result not found.
1 parent 664823e commit 144375d

4 files changed

Lines changed: 37 additions & 10 deletions

File tree

pos_partner_ref/README.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Point of Sale - Partner contact ref
77
!! This file is generated by oca-gen-addon-readme !!
88
!! changes will be overwritten. !!
99
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10-
!! source digest: sha256:f4e560cdcb93e60d8824aefae214926947a93514b2ab7beeeac48942d9dc984d
10+
!! source digest: sha256:f32f705adb9f72e6581e54625381b964ff3d9f299b15ee2cad6c2fa1efb1aecc
1111
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
1212
1313
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -57,10 +57,13 @@ Authors
5757
Contributors
5858
------------
5959

60-
- Emanuel Cino <ecino@compassion.ch>
61-
- Juan Carlos Bonilla Bravo <juancarlos.bonilla@factorlibre.com>
62-
- Enric Tobella
63-
- Cyril VINH-TUNG <cyril@invitu.com>
60+
- Emanuel Cino <ecino@compassion.ch>
61+
- Juan Carlos Bonilla Bravo <juancarlos.bonilla@factorlibre.com>
62+
- Enric Tobella
63+
- Cyril VINH-TUNG <cyril@invitu.com>
64+
- `SerpentCS <https://www.serpentcs.com>`__:
65+
66+
- Parvez Qureshi <parvez.qureshi@serpentcs.com>
6467

6568
Maintainers
6669
-----------

pos_partner_ref/models/pos_session.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,18 @@ def _loader_params_res_partner(self):
1010
res = super()._loader_params_res_partner()
1111
res["search_params"]["fields"].append("ref")
1212
return res
13+
14+
def get_pos_ui_res_partner_by_params(self, custom_search_params):
15+
if custom_search_params and "domain" in custom_search_params:
16+
search_query = [
17+
condition[2]
18+
for condition in custom_search_params["domain"]
19+
if condition[0] == "parent_name"
20+
]
21+
if search_query and search_query[0]:
22+
existing_domain = custom_search_params["domain"]
23+
new_condition = ("ref", "ilike", search_query[0])
24+
custom_search_params["domain"] = (
25+
["|"] + existing_domain + [new_condition]
26+
)
27+
return super().get_pos_ui_res_partner_by_params(custom_search_params)

pos_partner_ref/readme/CONTRIBUTORS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,5 @@
22
- Juan Carlos Bonilla Bravo \<<juancarlos.bonilla@factorlibre.com>\>
33
- Enric Tobella
44
- Cyril VINH-TUNG \<<cyril@invitu.com>\>
5+
- [SerpentCS](https://www.serpentcs.com):
6+
- Parvez Qureshi \<<parvez.qureshi@serpentcs.com>\>

pos_partner_ref/static/description/index.html

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
/*
1010
:Author: David Goodger (goodger@python.org)
11-
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
11+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
1212
:Copyright: This stylesheet has been placed in the public domain.
1313
1414
Default cascading style sheet for the HTML output of Docutils.
15+
Despite the name, some widely supported CSS2 features are used.
1516
1617
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
1718
customize this style sheet.
@@ -274,7 +275,7 @@
274275
margin-left: 2em ;
275276
margin-right: 2em }
276277

277-
pre.code .ln { color: grey; } /* line numbers */
278+
pre.code .ln { color: gray; } /* line numbers */
278279
pre.code, code { background-color: #eeeeee }
279280
pre.code .comment, code .comment { color: #5C6576 }
280281
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -300,7 +301,7 @@
300301
span.pre {
301302
white-space: pre }
302303

303-
span.problematic {
304+
span.problematic, pre.problematic {
304305
color: red }
305306

306307
span.section-subtitle {
@@ -366,7 +367,7 @@ <h1 class="title">Point of Sale - Partner contact ref</h1>
366367
!! This file is generated by oca-gen-addon-readme !!
367368
!! changes will be overwritten. !!
368369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369-
!! source digest: sha256:f4e560cdcb93e60d8824aefae214926947a93514b2ab7beeeac48942d9dc984d
370+
!! source digest: sha256:f32f705adb9f72e6581e54625381b964ff3d9f299b15ee2cad6c2fa1efb1aecc
370371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371372
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/pos/tree/17.0/pos_partner_ref"><img alt="OCA/pos" src="https://img.shields.io/badge/github-OCA%2Fpos-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/pos-17-0/pos-17-0-pos_partner_ref"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/pos&amp;target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372373
<p>Adds the ref field in the POS Customer Screen so that the information
@@ -406,12 +407,18 @@ <h2><a class="toc-backref" href="#toc-entry-4">Contributors</a></h2>
406407
<li>Juan Carlos Bonilla Bravo &lt;<a class="reference external" href="mailto:juancarlos.bonilla&#64;factorlibre.com">juancarlos.bonilla&#64;factorlibre.com</a>&gt;</li>
407408
<li>Enric Tobella</li>
408409
<li>Cyril VINH-TUNG &lt;<a class="reference external" href="mailto:cyril&#64;invitu.com">cyril&#64;invitu.com</a>&gt;</li>
410+
<li><a class="reference external" href="https://www.serpentcs.com">SerpentCS</a>:<ul>
411+
<li>Parvez Qureshi &lt;<a class="reference external" href="mailto:parvez.qureshi&#64;serpentcs.com">parvez.qureshi&#64;serpentcs.com</a>&gt;</li>
412+
</ul>
413+
</li>
409414
</ul>
410415
</div>
411416
<div class="section" id="maintainers">
412417
<h2><a class="toc-backref" href="#toc-entry-5">Maintainers</a></h2>
413418
<p>This module is maintained by the OCA.</p>
414-
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
419+
<a class="reference external image-reference" href="https://odoo-community.org">
420+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
421+
</a>
415422
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
416423
mission is to support the collaborative development of Odoo features and
417424
promote its widespread use.</p>

0 commit comments

Comments
 (0)