Fix
This commit is contained in:
parent
4bde3e1c5a
commit
ab226ddca7
18
booking.py
18
booking.py
|
@ -567,19 +567,19 @@ class Booking(Workflow, ModelSQL, ModelView):
|
|||
|
||||
for charge in charges:
|
||||
bk = charge.folio.booking
|
||||
invoice_party_id = fo.booking.party.id
|
||||
invoice_party = fo.booking.party
|
||||
if charge.invoice_to:
|
||||
invoice_party_id = charge.invoice_to.id
|
||||
invoice_party = charge.invoice_to
|
||||
|
||||
unit_price = bk.currency.round(charge.unit_price)
|
||||
if invoice_party_id not in res.keys():
|
||||
res[invoice_party_id] = {
|
||||
'party': invoice_party_id,
|
||||
'currency': bk.currency.id,
|
||||
'payment_term': None,
|
||||
'number': bk.number,
|
||||
'reference': charge.folio.registration_card,
|
||||
'lines': [],
|
||||
res[invoice_party.id] = {
|
||||
'party': invoice_party,
|
||||
'currency': bk.currency.id,
|
||||
'payment_term': None,
|
||||
'number': bk.number,
|
||||
'reference': charge.folio.registration_card,
|
||||
'lines': [],
|
||||
}
|
||||
|
||||
res[invoice_party_id]['lines'].append({
|
||||
|
|
Loading…
Reference in New Issue