|
|
@ -99,7 +99,15 @@ class EventRegistration(models.Model): |
|
|
|
payment_status=fields.Selection(string='payment status',selection=[('paid','Paid'),('not paid','Not paid'),('down payment not paid','down payment not paid'),('down payment paid','down payment paid')],compute='_compute_payment_status',translate=True) |
|
|
|
to_be_paid_amount=fields.Monetary('to be paid amount',compute='_compute_to_be_paid_amount',currency_field='currency_id') |
|
|
|
payment_adjustement=fields.Monetary('payment adjustement',currency_field='currency_id') |
|
|
|
|
|
|
|
individual_room=fields.Boolean('Individual room',compute='compute_individual_room') |
|
|
|
|
|
|
|
def compute_individual_room(self): |
|
|
|
for rec in self: |
|
|
|
prd=self.env['product.product'].search([('individual_room','=',True)]) |
|
|
|
rec.individual_room=False |
|
|
|
for opt in rec.option_ids: |
|
|
|
if prd.id==opt.booking_option_id.id : rec.individual_room=True |
|
|
|
|
|
|
|
def _compute_to_be_paid_amount(self): |
|
|
|
for rec in self: |
|
|
|
rec.to_be_paid_amount=0 |
|
|
|