Guest User

Untitled

a guest
May 2nd, 2014
169
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    def test_invoice_line_quantity_change(self):
  2.  
  3.         purchase = self.create_purchase(self.product_fifo,
  4.                                         quantity=13.0,
  5.                                         unit=self.unit_ton,
  6.                                         unit_price=Decimal(1000), invoice_method='shipment')
  7.  
  8.         self.supplier_shipment_ship(purchase)
  9.  
  10.         for invoice in purchase.invoices:
  11.             invoice.invoice_date = datetime.date.today()
  12.             invoice.save()
  13.  
  14.         invoice, = purchase.invoices
  15.         invoice_line, = invoice.lines
  16.  
  17.         invoice_line.quantity = Decimal('12.')
  18.         invoice_line.save()
RAW Paste Data