[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.
I think that by default we get False value for Boolean fields
There was a problem hiding this comment.
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) |
| """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, |
|
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