From 8dcab28c27336d5ecc447ac263e541df8a8de8c0 Mon Sep 17 00:00:00 2001 From: Dario Lodeiros Date: Sat, 18 May 2019 10:36:31 +0200 Subject: [PATCH 1/9] [IMP] sudo create down payment product --- hotel/wizard/folio_make_invoice_advance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hotel/wizard/folio_make_invoice_advance.py b/hotel/wizard/folio_make_invoice_advance.py index 132150c36..5ffd8979c 100644 --- a/hotel/wizard/folio_make_invoice_advance.py +++ b/hotel/wizard/folio_make_invoice_advance.py @@ -221,7 +221,7 @@ class FolioAdvancePaymentInv(models.TransientModel): # Create deposit product if necessary if not self.product_id: vals = self._prepare_deposit_product() - self.product_id = self.env['product.product'].create(vals) + self.product_id = self.env['product.product'].sudo().create(vals) self.env['ir.config_parameter'].sudo().set_param( 'sale.default_deposit_product_id', self.product_id.id) From aad564fe48c8f8aa83b406bcf52e1528f5b1dbc4 Mon Sep 17 00:00:00 2001 From: Dario Lodeiros Date: Sat, 18 May 2019 14:53:59 +0200 Subject: [PATCH 2/9] [IMP] Configuration reservations color --- hotel/views/res_config.xml | 4 +- hotel_calendar/__manifest__.py | 2 + hotel_calendar/data/ir_config_parameter.xml | 86 +++++++++++++++++++ hotel_calendar/models/__init__.py | 1 + .../models/inherited_hotel_reservation.py | 43 +++++----- hotel_calendar/models/inherited_res_users.py | 62 ------------- hotel_calendar/models/res_config.py | 84 ++++++++++++++++++ .../views/inherited_res_users_views.xml | 34 -------- hotel_calendar/views/res_config.xml | 63 ++++++++++++++ 9 files changed, 259 insertions(+), 120 deletions(-) create mode 100644 hotel_calendar/data/ir_config_parameter.xml create mode 100644 hotel_calendar/models/res_config.py create mode 100644 hotel_calendar/views/res_config.xml diff --git a/hotel/views/res_config.xml b/hotel/views/res_config.xml index 168b8f790..14892aab2 100644 --- a/hotel/views/res_config.xml +++ b/hotel/views/res_config.xml @@ -10,7 +10,7 @@
-

Hotel Default

+

Hotel Default

-

Hotel Default Hours

+

Hotel Default Hours