Created
January 23, 2018 14:50
-
-
Save winzard/0f1792ab7b17b8d07ac1935581f7a463 to your computer and use it in GitHub Desktop.
command change line
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 characters
| 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) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment