Skip to content

Commit

Permalink
🚑 Refactor js code
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya ilchenko committed May 6, 2021
1 parent 581f1bb commit 2bfb09e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 2 additions & 1 deletion pos_invoice_pay/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# Copyright 2018 Artyom Losev
# Copyright 2018 Dinar Gabbasov <https://it-projects.info/team/GabbasovDinar>
# Copyright 2021 Ilya Ilchenko <https://github.com/mentalko>
# License MIT (https://opensource.org/licenses/MIT).
{
"name": """POS: Pay SO & Invoices""",
"summary": """Handle the payment process for Sale Orders/Invoices over Point of Sale""",
"category": "Point of Sale",
"images": ["images/pos_invoice_pay_main.png"],
"version": "13.0.1.2.5",
"version": "13.0.1.2.6",
"application": False,
"author": "IT-Projects LLC, Artyom Losev",
"support": "[email protected]",
Expand Down
5 changes: 5 additions & 0 deletions pos_invoice_pay/doc/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
`1.2.6`
-------

**Fix:** Refactor js code

`1.2.5`
-------

Expand Down
6 changes: 2 additions & 4 deletions pos_invoice_pay/static/src/js/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright 2018 Artyom Losev
// Copyright 2018 Dinar Gabbasov <https://it-projects.info/team/GabbasovDinar>
// Copyright 2018 Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>
// Copyright 2021 Ilya Ilchenko <https://github.com/mentalko>
// License MIT (https://opensource.org/licenses/MIT).
/* eslint no-useless-escape: "off"*/
odoo.define("pos_invoices", function(require) {
Expand Down Expand Up @@ -223,9 +224,6 @@ odoo.define("pos_invoices", function(require) {
}
}
}
var stateAttr = item.invoice_payment_state;
item.invoice_payment_state =
stateAttr.charAt(0).toUpperCase() + stateAttr.slice(1);
});
},

Expand Down Expand Up @@ -317,7 +315,7 @@ odoo.define("pos_invoices", function(require) {
}
invoices = _.filter(invoices, function(inv) {
return (
inv.state === "posted" && inv.invoice_payment_state === "Not_paid"
inv.state === "posted" && inv.invoice_payment_state === "not_paid"
);
});
return invoices;
Expand Down

0 comments on commit 2bfb09e

Please sign in to comment.