[MERGE] forward port of branch 7.0 up to revid 10012 launchpad_translations_on_behalf...
authorChristophe Simonis <chs@openerp.com>
Thu, 24 Apr 2014 12:35:38 +0000 (14:35 +0200)
committerChristophe Simonis <chs@openerp.com>
Thu, 24 Apr 2014 12:35:38 +0000 (14:35 +0200)
bzr revid: chs@openerp.com-20140424123538-rxk9got9k2on1ki1

1  2 
addons/account_voucher/account_voucher.py
addons/account_voucher/test/sales_payment.yml
addons/hr_timesheet_sheet/hr_timesheet_sheet.py
addons/procurement/procurement.py
addons/stock/stock.py

    I will create and post an account voucher of amount 450.0 for the partner Seagate.
  -
    !python {model: account.voucher}: |
 -    import netsvc
      vals = {}
      journal_id = self.default_get(cr, uid, ['journal_id']).get('journal_id',None)
+     voucher = self.recompute_voucher_lines(cr, uid, [], ref("base.res_partner_19"), journal_id, 450.0, ref('base.EUR'), 'receipt', False)
+     assert (voucher['value'].get('writeoff_amount') == 0.0), "Writeoff amount calculated by recompute_voucher_lines() is not 0.0"
      res = self.onchange_partner_id(cr, uid, [], ref("base.res_partner_19"), journal_id, 0.0, 1, ttype='receipt', date=False)
      vals = {
          'account_id': ref('account.cash'),
      vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']]
      id = self.create(cr, uid, vals)
      voucher_id = self.browse(cr, uid, id)
+     assert (voucher_id.writeoff_amount == 0.0), "Writeoff amount is not 0.0"
      assert (voucher_id.state=='draft'), "Voucher is not in draft state"
 -    wf_service = netsvc.LocalService("workflow")
 -    wf_service.trg_validate(uid, 'account.voucher', voucher_id.id, 'proforma_voucher', cr)
 +    self.signal_proforma_voucher(cr, uid, [voucher_id.id])
  
  -
    Finally i will Confirm the state of the invoice is paid
Simple merge
Simple merge