Skip to content

Commit

Permalink
🌈 pre-commit auto cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
trojikman committed Jun 8, 2020
1 parent 6a03635 commit c51c103
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
2 changes: 1 addition & 1 deletion pos_longpolling/static/src/js/PosConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ odoo.define("pos_longpolling.PosConnection", function(require) {
try {
channel = JSON.parse(channel);
} catch (err) {
// nothing to report, channel name as is
// Nothing to report, channel name as is
}
}
if (Array.isArray(channel) && channel[1] in self.channel_callbacks) {
Expand Down
22 changes: 16 additions & 6 deletions pos_orderline_absolute_discount/models/pos_order_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,23 @@ def get_sale_details(self, date_start=False, date_stop=False, configs=False):
)
# end redefined part of original get_sale_details

for tax in line_taxes['taxes']:
taxes.setdefault(tax['id'], {'name': tax['name'], 'tax_amount': 0.0, 'base_amount': 0.0})
taxes[tax['id']]['tax_amount'] += tax['amount']
taxes[tax['id']]['base_amount'] += tax['base']
for tax in line_taxes["taxes"]:
taxes.setdefault(
tax["id"],
{
"name": tax["name"],
"tax_amount": 0.0,
"base_amount": 0.0,
},
)
taxes[tax["id"]]["tax_amount"] += tax["amount"]
taxes[tax["id"]]["base_amount"] += tax["base"]
else:
taxes.setdefault(0, {'name': _('No Taxes'), 'tax_amount': 0.0, 'base_amount': 0.0})
taxes[0]['base_amount'] += line.price_subtotal_incl
taxes.setdefault(
0,
{"name": _("No Taxes"), "tax_amount": 0.0, "base_amount": 0.0},
)
taxes[0]["base_amount"] += line.price_subtotal_incl

st_line_ids = (
self.env["account.bank.statement.line"]
Expand Down

0 comments on commit c51c103

Please sign in to comment.