diff --git a/hotel_channel_connector/models/hotel_channel_connector_issue.py b/hotel_channel_connector/models/hotel_channel_connector_issue.py index aada31150..7ee923cd3 100644 --- a/hotel_channel_connector/models/hotel_channel_connector_issue.py +++ b/hotel_channel_connector/models/hotel_channel_connector_issue.py @@ -7,7 +7,6 @@ from openerp.exceptions import ValidationError class HotelChannelConnectorIssue(models.Model): _name = 'hotel.channel.connector.issue' - _old_name = 'wubook.issue' backend_id = fields.Many2one('channel.backend', 'Backend', @@ -23,11 +22,11 @@ class HotelChannelConnectorIssue(models.Model): ('room', 'Room'), ('avail', 'Availability')], required=True) to_read = fields.Boolean("To Read", default=True) - internal_message = fields.Char("Internal Message", old_name='message') + internal_message = fields.Char("Internal Message") date_start = fields.Date("From", readonly=True) date_end = fields.Date("To", readonly=True) - channel_object_id = fields.Char("Channel Object ID", old_name='wid', readonly=True) - channel_message = fields.Char("Channel Message", old_name='wmessage', readonly=True) + channel_object_id = fields.Char("Channel Object ID", readonly=True) + channel_message = fields.Char("Channel Message", readonly=True) @api.model def create(self, vals): @@ -37,17 +36,17 @@ class HotelChannelConnectorIssue(models.Model): title=_("Oops! %s Issue Reported!!") % issue_id.section) return issue_id - + def mark_readed(self): for record in self: record.to_read = False - + def toggle_to_read(self): for record in self: record.to_read = not record.to_read - + def mark_as_read(self): reserv_ids = [] for record in self: diff --git a/hotel_channel_connector/models/hotel_room_type_restriction_item/common.py b/hotel_channel_connector/models/hotel_room_type_restriction_item/common.py index 2329d9241..5e4e94156 100644 --- a/hotel_channel_connector/models/hotel_room_type_restriction_item/common.py +++ b/hotel_channel_connector/models/hotel_room_type_restriction_item/common.py @@ -17,8 +17,7 @@ class ChannelHotelRoomTypeRestrictionItem(models.Model): string='Hotel Virtual Room Restriction', required=True, ondelete='cascade') - channel_pushed = fields.Boolean("Channel Pushed", readonly=True, default=False, - old_name='wpushed') + channel_pushed = fields.Boolean("Channel Pushed", readonly=True, default=False) @job(default_channel='root.channel') @api.model diff --git a/hotel_channel_connector/models/inherited_hotel_folio.py b/hotel_channel_connector/models/inherited_hotel_folio.py index bdb8b724b..69628fbb7 100644 --- a/hotel_channel_connector/models/inherited_hotel_folio.py +++ b/hotel_channel_connector/models/inherited_hotel_folio.py @@ -15,10 +15,9 @@ class HotelFolio(models.Model): record.has_channel_reservations = any(channel_reservations) customer_notes = fields.Text("Channel Customer Notes", - readonly=True, old_name='wcustomer_notes') + readonly=True) has_channel_reservations = fields.Boolean(compute=_has_channel_reservations, - store=False, - old_name='whas_wubook_reservations') + store=False) unconfirmed_channel_price = fields.Boolean(default=False) @job(default_channel='root.channel') @@ -28,7 +27,7 @@ class HotelFolio(models.Model): importer = work.component(usage='channel.importer') importer.fetch_new_bookings() - + def action_confirm(self): for rec in self: rec.reservation_ids.write({ @@ -36,7 +35,7 @@ class HotelFolio(models.Model): }) return super().action_confirm() - + def get_grouped_reservations_json(self, state, import_all=False): super().get_grouped_reservations_json(state, import_all=import_all) self.ensure_one() diff --git a/hotel_channel_connector/models/product_pricelist_item/common.py b/hotel_channel_connector/models/product_pricelist_item/common.py index 8136414df..617ca6488 100644 --- a/hotel_channel_connector/models/product_pricelist_item/common.py +++ b/hotel_channel_connector/models/product_pricelist_item/common.py @@ -18,8 +18,7 @@ class ChannelProductPricelistItem(models.Model): string='Hotel Product Pricelist Item', required=True, ondelete='cascade') - channel_pushed = fields.Boolean("Channel Pushed", readonly=True, default=False, - old_name='wpushed') + channel_pushed = fields.Boolean("Channel Pushed", readonly=True, default=False) @job(default_channel='root.channel') @api.model diff --git a/pms/__manifest__.py b/pms/__manifest__.py index 177efba2f..d4e3a01c0 100644 --- a/pms/__manifest__.py +++ b/pms/__manifest__.py @@ -2,7 +2,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { - 'name': 'pms', + 'name': 'PMS (Property Management System)', 'summary': "A property management system", 'version': '13.0.1.0.0', 'development_status': 'Beta', @@ -57,7 +57,7 @@ 'views/pms_room_views.xml', 'views/pms_room_closure_reason_views.xml', 'views/inherited_account_payment_views.xml', - 'views/inherited_account_invoice_views.xml', + 'views/inherited_account_move_views.xml', 'views/inherited_res_users_views.xml', 'views/pms_room_type_class_views.xml', 'views/pms_room_type_restriction_views.xml', diff --git a/pms/data/pms_data.xml b/pms/data/pms_data.xml index 729c57b2b..99e1e9499 100644 --- a/pms/data/pms_data.xml +++ b/pms/data/pms_data.xml @@ -4,7 +4,7 @@ - + @@ -39,4 +39,4 @@ - \ No newline at end of file + diff --git a/pms/models/__init__.py b/pms/models/__init__.py index 2c19117c2..e34c5fd89 100644 --- a/pms/models/__init__.py +++ b/pms/models/__init__.py @@ -16,7 +16,7 @@ from . import pms_amenity from . import pms_amenity_type from . import pms_room_type from . import pms_service -from . import inherited_account_invoice +from . import inherited_account_move from . import inherited_product_template from . import inherited_res_company from . import inherited_account_payment @@ -33,5 +33,5 @@ from . import pms_service_line from . import pms_board_service from . import pms_board_service_room_type_line from . import pms_board_service_line -from . import inherited_account_invoice_line +from . import inherited_account_move_line from . import pms_cancelation_rule diff --git a/pms/models/inherited_account_invoice.py b/pms/models/inherited_account_move.py similarity index 95% rename from pms/models/inherited_account_invoice.py rename to pms/models/inherited_account_move.py index f6d06ec66..97379c6bd 100644 --- a/pms/models/inherited_account_invoice.py +++ b/pms/models/inherited_account_move.py @@ -23,20 +23,20 @@ class AccountMove(models.Model): compute='_get_outstanding_folios_JSON') # Compute and Search methods - + def _computed_folio_origin(self): for inv in self: - folios = inv.mapped('move_line_ids.reservation_ids.folio_id') - folios |= inv.mapped('move_line_ids.service_ids.folio_id') + folios = inv.mapped('invoice_line_ids.reservation_ids.folio_id') + folios |= inv.mapped('invoice_line_ids.service_ids.folio_id') if folios: inv.from_folio = True inv.folio_ids = [(6, 0, folios.ids)] # Action methods - + def action_folio_payments(self): self.ensure_one() - sales = self.mapped('move_line_ids.sale_line_ids.order_id') + sales = self.mapped('invoice_line_ids.sale_line_ids.order_id') folios = self.env['pms.folio'].search([ ('order_id.id', 'in', sales.ids) ]) diff --git a/pms/models/inherited_account_invoice_line.py b/pms/models/inherited_account_move_line.py similarity index 100% rename from pms/models/inherited_account_invoice_line.py rename to pms/models/inherited_account_move_line.py diff --git a/pms/models/pms_folio.py b/pms/models/pms_folio.py index 6153ba647..69b3cefb5 100644 --- a/pms/models/pms_folio.py +++ b/pms/models/pms_folio.py @@ -64,8 +64,7 @@ class PmsFolio(models.Model): company_id = fields.Many2one( 'res.company', 'Company', - default=lambda self: self.env['res.company']._company_default_get( - 'pms.folio')) + default=lambda self: self.env.company) analytic_account_id = fields.Many2one( 'account.analytic.account', 'Analytic Account', @@ -133,7 +132,6 @@ class PmsFolio(models.Model): related="partner_invoice_id.country_id") fiscal_position_id = fields.Many2one( 'account.fiscal.position', - oldname='fiscal_position', string='Fiscal Position') closure_reason_id = fields.Many2one( 'room.closure.reason') @@ -143,7 +141,7 @@ class PmsFolio(models.Model): ondelete='restrict') team_id = fields.Many2one( 'crm.team', - string='Sales Channel', + string='Sales Team', ondelete='restrict', change_default=True, default=_get_default_team) @@ -235,9 +233,9 @@ class PmsFolio(models.Model): readonly=True, default='no') partner_invoice_vat = fields.Char(related="partner_invoice_id.vat") - partner_invoice_name = fields.Char(related="partner_invoice_id.name") - partner_invoice_street = fields.Char(related="partner_invoice_id.street") - partner_invoice_street2 = fields.Char(related="partner_invoice_id.street") + partner_invoice_name = fields.Char(related="partner_invoice_id.name", string="Partner Name") + partner_invoice_street = fields.Char(related="partner_invoice_id.street", string="Street") + partner_invoice_street2 = fields.Char(related="partner_invoice_id.street", string="Street2") partner_invoice_zip = fields.Char(related="partner_invoice_id.zip") partner_invoice_city = fields.Char(related="partner_invoice_id.city") partner_invoice_email = fields.Char(related="partner_invoice_id.email") diff --git a/pms/models/pms_reservation.py b/pms/models/pms_reservation.py index 25dc6f776..14a8c5f3f 100644 --- a/pms/models/pms_reservation.py +++ b/pms/models/pms_reservation.py @@ -191,7 +191,7 @@ class PmsReservation(models.Model): ('booking', 'On Board'), ('done', 'Out'), ('cancelled', 'Cancelled')], - string='State', + string='Status', readonly=True, default=lambda *a: 'draft', copy=False, @@ -223,8 +223,8 @@ class PmsReservation(models.Model): help="Default Departure Hour (HH:MM)") partner_invoice_vat = fields.Char(related="partner_invoice_id.vat") partner_invoice_name = fields.Char(related="partner_invoice_id.name") - partner_invoice_street = fields.Char(related="partner_invoice_id.street") - partner_invoice_street2 = fields.Char(related="partner_invoice_id.street") + partner_invoice_street = fields.Char(related="partner_invoice_id.street", string="Street") + partner_invoice_street2 = fields.Char(related="partner_invoice_id.street", string="Street2") partner_invoice_zip = fields.Char(related="partner_invoice_id.zip") partner_invoice_city = fields.Char(related="partner_invoice_id.city") partner_invoice_email = fields.Char(related="partner_invoice_id.email") @@ -320,7 +320,7 @@ class PmsReservation(models.Model): digits=('Product Price'), compute='_compute_amount_reservation') price_tax = fields.Float( - string='Taxes', + string='Taxes Amount', readonly=True, store=True, compute='_compute_amount_reservation') diff --git a/pms/models/pms_service.py b/pms/models/pms_service.py index 6cdd56aba..50b3a3499 100644 --- a/pms/models/pms_service.py +++ b/pms/models/pms_service.py @@ -149,7 +149,7 @@ class PmsService(models.Model): store=True, compute='_compute_amount_service') price_tax = fields.Float( - string='Taxes', + string='Taxes Amount', readonly=True, store=True, compute='_compute_amount_service') diff --git a/pms/models/pms_service_line.py b/pms/models/pms_service_line.py index c410e7bbd..06fa2d394 100644 --- a/pms/models/pms_service_line.py +++ b/pms/models/pms_service_line.py @@ -52,7 +52,7 @@ class PmsServiceLine(models.Model): readonly=True, store=True) cancel_discount = fields.Float( - 'Discount', compute='_compute_cancel_discount') + 'Discount cancel', compute='_compute_cancel_discount') # Compute and Search methods @api.depends('day_qty', 'service_id.price_total') diff --git a/pms/views/inherited_account_invoice_views.xml b/pms/views/inherited_account_move_views.xml similarity index 100% rename from pms/views/inherited_account_invoice_views.xml rename to pms/views/inherited_account_move_views.xml diff --git a/pms/views/pms_reservation_views.xml b/pms/views/pms_reservation_views.xml index 4ecd8223b..be8ccd055 100644 --- a/pms/views/pms_reservation_views.xml +++ b/pms/views/pms_reservation_views.xml @@ -61,18 +61,17 @@