Skip to content

Commit 9d0431f

Browse files
manuelregidorTisho99
authored andcommitted
[IMP] pos_default_partner: Show default partner
1 parent fed7387 commit 9d0431f

File tree

6 files changed

+44
-32
lines changed

6 files changed

+44
-32
lines changed

pos_default_partner/README.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ Configuration
4141
Go to Point of Sale's settings page and select a default customer for a
4242
specific PoS configuration.
4343

44-
Known issues / Roadmap
45-
======================
46-
47-
Set the default customer also on the PoS UI.
48-
4944
Bug Tracker
5045
===========
5146

@@ -73,8 +68,8 @@ Contributors
7368
* Foram Shah <[email protected]>
7469

7570
* `Sygel <https://www.sygel.es>`_:
76-
7771
* Ángel García de la Chica Herrera <[email protected]>
72+
* Manuel Regidor <[email protected]>
7873

7974
Maintainers
8075
~~~~~~~~~~~

pos_default_partner/__manifest__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
"category": "Point of sale",
1212
"depends": ["point_of_sale"],
1313
"data": ["views/pos_config.xml"],
14+
"assets": {
15+
"point_of_sale.assets": ["/pos_default_partner/static/src/js/models.js"],
16+
},
1417
"website": "https://github.com/OCA/pos",
1518
"installable": True,
1619
}

pos_default_partner/readme/CONTRIBUTORS.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
* Foram Shah <[email protected]>
55

66
* `Sygel <https://www.sygel.es>`_:
7-
87
* Ángel García de la Chica Herrera <[email protected]>
8+
* Manuel Regidor <[email protected]>

pos_default_partner/readme/ROADMAP.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

pos_default_partner/static/description/index.html

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
<?xml version="1.0" encoding="utf-8"?>
21
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
32
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
43
<head>
@@ -9,10 +8,11 @@
98

109
/*
1110
:Author: David Goodger ([email protected])
12-
: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 $
1312
:Copyright: This stylesheet has been placed in the public domain.
1413
1514
Default cascading style sheet for the HTML output of Docutils.
15+
Despite the name, some widely supported CSS2 features are used.
1616
1717
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
1818
customize this style sheet.
@@ -275,7 +275,7 @@
275275
margin-left: 2em ;
276276
margin-right: 2em }
277277

278-
pre.code .ln { color: grey; } /* line numbers */
278+
pre.code .ln { color: gray; } /* line numbers */
279279
pre.code, code { background-color: #eeeeee }
280280
pre.code .comment, code .comment { color: #5C6576 }
281281
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -301,7 +301,7 @@
301301
span.pre {
302302
white-space: pre }
303303

304-
span.problematic {
304+
span.problematic, pre.problematic {
305305
color: red }
306306

307307
span.section-subtitle {
@@ -375,12 +375,11 @@ <h1 class="title">Point Of Sale Default Partner</h1>
375375
<div class="contents local topic" id="contents">
376376
<ul class="simple">
377377
<li><a class="reference internal" href="#configuration" id="toc-entry-1">Configuration</a></li>
378-
<li><a class="reference internal" href="#known-issues-roadmap" id="toc-entry-2">Known issues / Roadmap</a></li>
379-
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-3">Bug Tracker</a></li>
380-
<li><a class="reference internal" href="#credits" id="toc-entry-4">Credits</a><ul>
381-
<li><a class="reference internal" href="#authors" id="toc-entry-5">Authors</a></li>
382-
<li><a class="reference internal" href="#contributors" id="toc-entry-6">Contributors</a></li>
383-
<li><a class="reference internal" href="#maintainers" id="toc-entry-7">Maintainers</a></li>
378+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-2">Bug Tracker</a></li>
379+
<li><a class="reference internal" href="#credits" id="toc-entry-3">Credits</a><ul>
380+
<li><a class="reference internal" href="#authors" id="toc-entry-4">Authors</a></li>
381+
<li><a class="reference internal" href="#contributors" id="toc-entry-5">Contributors</a></li>
382+
<li><a class="reference internal" href="#maintainers" id="toc-entry-6">Maintainers</a></li>
384383
</ul>
385384
</li>
386385
</ul>
@@ -390,28 +389,24 @@ <h1><a class="toc-backref" href="#toc-entry-1">Configuration</a></h1>
390389
<p>Go to Point of Sale’s settings page and select a default customer for a
391390
specific PoS configuration.</p>
392391
</div>
393-
<div class="section" id="known-issues-roadmap">
394-
<h1><a class="toc-backref" href="#toc-entry-2">Known issues / Roadmap</a></h1>
395-
<p>Set the default customer also on the PoS UI.</p>
396-
</div>
397392
<div class="section" id="bug-tracker">
398-
<h1><a class="toc-backref" href="#toc-entry-3">Bug Tracker</a></h1>
393+
<h1><a class="toc-backref" href="#toc-entry-2">Bug Tracker</a></h1>
399394
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/pos/issues">GitHub Issues</a>.
400395
In case of trouble, please check there if your issue has already been reported.
401396
If you spotted it first, help us to smash it by providing a detailed and welcomed
402397
<a class="reference external" href="https://github.com/OCA/pos/issues/new?body=module:%20pos_default_partner%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
403398
<p>Do not contact contributors directly about support or help with technical issues.</p>
404399
</div>
405400
<div class="section" id="credits">
406-
<h1><a class="toc-backref" href="#toc-entry-4">Credits</a></h1>
401+
<h1><a class="toc-backref" href="#toc-entry-3">Credits</a></h1>
407402
<div class="section" id="authors">
408-
<h2><a class="toc-backref" href="#toc-entry-5">Authors</a></h2>
403+
<h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
409404
<ul class="simple">
410405
<li>Akretion</li>
411406
</ul>
412407
</div>
413408
<div class="section" id="contributors">
414-
<h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
409+
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
415410
<ul>
416411
<li><p class="first">Akretion</p>
417412
<blockquote>
@@ -422,17 +417,18 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
422417
</li>
423418
<li><p class="first">Foram Shah &lt;<a class="reference external" href="mailto:foram.shah&#64;initos.com">foram.shah&#64;initos.com</a>&gt;</p>
424419
</li>
425-
<li><p class="first"><a class="reference external" href="https://www.sygel.es">Sygel</a>:</p>
426-
<ul class="simple">
427-
<li>Ángel García de la Chica Herrera &lt;<a class="reference external" href="mailto:angel.garcia&#64;sygel.es">angel.garcia&#64;sygel.es</a>&gt;</li>
428-
</ul>
420+
<li><p class="first"><a class="reference external" href="https://www.sygel.es">Sygel</a>:
421+
* Ángel García de la Chica Herrera &lt;<a class="reference external" href="mailto:angel.garcia&#64;sygel.es">angel.garcia&#64;sygel.es</a>&gt;
422+
* Manuel Regidor &lt;<a class="reference external" href="mailto:manuel.regidor&#64;sygel.es">manuel.regidor&#64;sygel.es</a>&gt;</p>
429423
</li>
430424
</ul>
431425
</div>
432426
<div class="section" id="maintainers">
433-
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
427+
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
434428
<p>This module is maintained by the OCA.</p>
435-
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
429+
<a class="reference external image-reference" href="https://odoo-community.org">
430+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
431+
</a>
436432
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
437433
mission is to support the collaborative development of Odoo features and
438434
promote its widespread use.</p>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
odoo.define("pos_default_partner.models", function (require) {
2+
"use strict";
3+
4+
var models = require("point_of_sale.models");
5+
6+
var _super_order = models.Order.prototype;
7+
models.Order = models.Order.extend({
8+
get_client: function () {
9+
var return_val = _super_order.get_client.apply(this, arguments);
10+
if (return_val == undefined) {
11+
return_val = this.pos.db.get_partner_by_id(
12+
this.pos.config.default_partner_id[0]
13+
);
14+
}
15+
return return_val;
16+
},
17+
});
18+
return models;
19+
});

0 commit comments

Comments
 (0)