Commit Graph
22 Commits
Author SHA1 Message Date
Nasreddin Boulif (bon) 0e50113f69 [FIX] base,l10n_ch,account_qr_code_sepa,payment,websitesale: Display all QR codes in QR bill
Issue:

  When trying to print a Suisse QR bill, if multiple images are presents
  in document and they have a url as src, some pictures will not be
  displayed.
  (Same issue may occur with simple QR code)

Cause:

  It's a known issue with wkhtmltopdf: https://github.com/odoo/odoo/commit/2949138a7d84cd6c925ea1745d62f25ef077bb8b
  Also, adding css class to body by js break wkhtmltopdf.

Solution:

  Replace link by base64 image value (use a function to retrieve base64
  image instead of image_url).
  Remove class 'l10n_ch_qr' added by js (no need since CSS file didacted
  to this report).

  Move `_get_qr_code_base64` and `_get_qr_code_url` logic/flow
  (since generic) to account module.
  Move specific logic like `_get_qr_vals` and
  `_get_qr_code_generation_params` to specific module (ex: l10n_ch).

  extra: Alter some css for better rendering + update unitest.

opw-2620082

closes odoo/odoo#77643

X-original-commit: 699b6eeac993e3a8d97ae7949170f7e18ca05831
Signed-off-by: Olivier Colson <oco@odoo.com>
2021-11-08 09:25:47 +00:00
Nicolas (vin) 04522f01e6 [IMP] account: allows multiple payment acquirers on a journal.
Users may want to be able to have transactions coming from multiple
payment acquirers to be registered in the same journal.

This will allows that.

Task id #2414749

closes odoo/odoo#67331

Related: odoo/upgrade#2500
Related: odoo/enterprise#17258
Signed-off-by: William André (wan) <wan@odoo.com>
2021-06-03 10:00:26 +00:00
Xavier Morel 8d2a8ff2c3 [FIX] payment: de-t-raw-ify
The *_msg fields are HTML fields so there's no reason to do anything.

A few of the values are a bit more debatable though:

* Thanks_msg seems pretty much never used?
* The `message` value comes from `state_message`, looking at how
  that's set it doesn't seem like there's any reason for it to ever
  contain markup?
2021-04-29 05:34:21 +00:00
Kevin Baptiste aa514acf13 [REF] payment_transfer: migrate Wire Transfer to the new payment API
See the merge commit for more details.

task-2333044
2021-03-30 09:25:51 +02:00
Victor FeyensandWilliam Andre 9940bdb32a [REF] payment : messaging and payment display
Co-Authored-By: William Andre <wan@odoo.com>
2019-08-12 08:45:50 +00:00
qsm-odoo 7f10b55a50 [REF] *: BS4, adapt display classes
The system completely changed. I also had to adapt classes to new
screen breakpoints.

hidden/hide -> d-none
show -> d-block
hidden-xs -> d-none d-md-(block/inline/...)
hidden-sm -> d-md-none d-lg-(block/inline/...)
hidden-md -> d-lg-none d-xl-(block/inline/...)
hidden-lg -> d-xl-none
visible-xs-* -> d-* d-md-none
visible-sm-* -> d-none d-md-* d-lg-none
visible-md-* -> d-none d-lg-* d-xl-none
visible-lg-* -> d-none d-xl-*
hidden-print -> d-print-none
visible-print-* -> d-none d-print-*
...
and all possible combination of those had to be handled too.
2018-07-27 12:36:54 +02:00
tbe-odoo be650c5979 [IMP] Fixing the code to fit the reviews 2017-08-29 17:16:42 +02:00
tbe-odoo bb96c73da0 [IMP] payment: Removed transfer button & fixed custom payment 2017-08-29 17:16:42 +02:00
tbe-odoo d01ab606bc [FIX] payment_transfer: Reintroduced the button template 2017-08-29 17:13:58 +02:00
tbe-odoo 1d6e848f10 [IMP] payment acquirers: Cleaning the code 2017-08-29 17:13:15 +02:00
tbe-odoo 3c062d9345 [IMP] website_sale: Added S2S payment with new payment form
- Added the support of form payment.
- Fixed payment form's errors not being displayed.
- Fixed a crash when paying on e-commerce with a saved token.
(dev commit, need to clean the code)
2017-08-29 17:11:23 +02:00
tbe-odoo 80edbe5dff [ADD] payment: Added data for payment options
- Added the most used payment option (credit cards) in the world and assigned which payment acquirers can use them.
- Added the form templates for each payment acquirer.
2017-08-29 17:11:23 +02:00
Yannick Tivisse 4aa2fad313 [IMP] payment: Remove auto_confirm field and simplify views.
PURPOSE
=======

The field auto_confirm is complicated to understand for common users. Furthermore, on of its options is only useful for authorize module.

SPECIFICATION
=============

Remove the auto_confirm field. The destinies of its options are the following:
- none: Simply disappear.
- authorize: Become capture_manually. It has nothing to do with the auto_confirm field has it's related to the autorize module (And could be extended to other payment acquirers too).
- confirm_so: Remove it. Will be automatic, and we will always validate the sales order and generate the accounting entries on acquirer validation.
- generate_and_pay_invoice: Is linked to the journal_id. The field journal_id is always set and we will use it to validate the sales order and generate the accounting entries on acquirer validation.

Bonus: website_sale: Allow to create/validate invoice automatically on `Mark as Paid`
2017-06-02 15:31:47 +02:00
Thibault Delavallée f0abe5b0ed [IMP] payment_transfer: hide unnecessary fields for transfer provider
Indeed as transfer transactions are always pending and independant of
any callback, it is not necessary to see credentials, auto confirmation
settings and error / cancel / done messages.
2017-05-16 15:35:11 +02:00
Thibault Delavallée 48278ed395 [MIG] payment_transfer
No functional change.
2016-07-06 15:10:49 +02:00
Thibault Delavallée 1d227799ac [MOV] payment_transfer: file organization 2016-07-06 15:10:49 +02:00
Christophe Simonis 7636b510a2 [ADD] *: CSRF protection in forms and routes
* make CSRF protection the default on all non-SAFE methods
  note: there currently is no way to call a CSRF-protected endpoint
  without a form-encoded entity-body as that's the only place we get the
  CSRF token from.
* simple CSRF token generation: just use the HMAC'd session id, no
  generating a new random token per session then HMAC it
* use constant-time equal function to avoid timing attacks
* assert that a database secret is configured before hashing/validating
  the CSRF token
* opt-out database manager from CSRF: The super-admin password serves
  the purpose of a CSRF token in the database manager screens.
  There is no request database to obtain the
  secret and generate a CSRF token.
2015-10-01 01:36:50 +02: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
Thibault Delavallée a6379e2e67 [IMP] payment addons: fixed submit buttons: now have type=submit (and not image or nothing) and removed name, because this may cause issues when trying to submit a form manually with type=submit and a name. Also improved js code in website_sale to correctly handle the click binding, the asynchronous call to the server to create the transaction, and then submit the form. As form submission is synchronous in javascript, we cannot use the deferred. Instead we prevent the click event from bubbling, wait for the server to create the transaction, adn then manually submit the form. 2014-05-27 11:35:32 +02:00
Christophe Matthieu b25a34ea94 [FIX] website_sale: payment if free
bzr revid: chm@openerp.com-20140128163815-ksds4a7zox84glv8
2014-01-28 17:38:15 +01:00
Thibault Delavallée cc793480fc [IMP] payment: renamed message in pre_msg, msg displayed before
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
2014-01-24 14:46:52 +01:00
Thibault Delavallée 0b69bad996 [RENAME] payment_acquirer_* -> payment_ *
bzr revid: tde@openerp.com-20140122175702-1h1e51z4njt4s70w
2014-01-22 18:57:02 +01:00