Skip to Content
Menu
This question has been flagged
1678 Views

I want to price room through 23h59m, the room rate will + = room rate, when customers use more services, the total = room rate + service charge. How to click the customer will have a 'payment' button, click payment will return the total. I can not handle this, expect help from the community

class booking_room(models.Model):
_name = 'room'

name = fields.Char(string="Mã phòng", required=True)
status = fields.Selection([('1', 'Trống'), ('2', 'Bận')], string="Trạng thái",
required=True, compute="_get_status"
)
kind = fields.Selection([('3', 'A'), ('4', 'B'), ('5', 'C'), ('6', 'Vip')],
string="Loại phòng", required=True
)
price = fields.Integer(string="Giá phòng", required=True)
description = fields.Html("Ghi chú")
guestsd = fields.Many2one('guest')
class guest_room(models.Model):
_name = 'guest'

name = fields.Char(string="Họ tên", required=True)
cmnd = fields.Char(string="Số CMND", required=True)
sdt = fields.Char(string="SĐT", required=True)
time_in = fields.Datetime(string="Ngày đến")
time_out = fields.Datetime(string="Ngày trả")
description = fields.Html("Ghi chú", size=1000)
# servicesd = fields.Many2one('service', string="Dịch vụ sử dụng")
servicesd_ids = fields.One2many('room.line', 'line', 'Dịch vụ')
roomsd = fields.Many2one('room', string="Phòng mượn")


class RoomLine(models.Model):
_name = 'room.line'
line = fields.Many2one('guest')
name = fields.Many2one('service', 'Dịch vụ')

class Service(models.Model):
_name = 'service'

name = fields.Char(string="Tên dịch vụ", required=True)
code_service = fields.Char(string="Mã dịch vụ", required=True)
price_service = fields.Integer(string="Giá dịch vụ", required=True)
Avatar
Discard

form view, list view ... ?????

I mean . While selecting a customer for payment, @api will calculate the total amount of guest service + room rate. And the price is 23h59m, then doubled up.

Vào 23:03, Th 5, 27 thg 9, 2018 DHA Medic <dha.medicvn@gmail.com> đã viết:

form view, list view ... ?????

Sent by Odoo S.A. using Odoo.

Related Posts Replies Views Activity
2
Jul 24
942
1
Jun 24
3564
1
Oct 23
8590
1
Oct 23
97
1
Aug 23
2192