mirror of
https://github.com/OCA/pms.git
synced 2025-01-29 00:17:45 +02:00
[IMP]pms-api-rest: url field changed to url param in send reset mail password service
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
"data/auth_jwt_validator.xml",
|
||||
"views/pms_property_views.xml",
|
||||
"views/res_users_views.xml",
|
||||
"views/res_company_views.xml",
|
||||
],
|
||||
"demo": [
|
||||
"demo/pms_api_rest_master_data.xml",
|
||||
|
||||
@@ -11,6 +11,7 @@ class PmsApiRestUserInput(Datamodel):
|
||||
userId = fields.Integer(required=False, allow_none=True)
|
||||
userEmail = fields.String(required=False, allow_none=True)
|
||||
resetToken = fields.String(required=False, allow_none=True)
|
||||
url = fields.String(required=False, allow_none=True)
|
||||
|
||||
|
||||
class PmsApiRestUserOutput(Datamodel):
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
from . import res_company
|
||||
from . import pms_property
|
||||
from . import res_users
|
||||
from . import account_payment
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ResCompany(models.Model):
|
||||
_inherit = "res.company"
|
||||
|
||||
url_app = fields.Char(string="Url App", help="Url to identify the app")
|
||||
@@ -172,7 +172,7 @@ class PmsRoomTypeClassService(Component):
|
||||
return False
|
||||
expiration_datetime = datetime.now() + timedelta(minutes=15)
|
||||
user.partner_id.sudo().signup_prepare(expiration=expiration_datetime)
|
||||
template.send_mail(user.id, force_send=True)
|
||||
template.with_context({'app_url': input_data.url}).send_mail(user.id, force_send=True)
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="company_view_form" model="ir.ui.view">
|
||||
<field name="model">res.company</field>
|
||||
<field name="inherit_id" ref="base.view_company_form" />
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='url_advert']" position="after">
|
||||
<field name="url_app" />
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user