[IMP]: Added Upstream patch for Portal
This commit is contained in:
parent
f64e05c61a
commit
c4123b8447
|
@ -1,6 +1,7 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from . import ir_http
|
||||
from . import mail_thread
|
||||
from . import mail_message
|
||||
from . import portal_mixin
|
|
@ -0,0 +1,16 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo, Flectra. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
|
||||
from flectra import api, fields, models
|
||||
from flectra.osv import expression
|
||||
|
||||
|
||||
class IrHttp(models.AbstractModel):
|
||||
_inherit = 'ir.http'
|
||||
|
||||
@classmethod
|
||||
def _get_translation_frontend_modules_domain(cls):
|
||||
domain = super(IrHttp, cls)._get_translation_frontend_modules_domain()
|
||||
return expression.OR([domain, [('name', '=', 'portal')]])
|
||||
|
|
@ -140,7 +140,7 @@ class PortalWizardUser(models.TransientModel):
|
|||
if wizard_user.partner_id.company_id:
|
||||
company_id = wizard_user.partner_id.company_id.id
|
||||
else:
|
||||
company_id = self.env['res.company']._company_default_get('res.users')
|
||||
company_id = self.env['res.company']._company_default_get('res.users').id
|
||||
user_portal = wizard_user.sudo().with_context(company_id=company_id)._create_user()
|
||||
else:
|
||||
user_portal = user
|
||||
|
|
Loading…
Reference in New Issue