Пример #1
0
 def deserialize(cls, the_dict):
     if 'name' in the_dict['prod'] and 'prod_id' in the_dict['prod']:
         prod = ProdItemGroup.deserialize(the_dict['prod'])
     else:
         price = PriceList.deserialize(the_dict['prod'])
         prod = ProdItemGroup(prod_id=price.prod_id, name=price.nombre)
     cant = Decimal(the_dict['cant'])
     return cls(prod, cant)
Пример #2
0
 def deserialize(cls, the_dict):
     if 'name' in the_dict['prod'] and 'prod_id' in the_dict['prod']:
         prod = ProdItemGroup.deserialize(the_dict['prod'])
     else:
         price = PriceList.deserialize(the_dict['prod'])
         prod = ProdItemGroup(prod_id=price.prod_id, name=price.nombre)
     cant = Decimal(the_dict['cant'])
     return cls(prod, cant)
Пример #3
0
 def deserialize(cls, the_dict):
     prod = PriceList.deserialize(the_dict['prod'])
     cant = Decimal(the_dict['cant'])
     return cls(prod, cant)
Пример #4
0
 def deserialize(cls, the_dict):
     prod = PriceList.deserialize(the_dict['prod'])
     cant = Decimal(the_dict['cant'])
     return cls(prod, cant)