Skip to content

Commit

Permalink
💚 pre-commit: auto cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Yelizariev committed Feb 10, 2020
1 parent bbb6636 commit 2e40ea3
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 25 deletions.
34 changes: 17 additions & 17 deletions pos_debt_notebook/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,22 +95,20 @@ def debt_history(self, limit=0):
]
debt_journals = self.env["account.journal"].search([("debt", "=", True)])
data = {
id:
{
"history": [],
"partner_id": id,
"debt": 0,
"records_count": 0,
"debts": {
dj.id:
{
"balance": 0,
"journal_id": [dj.id, dj.name],
"journal_code": dj.code,
}
for dj in debt_journals
},
}
id: {
"history": [],
"partner_id": id,
"debt": 0,
"records_count": 0,
"debts": {
dj.id: {
"balance": 0,
"journal_id": [dj.id, dj.name],
"journal_code": dj.code,
}
for dj in debt_journals
},
}
for id in self.ids
}

Expand Down Expand Up @@ -625,7 +623,9 @@ def _process_order(self, pos_order):
o_line = o_line[2]
name = self.env["product.product"].browse(o_line["product_id"]).name
product_list.append(
"{}({} * {}) + ".format(name, o_line["qty"], o_line["price_unit"])
"{}({} * {}) + ".format(
name, o_line["qty"], o_line["price_unit"]
)
)
product_list = "".join(product_list).strip(" + ")
credit_updates.append(
Expand Down
6 changes: 2 additions & 4 deletions pos_invoice_pay/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,11 @@ def _get_payment_info_JSON(self):
if move.payment_id.cashier:
if move.move_id.ref:
move.move_id.ref = "{} by {}".format(
move.move_id.ref,
move.payment_id.cashier.name,
move.move_id.ref, move.payment_id.cashier.name
)
else:
move.move_id.name = "{} by {}".format(
move.move_id.name,
move.payment_id.cashier.name,
move.move_id.name, move.payment_id.cashier.name
)
data = super(AccountInvoice, self)._get_payment_info_JSON()
return data
Expand Down
4 changes: 3 additions & 1 deletion pos_invoice_postponed/tests/test_default.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ def test_01_pos_postponed_invoice(self):
self.assertEqual(
len(order.statement_ids),
0,
"Number of statements are {} expected {}".format(len(order.statement_ids), 0),
"Number of statements are {} expected {}".format(
len(order.statement_ids), 0
),
)
self.assertEqual(
order.amount_paid,
Expand Down
2 changes: 1 addition & 1 deletion pos_multi_session/external_tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def setUpClass(cls):
admin_uid = cls.login2uid(ADMIN_LOGIN, ADMIN_PASSWORD)
models = xmlrpclib.ServerProxy("{}/xmlrpc/2/object".format(MAIN_URL))
assert admin_uid, "Authentication failed {}".format(
(DATABASE, ADMIN_LOGIN, ADMIN_PASSWORD),
(DATABASE, ADMIN_LOGIN, ADMIN_PASSWORD)
)

cls.admin_uid = admin_uid
Expand Down
1 change: 0 additions & 1 deletion pos_wechat/tests/test_micropay.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from mock import patch



_logger = logging.getLogger(__name__)
DUMMY_AUTH_CODE = "134579302432164181"
DUMMY_POS_ID = 1
Expand Down
1 change: 0 additions & 1 deletion pos_wechat/tests/test_wechat_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from mock import patch



_logger = logging.getLogger(__name__)
DUMMY_AUTH_CODE = "134579302432164181"
DUMMY_POS_ID = 1
Expand Down

0 comments on commit 2e40ea3

Please sign in to comment.