diff options
| author | tbe-odoo <tbe@odoo.com> | 2017-08-23 16:29:26 +0200 |
|---|---|---|
| committer | tbe-odoo <tbe@odoo.com> | 2017-08-29 17:11:23 +0200 |
| commit | 11bc680ae9d864d5e0e28ff85bad96a2c4cdc326 (patch) | |
| tree | c331897dc5506d75ea9d41b89e112b1d2c75f909 /addons/payment/models | |
| parent | 194d52e8fda35f7a6fd9a9e5c2e1af265e25ce4b (diff) | |
[IMP] payment: Remove ugly render() hack
- Removed an ugly hack that renders s2s forms then display them using t-raw, we're now providing the xml_id of the s2s forms and uses t-call instead.
Diffstat (limited to 'addons/payment/models')
| -rw-r--r-- | addons/payment/models/payment_acquirer.py | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/addons/payment/models/payment_acquirer.py b/addons/payment/models/payment_acquirer.py index 365e8d14b37..c36c55ffbac 100644 --- a/addons/payment/models/payment_acquirer.py +++ b/addons/payment/models/payment_acquirer.py @@ -355,16 +355,11 @@ class PaymentAcquirer(models.Model): return self.view_template_id.render(values, engine='ir.qweb') - @api.multi - def _registration_render(self, partner_id, qweb_context=None): - if qweb_context is None: - qweb_context = {} - qweb_context.update(id=self.ids[0], partner_id=partner_id) - method_name = '_%s_registration_form_generate_values' % (self.provider,) - if hasattr(self, method_name): - method = getattr(self, method_name) - qweb_context.update(method(qweb_context)) - return self.registration_view_template_id.render(qweb_context, engine='ir.qweb') + def get_s2s_form_name(self): + if self.registration_view_template_id: + model_data = self.env['ir.model.data'].search([('model', '=', 'ir.ui.view'), ('res_id', '=', self.registration_view_template_id.id)]) + return ('%s.%s') % (model_data.module, model_data.name) + return False @api.multi def s2s_process(self, data): |
