[IMP] creation of invoice and its payment now with in account.move with good type
bzr revid: mra@mra-laptop-20100618073450-9nu8eh0o9zlxxygl
This commit is contained in:
parent
d73e5f7757
commit
35a8398686
|
@ -772,17 +772,16 @@ class account_invoice(osv.osv):
|
||||||
|
|
||||||
# one move line per tax line
|
# one move line per tax line
|
||||||
iml += ait_obj.move_line_get(cr, uid, inv.id)
|
iml += ait_obj.move_line_get(cr, uid, inv.id)
|
||||||
|
|
||||||
entry_type=''
|
|
||||||
if inv.type in ('in_invoice', 'in_refund'):
|
if inv.type in ('in_invoice', 'in_refund'):
|
||||||
ref = inv.reference
|
ref = inv.reference
|
||||||
entry_type = 'journal_pur_voucher'
|
entry_type = 'journal_pur_voucher'
|
||||||
if inv.type in ('in_refund'):
|
if inv.type == 'in_refund':
|
||||||
entry_type = 'cont_voucher'
|
entry_type = 'cont_voucher'
|
||||||
else:
|
else:
|
||||||
ref = self._convert_ref(cr, uid, inv.number)
|
ref = self._convert_ref(cr, uid, inv.number)
|
||||||
entry_type = 'journal_sale_vou'
|
entry_type = 'journal_sale_vou'
|
||||||
if inv.type in ('out_refund'):
|
if inv.type == 'out_refund':
|
||||||
entry_type = 'cont_voucher'
|
entry_type = 'cont_voucher'
|
||||||
|
|
||||||
diff_currency_p = inv.currency_id.id <> company_currency
|
diff_currency_p = inv.currency_id.id <> company_currency
|
||||||
|
@ -1077,18 +1076,18 @@ class account_invoice(osv.osv):
|
||||||
else:
|
else:
|
||||||
amount_currency = False
|
amount_currency = False
|
||||||
currency_id = False
|
currency_id = False
|
||||||
entry_type=''
|
|
||||||
if invoice.type in ('in_invoice', 'in_refund'):
|
if invoice.type in ('in_invoice', 'in_refund'):
|
||||||
ref = invoice.reference
|
ref = invoice.reference
|
||||||
entry_type = 'journal_pur_voucher'
|
entry_type = 'journal_pur_voucher'
|
||||||
if invoice.type in ('in_refund'):
|
if invoice.type == 'in_refund':
|
||||||
entry_type = 'cont_voucher'
|
entry_type = 'cont_voucher'
|
||||||
else:
|
else:
|
||||||
ref = self._convert_ref(cr, uid, invoice.number)
|
ref = self._convert_ref(cr, uid, invoice.number)
|
||||||
entry_type = 'journal_sale_vou'
|
entry_type = 'journal_sale_vou'
|
||||||
if invoice.type in ('out_refund'):
|
if invoice.type == 'out_refund':
|
||||||
entry_type = 'cont_voucher'
|
entry_type = 'cont_voucher'
|
||||||
|
|
||||||
# Pay attention to the sign for both debit/credit AND amount_currency
|
# Pay attention to the sign for both debit/credit AND amount_currency
|
||||||
l1 = {
|
l1 = {
|
||||||
'debit': direction * pay_amount>0 and direction * pay_amount,
|
'debit': direction * pay_amount>0 and direction * pay_amount,
|
||||||
|
|
Loading…
Reference in New Issue