diff --git a/addons/payment/models/payment_acquirer.py b/addons/payment/models/payment_acquirer.py
index c099ce866f4..0fe6bf53d17 100644
--- a/addons/payment/models/payment_acquirer.py
+++ b/addons/payment/models/payment_acquirer.py
@@ -87,10 +87,6 @@ class PaymentAcquirer(osv.Model):
'pre_msg': fields.html('Help Message', translate=True,
help='Message displayed to explain and help the payment process.'),
'post_msg': fields.html('Thanks Message', help='Message displayed after having done the payment process.'),
- 'validation': fields.selection(
- [('manual', 'Manual'), ('automatic', 'Automatic')],
- string='Process Method',
- help='Static payments are payments like transfer, that require manual steps.'),
'view_template_id': fields.many2one('ir.ui.view', 'Form Button Template', required=True),
'registration_view_template_id': fields.many2one('ir.ui.view', 'S2S Form Template',
domain=[('type', '=', 'qweb')],
@@ -338,39 +334,6 @@ class PaymentAcquirer(osv.Model):
return method(cr, uid, id, data, context=context)
return True
- def _wrap_payment_block(self, cr, uid, html_block, amount, currency_id, context=None):
- payment_header = _('Pay safely online')
- currency = self.pool['res.currency'].browse(cr, uid, currency_id, context=context)
- amount_str = float_repr(amount, currency.decimal_places)
- currency_str = currency.symbol or currency.name
- amount = u"%s %s" % ((currency_str, amount_str) if currency.position == 'before' else (amount_str, currency_str))
- result = u"""
-
- %%s
-
""" % (amount, payment_header)
- return result % html_block.decode("utf-8")
-
- def render_payment_block(self, cr, uid, reference, amount, currency_id, tx_id=None, partner_id=False, partner_values=None, tx_values=None, company_id=None, context=None):
- html_forms = []
- domain = [('validation', '=', 'automatic')]
- if company_id:
- domain.append(('company_id', '=', company_id))
- acquirer_ids = self.search(cr, uid, domain, context=context)
- for acquirer_id in acquirer_ids:
- button = self.render(
- cr, uid, acquirer_id,
- reference, amount, currency_id,
- tx_id, partner_id, partner_values, tx_values,
- context)
- html_forms.append(button)
- if not html_forms:
- return ''
- html_block = '\n'.join(filter(None, html_forms))
- return self._wrap_payment_block(cr, uid, html_block, amount, currency_id, context=context)
-
class PaymentTransaction(osv.Model):
""" Transaction Model. Each specific acquirer can extend the model by adding
diff --git a/addons/payment/views/payment_acquirer.xml b/addons/payment/views/payment_acquirer.xml
index 57a0ca32fcb..be0353e98f9 100644
--- a/addons/payment/views/payment_acquirer.xml
+++ b/addons/payment/views/payment_acquirer.xml
@@ -43,7 +43,6 @@
-
diff --git a/addons/payment_transfer/data/transfer.xml b/addons/payment_transfer/data/transfer.xml
index 3df2d143736..2b89a9e7c85 100644
--- a/addons/payment_transfer/data/transfer.xml
+++ b/addons/payment_transfer/data/transfer.xml
@@ -8,7 +8,6 @@
transfer
- manual
none
test
diff --git a/addons/portal/__openerp__.py b/addons/portal/__openerp__.py
index 7b23babf042..d5bd93ec52d 100644
--- a/addons/portal/__openerp__.py
+++ b/addons/portal/__openerp__.py
@@ -26,7 +26,6 @@ very handy when used in combination with the module 'share'.
'portal_view.xml',
'wizard/portal_wizard_view.xml',
'security/ir.model.access.csv',
- 'views/portal.xml',
],
'demo': ['portal_demo.xml'],
'auto_install': True,
diff --git a/addons/portal/static/src/css/portal.css b/addons/portal/static/src/css/portal.css
deleted file mode 100644
index 5157b1a8027..00000000000
--- a/addons/portal/static/src/css/portal.css
+++ /dev/null
@@ -1,87 +0,0 @@
-
-.openerp .oe_application .oe_form_sheetbg {
- /* Establish a stacking context on top of which the
- payment_acquirers::before element can be positioned */
- position: relative;
- z-index: 0;
-}
-
-
-.openerp .oe_form .oe_form_embedded_html.view_portal_payment_options {
- overflow: visible;
-}
-
-.openerp .payment_acquirers {
- position: relative;
- padding: 10px 15px;
- right: -125px; /* improved margin according bootstrap3 */
- width: 650px;
- margin-left: 80px;
-
- background: #729FCF;
- background-image: -webkit-gradient(linear, left top, left bottom, from(#729FCF), to(#3465A4));
- background-image: -webkit-linear-gradient(top, #729FCF, #3465A4);
- background-image: -moz-linear-gradient(top, #729FCF, #3465A4);
- background-image: -ms-linear-gradient(top, #729FCF, #3465A4);
- background-image: -o-linear-gradient(top, #729FCF, #3465A4);
- background-image: linear-gradient(to bottom, #729FCF, #3465A4);
- border-bottom: 1px solid #043574;
-
- -webkit-box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
-}
-
-.openerp .payment_acquirers form {
- display: inline-block;
- vertical-align: top;
-}
-
-.openerp .payment_acquirers form input,
-.openerp .payment_acquirers form textarea,
-.openerp .payment_acquirers form select
-{
- -webkit-box-shadow: none;
- box-shadow: none;
- background: transparent;
- border: none;
- padding: none;
-}
-
-.openerp .payment_acquirers::after {
- content: " ";
- display: block;
- width: 10px;
- height: 20px;
- position: absolute;
- bottom: 0;
- right: 1px;
-
- margin-bottom: -6px;
- background: #043574;
-
- -webkit-transform: skewY(-45deg);
- -moz-transform: skewY(-45deg);
- -ms-transform: skewY(-45deg);
- -o-transform: skewY(-45deg);
- transform: skewY(-45deg);
-
- -webkit-box-shadow: inset 1px -1px 2px black, -1px 1px 3px black;
- box-shadow: inset 1px -1px 2px black, -1px 1px 3px black;
-
- /* push it under all its siblings, just on top of its root
- in the z-index stack: div.oe_form_sheetbg */
- z-index: -1;
-}
-
-.openerp .payment_acquirers .payment_header {
- display: inline-block;
- font-weight: bold;
- font-size: 110%;
- padding-right: 15px;
- color: white;
- text-shadow: 0 1px 1px #729FCF, 0 -1px 1px #3465A4;
-}
-.openerp .payment_acquirers .payment_header .payment_amount {
- font-size: 130%;
- padding: 6px 0px;
-}
\ No newline at end of file
diff --git a/addons/portal/views/portal.xml b/addons/portal/views/portal.xml
deleted file mode 100644
index 78ea72a1c40..00000000000
--- a/addons/portal/views/portal.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/addons/portal_sale/portal_sale.py b/addons/portal_sale/portal_sale.py
index 8f82d2a01b7..0d8a1004081 100644
--- a/addons/portal_sale/portal_sale.py
+++ b/addons/portal_sale/portal_sale.py
@@ -9,23 +9,6 @@ from openerp import SUPERUSER_ID
class sale_order(osv.Model):
_inherit = 'sale.order'
- # make the real method inheritable
- _payment_block_proxy = lambda self, *a, **kw: self._portal_payment_block(*a, **kw)
-
- _columns = {
- 'portal_payment_options': fields.function(_payment_block_proxy, type="html", string="Portal Payment Options"),
- }
-
- def _portal_payment_block(self, cr, uid, ids, fieldname, arg, context=None):
- result = dict.fromkeys(ids, False)
- payment_acquirer = self.pool['payment.acquirer']
- for this in self.browse(cr, SUPERUSER_ID, ids, context=context):
- if this.state not in ('draft', 'cancel', 'done'):
- result[this.id] = payment_acquirer.render_payment_block(
- cr, uid, this.name, this.amount_total, this.pricelist_id.currency_id.id,
- partner_id=this.partner_id.id, company_id=this.company_id.id, context=context)
- return result
-
def action_quotation_send(self, cr, uid, ids, context=None):
''' Override to use a modified template that includes a portal signup link '''
action_dict = super(sale_order, self).action_quotation_send(cr, uid, ids, context=context)
@@ -69,23 +52,6 @@ class sale_order(osv.Model):
class account_invoice(osv.Model):
_inherit = 'account.invoice'
- # make the real method inheritable
- _payment_block_proxy = lambda self, *a, **kw: self._portal_payment_block(*a, **kw)
-
- _columns = {
- 'portal_payment_options': fields.function(_payment_block_proxy, type="html", string="Portal Payment Options"),
- }
-
- def _portal_payment_block(self, cr, uid, ids, fieldname, arg, context=None):
- result = dict.fromkeys(ids, False)
- payment_acquirer = self.pool.get('payment.acquirer')
- for this in self.browse(cr, uid, ids, context=context):
- if this.type == 'out_invoice' and this.state not in ('draft', 'done') and not this.reconciled:
- result[this.id] = payment_acquirer.render_payment_block(
- cr, uid, this.number, this.residual, this.currency_id.id,
- partner_id=this.partner_id.id, company_id=this.company_id.id, context=context)
- return result
-
def action_invoice_sent(self, cr, uid, ids, context=None):
''' Override to use a modified template that includes a portal signup link '''
action_dict = super(account_invoice, self).action_invoice_sent(cr, uid, ids, context=context)
diff --git a/addons/portal_sale/portal_sale_view.xml b/addons/portal_sale/portal_sale_view.xml
index 4e3b0eaccef..5f2fdf96a16 100644
--- a/addons/portal_sale/portal_sale_view.xml
+++ b/addons/portal_sale/portal_sale_view.xml
@@ -1,28 +1,6 @@
-
-
-
- sale.order.form.payment
- sale.order
-
-
-
-
-
-
-
-
- account.invoice.form.payment
- account.invoice
-
-
-
-
-
-
-
account.invoice.select.share
diff --git a/addons/website_portal_sale/__openerp__.py b/addons/website_portal_sale/__openerp__.py
index 8d3987867f9..b9431797ce8 100644
--- a/addons/website_portal_sale/__openerp__.py
+++ b/addons/website_portal_sale/__openerp__.py
@@ -10,6 +10,7 @@ Add your sales document in the frontend portal. Your customers will be able to c
'depends': [
'sale',
'website_portal',
+ 'website_payment',
],
'data': [
'views/templates.xml',
diff --git a/addons/website_portal_sale/views/templates.xml b/addons/website_portal_sale/views/templates.xml
index b5123597507..915eaf78e43 100644
--- a/addons/website_portal_sale/views/templates.xml
+++ b/addons/website_portal_sale/views/templates.xml
@@ -109,6 +109,7 @@
Invoice Date |
Due Date |
|
+ |
Total |
@@ -130,6 +131,9 @@
Cancelled
+
+ Pay Now
+ |
|
diff --git a/addons/website_sale/controllers/main.py b/addons/website_sale/controllers/main.py
index a8d2806c732..a47c5cba7c9 100644
--- a/addons/website_sale/controllers/main.py
+++ b/addons/website_sale/controllers/main.py
@@ -829,11 +829,11 @@ class website_sale(http.Controller):
else:
tx = request.registry['payment.transaction'].browse(cr, SUPERUSER_ID, tx_ids[0], context=context)
state = tx.state
- flag = True if state == 'pending' and tx.acquirer_id.validation == 'automatic' else False
+ flag = state == 'pending'
values.update({
'tx_ids': True,
'state': state,
- 'validation' : tx.acquirer_id.validation,
+ 'validation': tx.acquirer_id.auto_confirm == 'none',
'tx_post_msg': tx.acquirer_id.post_msg or None
})