[FIX] payment: translated in frontend
Same reason as: 4ba4d61903
Some messages from payment are displayed on the frontend (eg. when the
transaction is being done on the ecommerce), but only translations of
module matching a given domain (computed with the method of ir.http
model: _get_translation_frontend_modules_domain) are made available on
the frontend.
With this changeset, payment is added in the domain (which can be done
since payment depends on account, account on portal, and portal in
http_routing that declares the method).
opw-2033528
closes #34712
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
This commit is contained in:
@@ -5,4 +5,5 @@ from . import account_invoice
|
||||
from . import res_partner
|
||||
from . import account_payment
|
||||
from . import chart_template
|
||||
from . import ir_http
|
||||
from . import res_company
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
||||
|
||||
from odoo import models
|
||||
from odoo.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', '=', 'payment')]])
|
||||
Reference in New Issue
Block a user