Commit Graph
31 Commits
Author SHA1 Message Date
Laurent Smet 41438824f7 [FIX] payment*: Make tests inheriting of AccountTestInvoicingCommon
This makes tests independant of any demo data and ensure the company configuration is always consistent.
2021-05-18 05:18:52 +00:00
7b165cd555 [REF] payment_paypal: migrate PayPal to the new payment API
See the merge commit for more details.

task-2333036

Co-authored-by: Antoine Vandevenne <anv@odoo.com>
Co-authored-by: Victor Feyens <vfe@odoo.com>
2021-03-30 09:25:51 +02:00
Goffin Simon 6051e9f71e [FIX] payment_paypal: Test paypal_compute_fees
Add a test for the computation of the Paypal fees

opw:2369557

closes odoo/odoo#61750

X-original-commit: 8bedef042bd7be5830de92ae9a6976c9e17fb792
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
2020-11-15 23:08:46 +00:00
Laurent Smet 85e187ebb5 [IMP] payment(_*): Remove dependency to AccountTestCommon
l10n runbot builds are all failing when running at least one test depending of AccountTestCommon because it:
- doesn't create a sandboxed testing environnement to manage the multi-currency, multi-company, the default company's currency, the exchange rates...
- doesn't setup a testing user then all tests are done using the superuser.
- doesn't provide a fully setup chart of accounts: exchange difference journal is not set, accounts have bad types, etc...
- is run sometimes at-install.

--task: 2296213
2020-07-16 07:25:52 +00:00
Damien Bouvy 69e546465a [FIX] payment_paypal: include Build Notation reference
closes odoo/odoo#39993

X-original-commit: 75b1d41237aeb03406ff606a1ea3fc1b3f27a0cb
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-11-07 18:11:40 +00:00
Julien Castiaux 33354f71e1 [FIX] payment_paypal: external tests
All dates in the backend must be naive (=in utc, without timezone)

closes odoo/odoo#36230

Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2019-08-29 12:21:54 +00:00
Victor Feyens f0e059e601 [REF] payment* : state based publishing
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-08-12 08:45:50 +00:00
Nikunj Ladava 55051a1dd7 [IMP] payment_paypal: onboarding checkout
Accept payment on Paypal without having a merchant account
The merchant only need an email address to accept payment from Paypal
Paypal will send email to the merchant to create an account with the details
Odoo will send mail to the merchant to fill all the credentials after creating an account

Note: why used rm? - If IPN is disabled in the profile (case for the new user), the default action to call the return_url is a GET. This means that if your return_url is a script, you must set rm = 2 in order to have the IPN variable POSTed to that URL

task- 34668
2019-07-17 05:06:47 +00:00
Christophe Simonis 2a06f4dcf3 [MERGE] forward port branch 12.0 up to 09fb2469b4 2019-03-29 18:10:57 +01:00
Pierre Masereel 09fb2469b4 [FIX] payment_paypal: fix tests
Since changes made in this commit https://github.com/odoo/odoo/commit/fc1389f8d881adfb94ea1b784fb7104b9eee5d2d the value of field 'custom'
is now set and wasn't before.

closes odoo/odoo#32258

Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2019-03-29 14:35:23 +00:00
Pierre Masereel 240df8225c [FIX] payment_paypal: tests
To avoid trouble when the company name is changed in demo data, we use
the company name variable in the test

closes odoo/odoo#30612
2019-02-04 10:18:47 +00:00
Pierre Masereel 132717c7b1 [FIX] payment_*: tests
PAYPAL
------

The paypal tests are not working working for two reasons:
- we check that there is no date in pending state on payment
transaction, but since the refactoring in this commit: https://github.com/odoo/odoo/commit/01216345e28374b554bfe95df82d607c591271cf
the date is always set before the validation of transaction.
- Since the changes on dates, the datetime field doesn't return a string
anymore and the comparison fails. So we convert the datetime to string
for the comparison.

BUCKAROO
--------

The buckaroo tests were not working for multiple reasons.

STRIPE
------

The payment stripe tests were not working because:
- The reference set in transactions were not the same as the ones givent
to the payment provider.
- we were checking for a script tag in form that has been removed in
commit https://github.com/odoo/odoo/commit/7c639be4aadce20bf6662ab347470fadf9afd99f

AUTHORIZE
---------

This test cannot be tested on runbot due to its server to server way of
working

closes odoo/odoo#30105
2019-01-10 23:47:57 +00:00
qdp-odoo 01216345e2 [REF] account,payment(_*),sale*: downgrade transactions into debug items
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-23 15:44:55 +02:00
tbe-odoo 726060c2dd [FIX] JS tours 2017-08-29 17:13:15 +02:00
tbe-odoo e05953d31e [FIX] payment_authorize/paypal: Fix tests 2017-08-29 17:13:15 +02:00
Xavier Morel 01e3514147 [FIX] P3: urllib, urllib2 and urlparse
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-05-15 12:26:30 +02:00
xmo-odoo b4429c2a91 [FIX] Various P3-related import changes
* 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
2017-04-28 09:06:53 +02:00
Nicolas Martinelli 100077f035 [FIX] payment_paypal: correctly parse payment_date
Paypal formats the payment date in this specific format:
`HH:MM:SS Mmm DD, YYYY PDT`.

Source: https://developer.paypal.com/webapps/developer/docs/classic/ipn/integration-guide/IPNandPDTVariables/

opw-693574
2017-01-06 14:27:17 +01:00
Raphael Collet 0783318f97 [FIX] adapt logger names 2016-09-02 17:28:13 +02:00
Christophe Simonis 523d3af131 [MERGE] forward port branch saas-12 up to 16d65a8 2016-07-29 17:55:21 +02:00
Christophe Simonis 529f88dbd3 [MERGE] forward port branch saas-10 up to 4ca04fd 2016-07-29 13:01:29 +02:00
Christophe Simonis 4af005456f [FIX] payment_paypal: adapt test following commit dbf44a9680
Note: the same test exits in 8.0, but is not executed (package not imported)
2016-07-28 13:01:57 +02:00
Shivam Dudhat f1ac1b1271 [MIG] payment_paypal: new API
No functional change.
2016-07-06 15:10:47 +02:00
Martin Geubelle 1d777d6d95 [IMP] payment, payment_*: acquirers installation
The installation of a new acquirer was a bit complicated : from settings,
check the acquirer, then apply (install the module) then list view of
acquirer and finally edit it in form view.

This needed to be simplified. The payment acquirers are pre-filled
in payment. From the kanban view an `Install` button installs and
redirects to the form field.
2016-03-10 13:41:07 +01:00
Damien Bouvy 526f27ddac [IMP] payment,payment_*,website_quote,website_sale: new rendering mechanism 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-09-04 16:08:22 +02:00
Deep Bundela f76c78d598 [IMP] payment_*: use standard fields to store tx information instead of adding specific fields for every.payment.provider 2015-09-04 16:08:22 +02:00
Xavier Morel 65cd4a2a33 [FIX] remove deprecated checks/fast_suite test attributes from standard modules 2015-01-15 14:31:40 +01:00
Denis Ledoux f085274d5f [MERGE] Forward-port of latest saas-3 bugfixes, up to rev. df0ae7e4d1 2014-05-28 14:53:32 +02:00
Denis Ledoux df0ae7e4d1 [FIX] payment_paypal: wrong handling fees computation formula 2014-05-28 14:02:56 +02:00
Thibault Delavallée ade618a63e [IMP] payment: renamed env field to environment, to avoid conflicts
with the incoming new API.

bzr revid: tde@openerp.com-20140416121055-01ygh1zer7cfv98a
2014-04-16 14:10:55 +02:00
Thibault Delavallée 0b69bad996 [RENAME] payment_acquirer_* -> payment_ *
bzr revid: tde@openerp.com-20140122175702-1h1e51z4njt4s70w
2014-01-22 18:57:02 +01:00