Skip to content

Commit d1437f9

Browse files
manuelregidorfshah-initos
authored andcommitted
[IMP] pos_product_sort: black, isort, prettier
1 parent d93c8d2 commit d1437f9

File tree

3 files changed

+20
-22
lines changed

3 files changed

+20
-22
lines changed

pos_product_sort/__manifest__.py

+10-14
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,16 @@
33
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
44

55
{
6-
'name': 'Point of Sale - Products Sorted by Name',
7-
'version': '12.0.1.0.1',
8-
'category': 'Point Of Sale',
9-
'summary': '''
6+
"name": "Point of Sale - Products Sorted by Name",
7+
"version": "12.0.1.0.1",
8+
"category": "Point Of Sale",
9+
"summary": """
1010
sort the products by name in the point of sale
1111
instead of sorting them by the sequence field.
12-
''',
13-
'author': 'GRAP, Odoo Community Association (OCA)',
14-
'website': 'https://github.com/OCA/pos',
15-
'license': 'AGPL-3',
16-
'depends': [
17-
'point_of_sale',
18-
],
19-
'data': [
20-
'views/assets.xml',
21-
],
12+
""",
13+
"author": "GRAP, Odoo Community Association (OCA)",
14+
"website": "https://github.com/OCA/pos",
15+
"license": "AGPL-3",
16+
"depends": ["point_of_sale",],
17+
"data": ["views/assets.xml",],
2218
}

pos_product_sort/static/src/js/models.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@
44
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
55
*/
66

7-
odoo.define('pos_product_sort.models', function (require) {
7+
odoo.define("pos_product_sort.models", function(require) {
88
"use strict";
99

10-
var models = require('point_of_sale.models');
10+
var models = require("point_of_sale.models");
1111
var PosModelSuper = models.PosModel;
1212

1313
models.PosModel = models.PosModel.extend({
1414
initialize: function(session, attributes) {
1515
var self = this;
16-
_.each(self.models, function (model) {
17-
if (model.model === 'product.product'){
18-
model.order = [{name: 'name'}];
16+
_.each(self.models, function(model) {
17+
if (model.model === "product.product") {
18+
model.order = [{name: "name"}];
1919
}
2020
});
2121
return PosModelSuper.prototype.initialize.call(this, session, attributes);

pos_product_sort/views/assets.xml

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8" ?>
22
<!--
33
Copyright (C) 2020 - Today: GRAP (http://www.grap.coop)
44
@author: Sylvain LE GAL (https://twitter.com/legalsylvain)
55
License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
66
-->
7-
87
<odoo>
98
<template id="assets_frontend" inherit_id="point_of_sale.assets">
109
<xpath expr="." position="inside">
11-
<script type="text/javascript" src="/pos_product_sort/static/src/js/models.js"></script>
10+
<script
11+
type="text/javascript"
12+
src="/pos_product_sort/static/src/js/models.js"
13+
/>
1214
</xpath>
1315
</template>
1416
</odoo>

0 commit comments

Comments
 (0)