Skip to content

Commit

Permalink
[MERGE] forward port branch saas-11 up to 637ba94
Browse files Browse the repository at this point in the history
  • Loading branch information
KangOl committed Jun 22, 2017
2 parents 6a0e07b + 637ba94 commit c6938b8
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions addons/point_of_sale/tests/test_point_of_sale_flow.py
Expand Up @@ -138,22 +138,23 @@ def test_order_to_picking(self):
'price_unit': 450,
'discount': 0.0,
'qty': 2.0,
'tax_ids': [(6, 0, self.product3.taxes_id.ids)],
}), (0, 0, {
'name': "OL/0002",
'product_id': self.product4.id,
'price_unit': 300,
'discount': 0.0,
'qty': 3.0,
'tax_ids': [(6, 0, self.product4.taxes_id.ids)],
})]
})

# I click on the "Make Payment" wizard to pay the PoS order with the total amount (2*450 + 3*300 = 1800)
context_make_payment = {
"active_ids": [self.pos_order_pos1.id],
"active_id": self.pos_order_pos1.id
}
self.pos_make_payment_2 = self.PosMakePayment.with_context(context_make_payment).create({
'amount': 1800
'amount': 1845
})

# I click on the validate button to register the payment.
Expand Down Expand Up @@ -200,22 +201,23 @@ def test_order_to_picking(self):
'price_unit': 450,
'discount': 0.0,
'qty': (-2.0),
'tax_ids': [(6, 0, self.product3.taxes_id.ids)],
}), (0, 0, {
'name': "OL/0004",
'product_id': self.product4.id,
'price_unit': 300,
'discount': 0.0,
'qty': (-3.0),
'tax_ids': [(6, 0, self.product4.taxes_id.ids)],
})]
})

# I click on the "Make Payment" wizard to pay the PoS order with the total amount (-2*450 + -3*300 = -1800)
context_make_payment = {
"active_ids": [self.pos_order_pos2.id],
"active_id": self.pos_order_pos2.id
}
self.pos_make_payment_3 = self.PosMakePayment.with_context(context_make_payment).create({
'amount': (-1800)
'amount': (-1845)
})

# I click on the validate button to register the payment.
Expand Down Expand Up @@ -262,22 +264,23 @@ def test_order_to_picking(self):
'price_unit': 450,
'discount': 0.0,
'qty': (-2.0),
'tax_ids': [(6, 0, self.product3.taxes_id.ids)],
}), (0, 0, {
'name': "OL/0006",
'product_id': self.product4.id,
'price_unit': 300,
'discount': 0.0,
'qty': 3.0,
'tax_ids': [(6, 0, self.product4.taxes_id.ids)],
})]
})

# I click on the "Make Payment" wizard to pay the PoS order with the total amount (-2*450 + 3*300 = 0)
context_make_payment = {
"active_ids": [self.pos_order_pos3.id],
"active_id": self.pos_order_pos3.id
}
self.pos_make_payment_4 = self.PosMakePayment.with_context(context_make_payment).create({
'amount': 0
'amount': 45,
})

# I click on the validate button to register the payment.
Expand Down

0 comments on commit c6938b8

Please sign in to comment.