-
Notifications
You must be signed in to change notification settings - Fork 2
[UPD] Updated 'on demand' feature #16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 14-Imp-prod_stock_state_on_demand
Are you sure you want to change the base?
[UPD] Updated 'on demand' feature #16
Conversation
|
Hi @kevinkhao, @sebastienbeau, @legalsylvain, |
| manual_stock_state_threshold = fields.Float(digits="Stock Threshold") | ||
|
|
||
| on_demand = fields.Boolean( | ||
| default=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that by default we get False value for Boolean fields
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True !
in the end this is useless but harmless piece of code too ^^
thx
|
|
||
| def test_06_state_on_demand_default_value(self): | ||
| """Test default value of on_demand""" | ||
| self.assertFalse(self.product_threshold_on_product.on_demand) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless test
| """Test on_demand Setting (Setting on a product unique template)""" | ||
| self.assertEqual( | ||
| self.product_threshold_on_product._stock_state_check_on_demand(), | ||
| self.product_threshold_on_product.on_demand, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useless
|
Can you please fix the tests by
|
|
No. |
f99c6b0 to
3de0531
Compare
on_demandFalseon_demandon_demand:on_demandattribute on the product isFalse.on_demand:on_demandon a specific product instance correctly inherits and reflects its value when calling_stock_state_check_on_demand().on_demandisTrue:'on_demand'regardless of the previous state,state_thersholdnot shown in view ifon_demandis True