Skip to content

Commit 35aae2b

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

File tree

5 files changed

+34
-11
lines changed

5 files changed

+34
-11
lines changed

pos_default_partner/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ Contributors
7373
* Foram Shah <[email protected]>
7474

7575
* `Sygel <https://www.sygel.es>`_:
76-
7776
* Ángel García de la Chica Herrera <[email protected]>
77+
* Manuel Regidor <[email protected]>
7878

7979
Maintainers
8080
~~~~~~~~~~~

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/static/description/index.html

Lines changed: 10 additions & 9 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 {
@@ -422,17 +422,18 @@ <h2><a class="toc-backref" href="#toc-entry-6">Contributors</a></h2>
422422
</li>
423423
<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>
424424
</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>
425+
<li><p class="first"><a class="reference external" href="https://www.sygel.es">Sygel</a>:
426+
* Á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;
427+
* Manuel Regidor &lt;<a class="reference external" href="mailto:manuel.regidor&#64;sygel.es">manuel.regidor&#64;sygel.es</a>&gt;</p>
429428
</li>
430429
</ul>
431430
</div>
432431
<div class="section" id="maintainers">
433432
<h2><a class="toc-backref" href="#toc-entry-7">Maintainers</a></h2>
434433
<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>
434+
<a class="reference external image-reference" href="https://odoo-community.org">
435+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
436+
</a>
436437
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
437438
mission is to support the collaborative development of Odoo features and
438439
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)