Esempio n. 1
0
    def test_is_product_being_produced(self):
        order = self.create_production_order()
        production_item = self.create_production_item(order=order)
        product = production_item.product
        self.assertFalse(ProductionOrderProducingView.is_product_being_produced(product))

        order.start_production()
        self.assertTrue(ProductionOrderProducingView.is_product_being_produced(product))
Esempio n. 2
0
    def test_is_product_being_produced(self):
        order = self.create_production_order()
        production_item = self.create_production_item(order=order)
        product = production_item.product
        self.assertFalse(
            ProductionOrderProducingView.is_product_being_produced(product))

        order.start_production(self.current_user)
        self.assertTrue(
            ProductionOrderProducingView.is_product_being_produced(product))
Esempio n. 3
0
 def is_being_produced(self):
     from stoqlib.domain.production import ProductionOrderProducingView
     return ProductionOrderProducingView.is_product_being_produced(self)
Esempio n. 4
0
 def _validate_components(self):
     return not ProductionOrderProducingView.is_product_being_produced(
         self.model.product)
Esempio n. 5
0
 def _validate_components(self):
     return not ProductionOrderProducingView.is_product_being_produced(
         self.model.product)
Esempio n. 6
0
 def is_being_produced(self):
     from stoqlib.domain.production import ProductionOrderProducingView
     return ProductionOrderProducingView.is_product_being_produced(self)