summaryrefslogtreecommitdiff
path: root/addons/payment_sips/models
AgeCommit message (Collapse)Author
2020-08-17[IMP] payment_sips: code improvementsDamien Bouvy
Extend support for all currencies listed in the SIPS documentation, including the decimal numbers per currency. Move this hardcoded data is a less annoying place. Remove unnecessary code (e.g. checking if there is more than one payment with the same reference, which can't happen due to a SQL unique constraint from the payment module). Code clarity while I'm at it. Task-2259942 closes odoo/odoo#51473 Related: odoo/upgrade#1216 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-08-17[IMP] payment_sips: testing valuesDamien Bouvy
Prior to this revision, setting the provider to the 'test' mode caused hardcoded values for merchantId, secret and keyVersion to be used without any possibility to override them. While somewhat useful, it was quite limiting since it used the 'simu' environment of Atos Wordline, preventing you from testing any other platform and from using the 'test' environment for Atos. This revision removes these hardcoded values, which gives more flexibility as far as testing goes at the cost of a bit more setup (since you might need to change some values manually, notably the keyVersion). Task-2259942
2020-08-17[IMP] payment_sips: convert config param to proper fieldDamien Bouvy
The config param 'sips.key_version' was introduced "some time ago" in revision a62480ad0f6 to allow setting the `keyVersion` POST param to an arbitrary value, allowing other SIPS-comptatible providers to be used with this module. This revision (finally) converts this fix to a proper field. Task-2259942
2020-06-18[IMP] *: replace to new _() syntaxMartin Trigaux
Using a few regex like \((_\(.*%s.*)(\) % )([\w\[\]][\w .\[\]\(\)'"]*)\) ($1, $3)) Old syntax is still compatible but starts the migration to the new syntax that catches error.
2020-04-09[FIX] payment_sips: datetime parsingDamien Bouvy
SIPS date format can be somewhat variable, some sanitation is required before using the data raw for the ORM. opw-2224926 X-original-commit: 620e987f326d6da7c3a9b2c1aca7bff16d9ce6c4 Co-authored-by: Nicolas Martinelli <nim@odoo.com>
2020-04-06[REV] payment_sips: 9372ff3ac010bd3428eb866ddd3ecfaf939127c4Richard Mathot
Python 3.7 is required for function datetime.datetime.fromisoformat to work. Ref: https://docs.python.org/3.7/library/datetime.html?highlight=fromisoformat#datetime.datetime.fromisoformat This is a temporary revert, to avoid rejecting perfectly valid transactions. Ref: https://github.com/odoo/odoo/pull/48581 opw-2179123 closes odoo/odoo#49091 X-original-commit: dedac4efd0872bab71e06796f5a3158e2cf7bf15 Signed-off-by: Richard Mathot (rim) <rim@openerp.com>
2020-03-30[FIX] *: set ondelete policy of required Selection fieldsAdrian Torres
With this commit, Selection fields with `required=True` which are extended via `selection_add` are given proper ondelete policies to ensure the cleanup of records containing these extended options during uninstall of the extending module. This commit also cleans up leftover uninstall hooks that were being used to handle the same set of problems prior to the ondelete mechanism being implemented for Selection fields. closes odoo/odoo#46325 Related: odoo/enterprise#9117 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-03-30[FIX] payment_sips: datetime parsingDamien Bouvy
SIPS date format can be somewhat variable, some sanitation is required before using the data raw for the ORM. opw-2224926 closes odoo/odoo#48604 X-original-commit: db998d39d7d692779a64522e168bba29b82f1d03 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-03-23[FIX] payment_sips: rounding errorNicolas Martinelli
- Activate SIPS - Make a payment of 263.90 on the eCommerce The SO is not confirmed because there is 0.01 of difference. This is due to the fact that 263.90 * 100 = 26389.9999... Using `round` instead of `int` prevents truncating the value. opw-2179123 closes odoo/odoo#48169 X-original-commit: 60f9cea444df37e685b7f4312c9ff28c395822b3 Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-24[FIX] payment_sips: correct automaticResponse URLDamien Bouvy
The automaticResponseURL should not be the same as the one the customer uses, as this might mess up with the payment processing page when the customer actually returns. Add some logging while I'm here, and remove a useless write on a non-existing field that generates log warnings (but nothing else). closes odoo/odoo#46047 X-original-commit: 2e25ff3b1114a222ae8cff76c2ce8d31adf599e4 Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-10-31[FIX] payment_*: multiwebsite base_urlJorge Pinna Puissant
Fine-tunning of 937b5c076e7175bec664ed0cf4b77505e342f1e2 Have a multiwebsite setup have a payment installed for one of the two websites Make an order on that website and try to pay Before this commit, the transaction doesn't come back to odoo's payment success controller This was because the return url was set to the web base url ICP After this commit, the payment success page is opened as we took the request's url as the return url opw-2080352 closes odoo/odoo#39643 X-original-commit: a9fb15b33fd041ee420581a5ba450017db06e0c7 Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
2019-09-13[MERGE] forward port branch saas-12.4 up to fe59754c520Christophe Simonis
closes odoo/odoo#36721 Signed-off-by: Christophe Simonis <chs@odoo.com>
2019-09-10[FIX] payment_sips: Wrong test and production URLsGoffin Simon
The production/test urls were inverted. opw:2061123 closes odoo/odoo#36623 X-original-commit: 5325c4388c5cae38b78b88d74220f3a5dca3fc26 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-09-03[FIX] payment: Publish Sips online paymentGoffin Simon
Steps to reproduce the bug: - When trying to publish the sips payment acquirer not in debug mode Bug: It raised a access rights error because the fields: sips_test_url, sips_prod_url, sips_version were not readable in function _check_required_if_provider and a default value was set for all these fields. opw:2061123 closes odoo/odoo#36346 Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2019-08-12[REF] payment* : state based publishingVictor Feyens
Replace website_published and environment by a generic state on payment.acquirer Payment acquirers aren't enabled by default. When setting their state to 'enabled' or 'test', it is verified the required fields for the provider are set.
2019-07-17[REM] *: calls to @api.multiAdrian Torres
Multi is the default api for methods, it is not necessary to explicitly decorate methods with it, adds clutter and most people use it because they see that the rest of the code uses it. Done with `find . -type f -name '*.py' | xargs sed -i '/@api.multi/d'`
2018-09-25[FIX] payment, payment_sips: compute reference correctly and encode return urlDemaret Rivarola Johan
Sips does not accept special characters as a transaction reference. Replacing '-' solve this issue. Parsing Sips response was failing when the return url had query parameters. This was due to the split on '='. Encoding the url solve this issue.
2018-05-29[MERGE] forward port branch saas-11.3 up to 37eed7c509fChristophe Simonis
2018-05-23[REF] account,payment(_*),sale*: downgrade transactions into debug itemsqdp-odoo
It was very confusing for the user to distinct account.payment and payment.transaction. From now on, the transactions are technical objects and, in the backend, we only refer to it in log messages (Front end will be adapted in the same fashion later on). They are hidden in debug mode in accounting\configuration\payments as their purpose is now purely technical/log This commit also aims to reduce the gap between the accounting app and the transactions: account.payment objects are created/validated upon completion of transaction. To ease the capture/voiding of pending transactions, the related buttons are now displayed directly on the SO/invoice instead of the transactions. Was task: https://www.odoo.com/web#id=35857&view_type=form&model=project.task&action=333&active_id=967&menu_id=4720 Was PR #24043 [FIX] add domain based on journal to payment tokens Was opw: https://www.odoo.com/web?debug#id=1828206&view_type=form&model=project.task&menu_id=5200
2018-05-15[MERGE] forward port branch 11.0 up to 5a943390f2aChristophe Simonis
2018-05-15[FIX] payment_sips: special charactersNicolas Martinelli
The field `transactionReference` of Sips must contain only alphanumerical characters. Previous commit 31dc6b888eeb2d787f5675 solved the special case of several attempts to pay, but a much simpler case may appear in v11. Paying an invoice is likely to fail since the reference contains by default `/`. In the previous commit, we could simply modify the common `payment` module code. In this specific case, however, we only change the reference if the acquirer is Sips. opw-1841483
2018-02-20[FIX] payment_sips: use proper labelMartin Trigaux
Why the abbreviation bro?
2018-02-01[FIX] payment_sips: allow to customize key_versionJeremy Kersten
Some sips provider don't use 2 as key_version. E.g. mercanet uses '1' as production key. Now we allow to override it in Ir Config Parameter for stable version. Todo: Need to make it customizable by end user into the configuration of acquirer. Courtesy of BEK for reporting
2017-09-19[MERGE] forward port branch saas-17 up to 2a343d7c9c4Christophe Simonis
2017-09-19[MERGE] forward port branch saas-16 up to c3a48da767bChristophe Simonis
2017-09-18[MERGE] forward port branch saas-15 up to 50a440237acChristophe Simonis
2017-09-18[FIX] payment_sips: make it configurable for other sips provider.Jeremy Kersten
Atos is not the only sips provider, clean fix for hack 265f9ab5090e68ca4dc1e4147a262aaec1897a29
2017-09-14[FIX] payment_sips, payment_ogone: remove call to partner_reference.Jeremy Kersten
This field has been removed on transaction model in commit f8a98d9.
2017-09-14[FIX] payment_sips: allow to override the default atos url.Jeremy Kersten
Sips is generic, and others services that Atos use the same protocol. It is not user-friendly, but that allow user to use alternative service like 'Sogenactif'. In next version, we need to add field on config to specify it and the InterfaceVersion that can differ according to the provider.
2017-08-20[FIX] P3: hash/hmac payload must be bytesXavier Morel
2017-06-01[MERGE] Forward-port saas-16 up to ba15df47cb25625cb0921cba554aa0879048c90aOlivier Dony
2017-06-01[MERGE] Forward-port saas-15 up to 17b847c0f67e51279e4c6d53e847d9918b41b7f7Olivier Dony
2017-05-16[MERGE] Forward-port saas-11 up to 6490e652c3742e2752e4ee9f20af78f7e3fcbdbeOlivier Dony
2017-05-16[FIX] l10n_cn*, payment_sips: clarify obsolete licensing infoOlivier Dony
The license info for these modules was a leftover from previous versions. Once integrated in Odoo Community they share the same license as all other modules, as mentioned in the LICENSE notice at the top of the files. opw-743686
2017-05-15[FIX] P3: urllib, urllib2 and urlparseXavier Morel
In Python 3, all of these were "consolidated" under urllib(.request, .parse, .errors) which is inconvenient. Since we already have hard dependencies on requests and werkzeug(.urls, which is a backport of Python 3's unicode-aware urllib.parse) migrate *everything* to that. A sticking point is urllib2.URLError, those were (mostly) replaced by the slightly more general IOError which URLError extends.
2017-04-28[FIX] Various P3-related import changesxmo-odoo
* LDAP import: python-ldap is not python3-compatible, pyldap is Warning: only supported from debian Stretch (current testing)? https://packages.debian.org/search?searchon=names&keywords=pyldap * implicitly relative imports * imports of moved or removed stdlib modules issue #8530
2016-09-09[MERGE] forward port branch saas-12 up to 9f28139Christophe Simonis
2016-09-09[MERGE] forward port branch saas-11 up to dc4d6b6Christophe Simonis
2016-09-09[MERGE] forward port branch saas-6 up to f98665fChristophe Simonis
2016-09-06[IMP] payment_*: avoid access error on provider modelRavi Gohil
As provider model is intended to be used internally restricting the read of some private fields to the employee group avoid creating access issues.
2016-07-06[CLN] payment_sips: cleaning and guidelinesThibault Delavallée
As this module is already in new API only small linting is performed.
2016-07-06[MOV] payment_sips: file organizationThibault Delavallée
2016-07-06[REF] payment_*: method signaturesThibault Delavallée
Methods with signature - cr, uid, id - cr, uid, <browse_record> have been refactored to be future multi ensure one methods.
2016-06-17[FIX] payment*: fix invalid codingJoren Van Onder
-*- coding: utf-'8' "-*-" is not a valid encoding. Introduced by 666387a2746e24b9ca312261c3a536e9af4c9d4e I think. It was probably a typo/replace gone bad and it got copy-pasted everywhere. Emacs complains every time you try to save changes to files with this invalid encoding. This changes all of them to coding: utf-8 adhering to eae045949d65fb4236e1d7b3fc3e806673711fe1. Done with: find . -name '*.py' -print0 |\ xargs -0 sed -ie 's/-\*- coding: utf-'"'"'8'"'"' "-\*-"/coding: utf-8/'
2015-09-28[IMP] replace simplejson with stdlib jsonLeonardo Rochael Almeida
The stdlib version of the json library is more recent than the 3.5.3 version we are pinning in `requirements.txt` There is no reason to use it. Closes #6940
2015-09-04[IMP] payment,payment_*,website_quote,website_sale: new rendering mechanism ↵Damien Bouvy
compatibility for payment providers merge *ALL* the dicts The form rendering used to receive a dict for partner information and a dict for tx information and to transmit another dict to the qweb template; now everything is done in a single dict
2015-07-24[ADD] payment_sipsAristobulo Meneses
contains acquirer definition to support Atos Wordline online payments Courtesy of Eezee-It Closes #6684