Skip to content

Commit 033823a

Browse files
author
Ivan Yelizariev
committed
💚 pre-commit: auto cleanups
1 parent 50d7f83 commit 033823a

File tree

272 files changed

+14275
-10110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

272 files changed

+14275
-10110
lines changed

.DINAR/image/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
This folder is attached on image building as ``custom/`` folder in [doobba](https://github.com/Tecnativa/doodba#image-usage).
2-
Few additional [files](https://github.com/itpp-labs/DINAR/tree/master/embedded-files/.DINAR/image) are attached temporary on image building.
1+
This folder is attached on image building as `custom/` folder in
2+
[doobba](https://github.com/Tecnativa/doodba#image-usage). Few additional
3+
[files](https://github.com/itpp-labs/DINAR/tree/master/embedded-files/.DINAR/image) are
4+
attached temporary on image building.

.DINAR/image/src/addons.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# see https://github.com/Tecnativa/doodba#optodoocustomsrcaddonsyaml
2-
32
---
43
ENV:
54
DEFAULT_REPO_PATTERN: https://github.com/it-projects-llc/{}.git

.github/workflows/main.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ on:
66

77
jobs:
88
notify:
9-
109
runs-on: ubuntu-latest
1110

1211
steps:
13-
- name: Send notifications to Telegram
14-
run: curl -s -X POST https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN }}/sendMessage -d chat_id=${{ secrets.TELEGRAM_CHAT_ID }} -d text="${MESSAGE}" >> /dev/null
15-
env:
16-
MESSAGE: "Issue ${{ github.event.action }}: \n${{ github.event.issue.html_url }}"
12+
- name: Send notifications to Telegram
13+
run:
14+
curl -s -X POST https://api.telegram.org/bot${{ secrets.TELEGRAM_TOKEN
15+
}}/sendMessage -d chat_id=${{ secrets.TELEGRAM_CHAT_ID }} -d text="${MESSAGE}"
16+
>> /dev/null
17+
env:
18+
MESSAGE:
19+
"Issue ${{ github.event.action }}: \n${{ github.event.issue.html_url }}"

.travis.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,27 @@ addons:
1010
postgresql: "9.5"
1111
apt:
1212
packages:
13-
- expect-dev # provides unbuffer utility
14-
- python-lxml # because pip installation is slow
13+
- expect-dev # provides unbuffer utility
14+
- python-lxml # because pip installation is slow
1515

1616
env:
1717
global:
18-
- VERSION="13.0" TESTS="0" LINT_CHECK="0" UNIT_TEST="0"
19-
- SERVER_OPTIONS="--log-handler=odoo.addons.pos_longpolling:DEBUG"
20-
- EXCLUDE="hw_printer_network,hw_twitter_printing"
21-
- PYLINT_ODOO_JSLINTRC="/home/travis/maintainer-quality-tools/travis/cfg/.jslintrc"
22-
18+
- VERSION="13.0" TESTS="0" LINT_CHECK="0" UNIT_TEST="0"
19+
- SERVER_OPTIONS="--log-handler=odoo.addons.pos_longpolling:DEBUG"
20+
- EXCLUDE="hw_printer_network,hw_twitter_printing"
21+
- PYLINT_ODOO_JSLINTRC="/home/travis/maintainer-quality-tools/travis/cfg/.jslintrc"
2322

2423
matrix:
25-
- LINT_CHECK="1"
26-
- CHECK_TAGS="1"
27-
- TESTS="1" ODOO_REPO="odoo/odoo"
28-
- MAKEPOT="1"
29-
- TESTS="1" ODOO_REPO="OCA/OCB""
30-
24+
- LINT_CHECK="1"
25+
- CHECK_TAGS="1"
26+
- TESTS="1" ODOO_REPO="odoo/odoo"
27+
- MAKEPOT="1"
28+
- TESTS="1" ODOO_REPO="OCA/OCB""
3129

3230
install:
3331
- pip install anybox.testing.openerp
34-
- git clone https://github.com/it-projects-llc/maintainer-quality-tools.git ${HOME}/maintainer-quality-tools
32+
- git clone https://github.com/it-projects-llc/maintainer-quality-tools.git
33+
${HOME}/maintainer-quality-tools
3534
- export PATH=${HOME}/maintainer-quality-tools/travis:${PATH}
3635
- travis_install_nightly
3736

pos_cashbox/static/src/js/cashbox.js

Lines changed: 49 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,83 @@
11
/* Copyright 2018 Dinar Gabbasov <https://it-projects.info/team/GabbasovDinar>
2-
* License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). */
3-
odoo.define('pos_cashbox.open', function (require) {
2+
* License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). */
3+
odoo.define("pos_cashbox.open", function(require) {
44
"use strict";
55

6-
var WidgetButton = require('web.form_widgets').WidgetButton;
7-
var Session = require('web.Session');
8-
var Model = require('web.DataModel');
9-
var core = require('web.core');
10-
var CrashManager = require('web.CrashManager');
6+
var WidgetButton = require("web.form_widgets").WidgetButton;
7+
var Session = require("web.Session");
8+
var Model = require("web.DataModel");
9+
var core = require("web.core");
10+
var CrashManager = require("web.CrashManager");
1111

1212
var _t = core._t;
1313

14-
1514
WidgetButton.include({
16-
on_click: function(){
15+
on_click: function() {
1716
var self = this;
18-
if (this.node.attrs.special === 'open_backend_cashbox'){
17+
if (this.node.attrs.special === "open_backend_cashbox") {
1918
var proxy_ip = this.view.datarecord.proxy_ip;
2019
if (!proxy_ip) {
21-
return this.show_warning_message(_t('Connection Refused. Please check the IP address to PosBox'));
20+
return this.show_warning_message(
21+
_t("Connection Refused. Please check the IP address to PosBox")
22+
);
2223
}
2324
var url = this.get_full_url(proxy_ip);
2425
this.connect(url);
25-
this.open_cashbox().done(function(){
26-
if (self.$el.hasClass('o_wow')) {
27-
self.show_wow();
28-
}
29-
}).fail(function(){
30-
return self.show_warning_message(_t("Connection Refused. Please check the connection to CashBox"));
31-
});
26+
this.open_cashbox()
27+
.done(function() {
28+
if (self.$el.hasClass("o_wow")) {
29+
self.show_wow();
30+
}
31+
})
32+
.fail(function() {
33+
return self.show_warning_message(
34+
_t(
35+
"Connection Refused. Please check the connection to CashBox"
36+
)
37+
);
38+
});
3239
} else {
3340
this._super.apply(this, arguments);
3441
}
3542
},
3643
show_warning_message: function(message) {
37-
new CrashManager().show_warning({data: {
38-
exception_type: _t("Incorrect Operation"),
39-
message: message
40-
}});
44+
new CrashManager().show_warning({
45+
data: {
46+
exception_type: _t("Incorrect Operation"),
47+
message: message,
48+
},
49+
});
4150
},
4251
get_full_url: function(current_url) {
43-
var port = ':8069';
52+
var port = ":8069";
4453
var url = current_url;
45-
if(url.indexOf('//') < 0){
46-
url = 'http://' + url;
54+
if (url.indexOf("//") < 0) {
55+
url = "http://" + url;
4756
}
48-
if(url.indexOf(':',5) < 0){
57+
if (url.indexOf(":", 5) < 0) {
4958
url += port;
5059
}
5160
return url;
5261
},
5362
connect: function(url) {
54-
this.connection = new Session(void 0, url, { use_cors: true});
63+
this.connection = new Session(void 0, url, {use_cors: true});
5564
},
56-
open_cashbox: function(){
65+
open_cashbox: function() {
5766
var self = this;
5867
function send_opening_job(retries, done) {
5968
done = done || new $.Deferred();
60-
self.connection.rpc('/hw_proxy/open_cashbox').done(function(){
61-
done.resolve();
62-
}).fail(function(){
63-
if(retries > 0){
64-
send_opening_job(retries-1,done);
65-
}else{
66-
done.reject();
67-
}
68-
});
69+
self.connection
70+
.rpc("/hw_proxy/open_cashbox")
71+
.done(function() {
72+
done.resolve();
73+
})
74+
.fail(function() {
75+
if (retries > 0) {
76+
send_opening_job(retries - 1, done);
77+
} else {
78+
done.reject();
79+
}
80+
});
6981
return done;
7082
}
7183
return send_opening_job(3);
Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8" ?>
22
<!-- Copyright 2018 Dinar Gabbasov <https://it-projects.info/team/GabbasovDinar>
33
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). -->
44
<odoo>
5-
<template id="assets_backend" name="cash_box assets" inherit_id="web.assets_backend">
5+
<template
6+
id="assets_backend"
7+
name="cash_box assets"
8+
inherit_id="web.assets_backend"
9+
>
610
<xpath expr="." position="inside">
7-
<script type="text/javascript" src="/pos_cashbox/static/src/js/cashbox.js"></script>
11+
<script
12+
type="text/javascript"
13+
src="/pos_cashbox/static/src/js/cashbox.js"
14+
/>
815
</xpath>
916
</template>
1017
</odoo>

pos_cashbox/views/pos_cashbox_view.xml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,26 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8" ?>
22
<!-- Copyright 2018 Dinar Gabbasov <https://it-projects.info/team/GabbasovDinar>
33
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). -->
44
<odoo>
55
<record id="view_pos_session_form" model="ir.ui.view">
66
<field name="name">pos.session.form.view</field>
77
<field name="model">pos.session</field>
8-
<field name="inherit_id" ref="point_of_sale.view_pos_session_form"/>
8+
<field name="inherit_id" ref="point_of_sale.view_pos_session_form" />
99
<field name="arch" type="xml">
10-
<xpath expr="//form/header/button[@name='action_pos_session_open']" position="before">
11-
<field name="iface_cashdrawer" invisible="1"/>
12-
<field name="proxy_ip" invisible="1"/>
13-
<button name="open_backend_cashbox" type="object" string="Open CashBox"
14-
attrs="{'invisible':['|','|', ('iface_cashdrawer', '=', False), ('cash_control', '=', False), ('state', 'not in', ['opening_control', 'closing_control'])]}"
15-
class="oe_highlight o_wow" special="open_backend_cashbox">
10+
<xpath
11+
expr="//form/header/button[@name='action_pos_session_open']"
12+
position="before"
13+
>
14+
<field name="iface_cashdrawer" invisible="1" />
15+
<field name="proxy_ip" invisible="1" />
16+
<button
17+
name="open_backend_cashbox"
18+
type="object"
19+
string="Open CashBox"
20+
attrs="{'invisible':['|','|', ('iface_cashdrawer', '=', False), ('cash_control', '=', False), ('state', 'not in', ['opening_control', 'closing_control'])]}"
21+
class="oe_highlight o_wow"
22+
special="open_backend_cashbox"
23+
>
1624
<i class='fa fa-archive' />
1725
</button>
1826
</xpath>
Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
1-
21
.popup.popup-selection.cashier {
3-
height: 90%;
4-
width: 90%;
5-
overflow-y: hidden;
6-
max-height: 100%;
7-
8-
2+
height: 90%;
3+
width: 90%;
4+
overflow-y: hidden;
5+
max-height: 100%;
96
}
107

118
.pos .popup.popup-selection .selection .cashier {
12-
max-height: 100%;
9+
max-height: 100%;
1310
}
1411

1512
.selection.scrollable-y.touch-scrollable.cashier {
16-
max-height: 100%;
13+
max-height: 100%;
1714
}
1815

1916
.selection.cashier {
20-
padding-bottom: 125px;
21-
max-height: 100%;
17+
padding-bottom: 125px;
18+
max-height: 100%;
2219
}
2320

2421
.footer.cashier {
25-
background-color: #F0EEEE;
22+
background-color: #f0eeee;
2623
}

0 commit comments

Comments
 (0)