FoodcoopBCN/foodcoopbcn#167 add pos_product_available_link
This commit is contained in:
parent
dab4123379
commit
bf02699b61
6 changed files with 111 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
from odoo.tests.common import TransactionCase
|
||||
|
||||
|
||||
class TestProductAvailableLink(TransactionCase):
|
||||
def setUp(self):
|
||||
super().setUp()
|
||||
self.product = self.env["product.product"].create(
|
||||
{
|
||||
"name": "Test Product",
|
||||
"sale_ok": True,
|
||||
"available_in_pos": True,
|
||||
}
|
||||
)
|
||||
|
||||
def test_uncheck_sale_ok_disables_available_in_pos(self):
|
||||
self.product.sale_ok = False
|
||||
self.assertFalse(self.product.available_in_pos)
|
||||
|
||||
def test_write_sale_ok_false_disables_available_in_pos(self):
|
||||
self.product.write({"sale_ok": False})
|
||||
self.assertFalse(self.product.available_in_pos)
|
||||
Loading…
Add table
Add a link
Reference in a new issue