Update es
This commit is contained in:
parent
394074c52d
commit
42850d3cd6
27
booking.py
27
booking.py
|
@ -425,7 +425,6 @@ class Booking(Workflow, ModelSQL, ModelView):
|
||||||
@ModelView.button
|
@ModelView.button
|
||||||
@Workflow.transition('confirmed')
|
@Workflow.transition('confirmed')
|
||||||
def confirm(cls, records):
|
def confirm(cls, records):
|
||||||
cls.set_number(records)
|
|
||||||
for rec in records:
|
for rec in records:
|
||||||
# FIXME check if does not exist previous occupancy if exist update state
|
# FIXME check if does not exist previous occupancy if exist update state
|
||||||
rec.update_folio('pending')
|
rec.update_folio('pending')
|
||||||
|
@ -594,7 +593,7 @@ class Booking(Workflow, ModelSQL, ModelView):
|
||||||
'currency': bk.currency.id,
|
'currency': bk.currency.id,
|
||||||
'payment_term': bk.payment_term,
|
'payment_term': bk.payment_term,
|
||||||
'number': bk.number,
|
'number': bk.number,
|
||||||
'guests_qty': len(fo.guests) + 1,
|
'guests_qty': len(fo.guests),
|
||||||
'reference': reference,
|
'reference': reference,
|
||||||
'agent': agent_id,
|
'agent': agent_id,
|
||||||
'rooms': fo.room.name,
|
'rooms': fo.room.name,
|
||||||
|
@ -609,6 +608,7 @@ class Booking(Workflow, ModelSQL, ModelView):
|
||||||
'quantity': fo.nights_quantity,
|
'quantity': fo.nights_quantity,
|
||||||
'product': fo.product,
|
'product': fo.product,
|
||||||
'unit_price': fo.unit_price,
|
'unit_price': fo.unit_price,
|
||||||
|
'taxes': fo.taxes,
|
||||||
'origin': str(bk),
|
'origin': str(bk),
|
||||||
'taxes_exception': bk.taxes_exception,
|
'taxes_exception': bk.taxes_exception,
|
||||||
}]
|
}]
|
||||||
|
@ -621,20 +621,19 @@ class Booking(Workflow, ModelSQL, ModelView):
|
||||||
'quantity': fo.nights_quantity,
|
'quantity': fo.nights_quantity,
|
||||||
'product': fo.product,
|
'product': fo.product,
|
||||||
'unit_price': fo.unit_price,
|
'unit_price': fo.unit_price,
|
||||||
|
'taxes': fo.taxes,
|
||||||
'origin': str(bk),
|
'origin': str(bk),
|
||||||
'taxes_exception': bk.taxes_exception,
|
'taxes_exception': bk.taxes_exception,
|
||||||
})
|
})
|
||||||
|
|
||||||
for charge in charges:
|
for charge in charges:
|
||||||
bk = charge.folio.booking
|
bk = charge.folio.booking
|
||||||
invoice_party = fo.booking.party
|
invoice_party = charge.invoice_to or bk.party
|
||||||
if charge.invoice_to:
|
|
||||||
invoice_party = charge.invoice_to
|
|
||||||
|
|
||||||
invoice_party_id = invoice_party.id
|
invoice_party_id = invoice_party.id
|
||||||
unit_price = bk.currency.round(charge.unit_price)
|
unit_price = bk.currency.round(charge.unit_price)
|
||||||
if invoice_party_id not in res.keys():
|
if invoice_party_id not in res.keys():
|
||||||
res[invoice_party.id] = {
|
res[invoice_party_id] = {
|
||||||
'party': invoice_party,
|
'party': invoice_party,
|
||||||
'currency': bk.currency.id,
|
'currency': bk.currency.id,
|
||||||
'payment_term': bk.payment_term,
|
'payment_term': bk.payment_term,
|
||||||
|
@ -654,6 +653,7 @@ class Booking(Workflow, ModelSQL, ModelView):
|
||||||
'unit_price': unit_price,
|
'unit_price': unit_price,
|
||||||
'charge': charge,
|
'charge': charge,
|
||||||
'origin': str(bk),
|
'origin': str(bk),
|
||||||
|
'taxes': charge.folio.taxes,
|
||||||
'taxes_exception': bk.taxes_exception,
|
'taxes_exception': bk.taxes_exception,
|
||||||
})
|
})
|
||||||
return res
|
return res
|
||||||
|
@ -672,12 +672,13 @@ class Booking(Workflow, ModelSQL, ModelView):
|
||||||
'product': product.id,
|
'product': product.id,
|
||||||
'party': invoice.party.id,
|
'party': invoice.party.id,
|
||||||
'description': line['description'],
|
'description': line['description'],
|
||||||
|
'taxes': line['taxes'],
|
||||||
'origin': line['origin'],
|
'origin': line['origin'],
|
||||||
}
|
}
|
||||||
if not line['taxes_exception']:
|
# if not line['taxes_exception']:
|
||||||
taxes_ids = cls.get_taxes(line['product'], invoice.party, invoice.currency)
|
# taxes_ids = cls.get_taxes(line['product'], invoice.party, invoice.currency)
|
||||||
if taxes_ids:
|
# if taxes_ids:
|
||||||
new_line.update({'taxes': [('add', taxes_ids)]})
|
# new_line.update({'taxes': [('add', taxes_ids)]})
|
||||||
return new_line
|
return new_line
|
||||||
|
|
||||||
def do_moves(self):
|
def do_moves(self):
|
||||||
|
@ -870,6 +871,7 @@ class Booking(Workflow, ModelSQL, ModelView):
|
||||||
'quantity': rec['guests_qty'],
|
'quantity': rec['guests_qty'],
|
||||||
'unit_price': product.template.list_price,
|
'unit_price': product.template.list_price,
|
||||||
'product': product.id,
|
'product': product.id,
|
||||||
|
'taxes': rec['taxes'],
|
||||||
'description': product.rec_name,
|
'description': product.rec_name,
|
||||||
'origin': str(self),
|
'origin': str(self),
|
||||||
}
|
}
|
||||||
|
@ -911,8 +913,9 @@ class Booking(Workflow, ModelSQL, ModelView):
|
||||||
company_id = Transaction().context.get('company')
|
company_id = Transaction().context.get('company')
|
||||||
party = data['party']
|
party = data['party']
|
||||||
# party is instance or id fixme
|
# party is instance or id fixme
|
||||||
if type(party) == int:
|
# if type(party) == int:
|
||||||
party = Party(party)
|
# party = Party(party)
|
||||||
|
|
||||||
ota_code = data.get('ota_booking_code', '')
|
ota_code = data.get('ota_booking_code', '')
|
||||||
if data.get('description'):
|
if data.get('description'):
|
||||||
description = data['description']
|
description = data['description']
|
||||||
|
|
724
locale/es.po
724
locale/es.po
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue