Created
January 23, 2018 14:50
-
-
Save winzard/0f1792ab7b17b8d07ac1935581f7a463 to your computer and use it in GitHub Desktop.
Revisions
-
winzard created this gist
Jan 23, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ def change_line_product(line_id, product_id): pass if changed: self.calculate_total() def change_line_quantity(line_id, qty): pass if changed: self.calculate_total() def change_line_price(line_id, price): pass if changed: self.calculate_total() # vs def change_line(line_id, product_id, qty, price): self.change_product(line_id, product_id) self.change_quanity(line_id, qty) self.change_line_price(line_id, price)