Skip to content

Commit

Permalink
[MIG] pms: Migration to 16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaiahMartel committed Jun 3, 2024
1 parent 1e79bc1 commit 773c0f6
Show file tree
Hide file tree
Showing 65 changed files with 1,180 additions and 3,068 deletions.
4 changes: 2 additions & 2 deletions pms/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
PMS (Property Management System)
================================

..
..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:4f0393d5fcb9c4849b44b6dc0a699e103b2bacebc46eec3b9c8cccbc3030a628
!! source digest: sha256:084d2899cbc7b06f7ece70261b11256045c44b256ebff405d42812f6f32dd1fc
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
Expand Down
44 changes: 25 additions & 19 deletions pms/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{
"name": "PMS (Property Management System)",
"summary": "A property management system",
"version": "14.0.2.37.0",
"version": "16.0.1.0.0",
"development_status": "Beta",
"category": "Generic Modules/Property Management System",
"website": "https://github.com/OCA/pms",
Expand All @@ -20,16 +20,15 @@
# "email_template_qweb",
"sale",
"multi_pms_properties",
"partner_identification",
"partner_firstname",
"partner_second_lastname",
"partner_contact_gender",
"partner_contact_birthdate",
"partner_contact_nationality",
"account_reconciliation_widget",
# "partner_identification_unique_by_category",
"queue_job",
"web_timeline",
"partner_identification",
],
"data": [
"security/pms_security.xml",
Expand Down Expand Up @@ -71,9 +70,9 @@
"views/pms_room_type_views.xml",
"views/pms_room_views.xml",
"views/pms_room_closure_reason_views.xml",
"views/account_payment_views.xml",
# "views/account_payment_views.xml", # TODO Check how is called this views now or if they are used
"views/account_move_views.xml",
"views/account_bank_statement_views.xml",
# "views/account_bank_statement_views.xml", # TODO Check how is called this views now or if they are used
"views/res_users_views.xml",
"views/pms_room_type_class_views.xml",
"views/pms_availability_plan_views.xml",
Expand All @@ -83,40 +82,47 @@
"views/product_pricelist_item_views.xml",
"views/pms_sale_channel.xml",
"views/product_template_views.xml",
"views/webclient_templates.xml",
"views/account_journal_views.xml",
"views/folio_portal_templates.xml",
"views/reservation_portal_templates.xml",
"views/res_company_views.xml",
"views/traveller_report_template.xml",
"views/assets.xml",
"wizards/wizard_split_join_swap_reservation.xml",
"views/precheckin_portal_templates.xml",
"wizards/wizard_massive_changes.xml",
"wizards/wizard_advanced_filters.xml",
"views/payment_transaction_views.xml",
# "views/payment_transaction_views.xml", # TODO Check how is called this views now or if they are used
"views/account_move_line_views.xml",
"report/proforma_report_templates.xml",
"report/proforma_report.xml",
"views/account_portal_templates.xml",
"views/payment_acquirer_views.xml",
"views/account_analytic_distribution_views.xml",
# "views/payment_acquirer_views.xml", # TODO Check how is called this views now or if they are used
# "views/account_analytic_distribution_views.xml", # TODO check how would work (was with analytic_tags)
"views/account_analytic_line_views.xml",
"views/res_partner_category.xml",
"views/res_partner_id_category_views.xml",
"views/res_partner_id_number_views.xml",
"views/res_country_views.xml",
],
"demo": [
"demo/pms_master_data_no_update.xml",
"demo/pms_master_data.xml",
"demo/pms_folio.xml",
"demo/pms_reservation.xml",
],
"qweb": [
"static/src/xml/pms_base_templates.xml",
"static/src/xml/reservation_group_button_views.xml",
"static/src/xml/account_reconciliation.xml",
# "demo/pms_master_data_no_update.xml",
# "demo/pms_master_data.xml",
# "demo/pms_folio.xml",
# "demo/pms_reservation.xml",
],
"assets": {
'portal.assets_frontend': [
# "/pms/static/src/js/send_invitation_data.js",
# "/pms/static/src/js/folio_portal_sidebar.js",
# "pms/static/src/xml/pms_base_templates.xml",
# "pms/static/src/xml/reservation_group_button_views.xml",
# "pms/static/src/xml/account_reconciliation.xml",
],
"web.assets_backend": [
# "/pms/static/src/js/inherited_abstract_web_client.js",
# "/pms/static/src/js/widgets/switch_property_menu.js",
# "/pms/static/src/js/pms_list_controller.js",
# "/pms/static/src/js/reconciliation_widget.js",
]},
"pre_init_hook": "pre_init_hook",
}
4 changes: 2 additions & 2 deletions pms/controllers/pms_portal.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from odoo.http import request

from odoo.addons.account.controllers.portal import PortalAccount
from odoo.addons.payment.controllers.portal import PaymentProcessing
from odoo.addons.account_payment.controllers.portal import PaymentPortal
from odoo.addons.portal.controllers.portal import CustomerPortal, pager as portal_pager
from odoo.addons.portal.models.portal_mixin import PortalMixin

Expand Down Expand Up @@ -105,7 +105,7 @@ def folio_pay_form(
if save_token:
vals["type"] = "form_save"
transaction = folio_sudo._create_payment_transaction(vals)
PaymentProcessing.add_payment_transaction(transaction)
PaymentPortal._create_transaction(transaction)
if not transaction:
return False
tx_ids_list = set(request.session.get("__payment_tx_ids__", [])) | set(
Expand Down
38 changes: 19 additions & 19 deletions pms/data/pms_cancelled_reservation_email_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<field name="model_id" ref="pms.model_pms_reservation" />
<field
name="subject"
>Your reservation in ${object.pms_property_id.name} has been cancelled</field>
>Your reservation in {{object.pms_property_id.name}} has been cancelled</field>
<field
name="email_from"
>${object.pms_property_id.partner_id.email | safe}</field>
>{{object.pms_property_id.partner_id.email | safe}}</field>
<field
name="email_to"
>${(object.email and '"%s" &lt;%s&gt;' % (object.name, object.email) or object.partner_id.email_formatted or '') | safe}</field>
>{{(object.email and '"%s" &lt;%s&gt;' % (object.name, object.email) or object.partner_id.email_formatted or '') | safe}}</field>
<field name="body_html" type="html">
<table
border="0"
Expand Down Expand Up @@ -42,18 +42,18 @@
<div class="col-sm-4">
% if object.pms_property_id.partner_id.street
<p
>${object.pms_property_id.partner_id.street}</p>
>{{object.pms_property_id.partner_id.street}}</p>
% endif
% if object.pms_property_id.partner_id.street2
<p
>${object.pms_property_id.partner_id.street2}</p>
>{{object.pms_property_id.partner_id.street2}}</p>
% endif
<p
>${object.pms_property_id.partner_id.zip}</p>
>{{object.pms_property_id.partner_id.zip}}</p>
<p
>${object.pms_property_id.partner_id.city}</p>
>{{object.pms_property_id.partner_id.city}}</p>
<p
>${object.pms_property_id.partner_id.country_id.name}</p>
>{{object.pms_property_id.partner_id.country_id.name}}</p>
</div>
</td></tr>
<tr><td valign="top" style="font-size: 14px;">
Expand All @@ -62,9 +62,9 @@
style="background-color:rgb(204,204,204);border:medium none;clear:both;display:block;font-size:0px;min-height:1px;line-height:0; margin: 16px 0px 16px 0px;"
/>
<div>
Hello ${object.partner_id.name or ''},<br
Hello {{object.partner_id.name or ''}},<br
/>
Your reservation at ${object.pms_property_id.name} has been cancelled.
Your reservation at {{object.pms_property_id.name}} has been cancelled.
</div>
</td></tr>
</table>
Expand All @@ -91,20 +91,20 @@
>If you have questions please contact with us:</div>
<ul>
<li
>${object.pms_property_id.name}</li>
>{{object.pms_property_id.name}}</li>
% if object.pms_property_id.partner_id.email
<li>Mail: <a
href="mailto:${object.pms_property_id.partner_id.email}"
href="mailto:{{object.pms_property_id.partner_id.email}}"
style="text-decoration:none;color:#875A7B;"
>${object.pms_property_id.partner_id.email}</a></li>
>{{object.pms_property_id.partner_id.email}}</a></li>
% endif
% if object.pms_property_id.partner_id.phone
<li
>Phone: ${object.pms_property_id.partner_id.phone}</li>
>Phone: {{object.pms_property_id.partner_id.phone}}</li>
% endif
% if object.pms_property_id.partner_id.mobile
<li
>Mobile: ${object.pms_property_id.partner_id.mobile}</li>
>Mobile: {{object.pms_property_id.partner_id.mobile}}</li>
% endif
</ul>
</div>
Expand All @@ -126,7 +126,7 @@
style="min-width: 590px; background-color: #F1F1F1; color: #454748; padding: 8px; border-collapse:separate;"
>
<tr><td style="font-size: 10px;">
${object.pms_property_id.privacy_policy}
{{object.pms_property_id.privacy_policy}}
</td></tr>
</table>
% endif
Expand All @@ -143,16 +143,16 @@
<tr><td style="text-align: center; font-size: 10px;">
Sent by <a
target="_blank"
href="${object.company_id.website}"
href="{{object.company_id.website}}"
style="color: #875A7B;"
>${object.company_id.name}</a>
>{{object.company_id.name}}</a>
<br />
</td></tr>
</table>
% endif
</td></tr>
</table>
</field>
<field name="lang">${object.partner_id.lang}</field>
<field name="lang">{{object.partner_id.lang}}</field>
</record>
</odoo>
Loading

0 comments on commit 773c0f6

Please sign in to comment.