The amount to pay must be sent without comma to ogone.
e.g., for 66.99 EUR, the amount sent must be 6699.
To do that, we simply applied 66.99 * 100, which
seems rather good.
However, due to the fact how floats are handled in computers,
`66.99 * 100` returns 6698.999999999999
and
`int(6698.999999999999)` returns 6698
while we expected 6699
Using `float_repr` with `0` as decimal precision
instead of using `int` solves this issue.
`float_repr(6698.999999999999, 0)` returns 6699, as expected.
from the name. This allows to distinguish name and provider. Provider is a more
technical field, used to call some specific methods (<provider>_method_name). The
name field is used for display on the website.
Code and views udpated accordingly.
bzr revid: tde@openerp.com-20140319144608-0i4rv520l0bh53f0
[RENAME] payment_acquirer_* -> payment_ *
[CLEAN] payment_paypal duplicate of portal.payment.acquirer
- [REM] portal.payment.acquirer model, now replaced by payment.acquirer
- paypal banner generation on sale orders and invoices is done using the new payment.acquirer model. It basically works like the old portal.payment.acquirer, using a render_payment_block method.
[CLEAN] payment_paypal and paypal_account field of res.company
- in account: paypal_account is a char field (nothing changes)
- when installing payment_paypal: the char field is replaced by a function field that looks in the payment.acquirer table for paypal instances and get the first one back
- when installing payment_paypal, the company.paypal_account value is used to replace the default paypal data
- this function field and 'migration mechanism' are company aware
[IMP] payment: added pre_msg, post_msg, that are messages to be displayed before payment (like redirection warning for Paypal) and after payment (like account and communication details for transfer). Added a default message for transfer taking the visible company bank accounts.
[IMP] payment: added manual / automatic distinction. eCommerce use this information to decide whether to poll the tx status or display an information message.
[FIX] payment_*: fixed return controlers, using werkzeug.redirect instead of request.redirect that does not work anymore
[IMP] configuration
- added checkboxes to install paypal, ogone and adyen directly from the invoicing configuration
bzr revid: tde@openerp.com-20140124152541-y6e6kset056jbpkv
payment. Added post_msg, message displayed after payment.
[IMP] payment_transfer: added a default value (generated at create) for
post_msg, that contains bank accounts details. bank accounts linked to the
current company and used in report footer are shown.
[FIX] payment_*: make the buttons noupdate.
[IMP] payment: portal_published -> website_published + propagation
[IMP] payment: added process selection field that will be used for some
control in the website, telling w hether we want to refresh a payment
validation page or not.
bzr revid: tde@openerp.com-20140124134652-cc0nz08znnlmftw4