Commit Graph
40 Commits
Author SHA1 Message Date
Valeriya(vchu) 55a3b661dc [IMP] account_payment: set default bank journal on providers
Set the default value of provider's `journal_id` to the first compatible
bank journal, if such exists, to improve the user experience.

Part-of: odoo/odoo#138466
2023-10-18 18:27:28 +00:00
Anita (anko) 4d1a1f1c99 [IMP] payment, *: verify and reroute payment flows
This commit changes the way transactions linked to a document (sales
order, invoice...) are created in a payment flow. Rather than receiving
and trusting the transaction values from the controller, they are now
read from the linked document, and the payment flow is rerouted to use
the document's module's controllers instead of that of `payment`.

This ensures that no unexpected value can be passed to the `create`
method of a transaction, and simplifies the implementation of the
payment flows of linked documents.

task-3136240

closes odoo/odoo#126425

Related: odoo/enterprise#43212
Related: odoo/upgrade#5124
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-09-23 21:08:01 +00:00
7e012dd544 [IMP] payment, *: replace providers with payment methods in payment forms
Before this commit, the payment providers (e.g., Stripe, Adyen...)
available for payment were displayed on the payment forms. The customer
had to select one to process their payment. After that, the customer had
to select their preferred payment method (e.g., Credit Card,
Bancontact...) from a list of payment methods supported by the selected
provider over which the website administrator had close to no control.
This was making the payment forms confusing because the payment methods
were displayed sometimes more than once, if at all, in a non-controlled
order, and behind the selection of a payment provider that customers
should not have to deal with.

As the payment method was selected in an iframe or directly on the
provider's website, the information on the selection payment method was
not available in Odoo. This posed many problems, among which were the
impossibility of assessing whether a specific feature (e.g.,
tokenization, refunds, manual capture...) was available, not being able
to easily identify payment tokens through the payment method logo,
listing available payment methods on the website, sorting and
fine-grained configuration of the available payment method, subpar
payment method-specific display on the payment form (e.g., PayPal that
requires displaying a "Pay with PayPal" button), etc.

In this commit, the payment providers are thus replaced by the payment
methods on the payment forms. All contextually available (depending on
the country, currency, requested feature...) payment methods are
displayed one after the other on a single-level list and in the order
configured by the website administrator. Each payment method is
"powered by" (i.e., linked) to a single payment provider: the first one,
by model order, to support it. This allows, for example, offering the
PayPal payment method through Mollie, which charges low processing fees,
while also offering Klarna through Stripe, which supports more payment
methods but charges higher processing fees.

While doing so, the two different payment forms, "Checkout" and
"Manage", are also merged together in a new, configurable case-by-case,
payment form that is entirely redesigned to offer a better user
experience.

After payment, the information on the selected payment method is saved
on the transaction and eventual payment record and updated with the
information received from the provider.

task-2882677

closes odoo/odoo#120446

Related: odoo/upgrade#5103
Related: odoo/documentation#5717
Related: odoo/enterprise#40666
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Co-authored-by: Anita (anko) <anko@odoo.com>
Co-authored-by: Brieuc-brd <brd@odoo.com>
Co-authored-by: Valeriya (vchu) <vchu@odoo.com>
2023-09-22 13:32:53 +00:00
prye-odoo 1c16fb7844 [FIX] account_payment: uninstall payment provider(s) with payment line
When the user uninstalls a payment provider module(s) and there are some
transaction lines linked with the 'account.payment.method' record(s),
It will throw the "ForeignKeyViolation" traceback. This commit raised the
UserError message.

Steps to produce (Example only):
- Install website_sale module.
- Go Invoicing > Configuration > Payments > Payment Providers
- Search "PayPal" and install it, open it, and fill up the credentials tab.
- Create an order from the website and pay with PayPal.
- Go to the Apps menu and search the "payment_paypal" module and try to
uninstall it.
After that traceback will be generated.

Error: update or delete on table "account_payment_method" violates
foreign key constraint "account_payment_method_line_payment_method_id_fkey" on
table "account_payment_method_line"

sentry-4261586022

[WIP]payment_provider raise msg improvement

closes odoo/odoo#132251

X-original-commit: 9eb5ea9746cf277f09f5258dbc276162280b275b
Signed-off-by: Florian Gilbert (flg) <flg@odoo.com>
2023-08-21 12:39:33 +02:00
william-andre 0479b2b594 [IMP] account,*: manage subsidiary companies
Allow sharing records between company
* accounts
* taxes
* fiscal positions
* products
* ...and some related models

These records can be read and used in children companies.

This can be used to
* have different branding for different businesses
* allow more complex security rules
* consolidate branches differently
* manage different tax reports with different tax ids in the same
  country

task-3371677

closes odoo/odoo#125642

Related: odoo/enterprise#43215
Signed-off-by: Quentin De Paoli <qdp@odoo.com>
2023-07-20 11:49:06 +02:00
Victor Feyens fd2fb212c5 [IMP] payment: allow custom providers to follow standard payment logic
* Generate account payments (and require a journal)
* Be displayed as their custom mode instead of always 'Custom'
...

Commit also includes some side bugfixes/cleanup

task-3347338

closes odoo/odoo#126929

Related: odoo/enterprise#43418
Related: odoo/upgrade#4944
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-07-20 03:56:19 +02:00
Claire Bretton (clbr) 3d895b9f87 [FIX] payment: fix constraint on account.payment.method.line
Change a constraint that was meant to prevent deletion of an
account.payment.method.line when related provider is in 'enabled'
or 'test' state. The constraint is now handled only on the payment method
lines that are actually modified, and not on everything like previously.
This constraint was failing during upgrades because it was too broad,
its initial purpose was to raise error to user at the moment he tries
to remove payment method lines from its journals.

closes odoo/odoo#128214

X-original-commit: fca76bcc6c8be6e38827641555d62ab2973ab1fe
Signed-off-by: Laurent Smet (las) <las@odoo.com>
Signed-off-by: Claire Bretton (clbr) <clbr@odoo.com>
2023-07-12 09:15:09 +02:00
Florian Charlier 77f9ff50db [REF] *: use onboarding module
* = account{_payment}, base, onboarding, payment{_stripe},
sale{_management}, web, website_sale

Use the dedicated onboarding module introduced in 16.0 instead of
the res.company model to store onboarding progress.

It allows
 * onboarding steps to be reused across panels
 * to support steps that should be completed per-database or per-company
 * to clean the res.company model from many fields and methods,
 * to remove many views, controllers, actions

Module-specific notes:
* account: We also clean the remaining two steps that are not
part of an accounting panel but make the most sense to be kept here.
* account_payment: Following 8e4e8eb8, the payment provider step is
added to the invoicing onboarding panel. We apply this change here too.
Also impacts the website_sale_dashboard panel (see related ENT PR).
(The "sale tax" one is currently used for to the website sale dashboard).
* payment: Note that the step was already not part of an onboarding
panel within this module.
* website_sale: We clean
  * a field not used (The website_sale dashboard onboarding panel used
  the payment_provider_onboarding_state field).
  * a method that was only called from website_sale_dashboard, so it is
  moved there. See related ENT PR.

Includes a few tests.

Moving views/templates/styling, as well as cleaning residual onboarding-related fields and methods in base, including populate.

This also includes restoring the "onboarding_complete" overlay panel
animating it to disappear after a few seconds so that it doesn't hide
text and block buttons to re-open steps.

Task-3025136

Part-of: odoo/odoo#104223
2023-06-30 23:37:50 +02:00
Horacio Tellez 2b1e2abda3 [IMP] payment,*: restrict access to payment.transaction records
Since 15.0, it is no longer possible to have partnerless transactions.
Nonetheless, migrated databases could contain transactions without a
`partner_id` set.
This commit cleans existing rules to make those transactions are not
accessible to unwanted users.

We take the opportunity to clean the security of payment.transaction
records globally.
Now only admin and accounting users have access to payment.transaction
records. The code of different applications has been adapted accordingly.

Task - 3102824

closes odoo/odoo#113515

Related: odoo/upgrade#4564
Related: odoo/enterprise#40939
Signed-off-by: Masereel Pierre <pim@odoo.com>
2023-05-15 15:07:13 +02:00
Anita (anko) 8e4e8eb81a [IMP] account_payment: add payment onboarding step
To improve onboarding experience, configuring Stripe
has been added in Invoice onboarding process.
For db with other apps(ecommerce or sales) if onboarding is
done in one place it is considered done in other places with
exclusion of Sales, unless it was done in Sales.

task-3208045

closes odoo/odoo#114131

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-05-03 12:39:08 +02:00
Rémy Voet (ryv) 234db70d86 [IMP] *: Use the new API of _read_group for backend use
Part-of: odoo/odoo#110737
2023-04-19 21:58:27 +02:00
Martin Trigaux 69f911d994 [IMP] *: enforce usage of Markup in mail
When using message_post, the body format must be explicitly specified.
If html is expected, a Markup object should be used.
If text is given, the content will be escaped.

Before this PR:
message_post was unaware if the content of a message was HTML or
text. This lead to multiple situation where the content was
incorrectly considered as HTML and led to display errors.
In
  self.message_post(body="Hello %s!" % self.name)
if the name contained HTML, it would be evaluated.

In
  self.message_post(body="Contact Raoul <raoul@caramail.be>")
the email would not be displayed as considered as unknown HTML and
discarded by the sanitizer

Now each call must explict the type of content.
Use the escape() helper to properly combine Markup and translations.
It would also be acceptable to use Markup() to wrap a static
translation but escape is better as one can not guarantee the content
of a translation.

closes odoo/odoo#111850

Related: odoo/documentation#3612
Related: odoo/enterprise#36728
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2023-04-13 16:39:48 +02:00
Victor Feyens bd0a6f9667 [IMP] account(_payment): simplify portal templates
The logic to display the payment status of invoice(s) has been quite
messy for a long time, leading to a lot of confusion and some bugfixes.

This commit tries to simplify and harmonize the logic, and to provide
a clear logic and ordering of the payment states, following
1) the invoice state (cancelled state)
2) the accounting state (related to `account.payment` records and logic)
3) the payment state (related to `payment.transaction` records, holding
states not reflected in accounting logic until effectively confirmed).

closes odoo/odoo#111046

Related: odoo/upgrade#4409
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-03-09 15:54:35 +01:00
Victor Feyens d86238d0a8 [MOV] acc_pay_patch->acc_pay: merge bugfix module
The module ´account_payment_invoice_online_payment_patch´ was added in stable to allow
account_payment users to disable online invoice payment
(without removing the module, critical for other flows).

It can be safely merged into the account_payment module for future versions.

Original bugfix PR: #110177
Related to opw-3114860

Part-of: odoo/odoo#111046
2023-03-09 15:54:34 +01:00
Demesmaeker 7f2ae9ed5b [IMP] payment(_adyen): allow partial capture
Before this commit, it was not possible to partially capture a
transaction from Odoo, and doing so in the provider backend would often
result in a full capture in Odoo when capture was supported.

With this commit, partial captures are made available in Odoo directly
from the sales order or invoice, for providers that support them.
Provider can either only support full capture or also support partial
ones. It also optionally managed the automatic void of the remaining
amount at the user request when multiple captures are supported by the
provider.

As of now, the only acquirer allowing partial capture is Adyen.

task-2728768

closes odoo/odoo#87251

Related: odoo/enterprise#35205
Related: odoo/documentation#2063
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-03-09 10:51:29 +01:00
Hansun (hale) 415a8b11a1 [FIX] account: control account payment creation
1. Install [Studio], [Accounting] on Apps
2. Enter [Accounting]
- Click the Studio icon second to left on the top right corner
- [Edit Menu]
- [NEW MENU]
- Fill in e.g.`Test`, select [Existing Model], Model: Payment Methods
- Click the icon on the right, check it is `account.payment.method`
- [SAVE & CLOSE]
- [CONFIRM]
- [CLOSE]
3. Click on `Test` menu created next to [Configuration]
- [NEW]
- Type in all info, click to Save
- Error is thrown

Desired: block users from creating a `payment.method` by all means

Impacted versions: 14-master

opw-3148453

closes odoo/odoo#114408

X-original-commit: 59ea0e9802fc9cf98bab8fbdc065d9b5fc023ac7
Signed-off-by: Brice Bartoletti (bib) <bib@odoo.com>
Signed-off-by: Lee, Hansun (hale) <hale@odoo.com>
2023-03-07 02:00:15 +01:00
Anita (anko) 1d846c36d9 [IMP] payment(_*): allow specifying extra allowed states
Some providers require additional allowed states due to their refund or
transaction process justifying it. Until now, these extra states were
specified in the `payment` module, which was not ideal as it allowed
every provider in every flow to accept these additional states.

With this commit, additional states are now specified only in the
coresponding flow of a provider that requires them.

task-2869678

closes odoo/odoo#107110

Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-02-24 18:16:00 +01:00
Horacio Tellez 0f2de18849 [IMP] payment: only give access to tokens when required by the flow
Until this point the access to tokens was somehow arbitrary and
illogical.
After this commit we will uniformize the tokens access rule where by
default an user can only access its own tokens by default and in
function of the use case then relax the rules.

Task - 2832561

closes odoo/odoo#104808

Related: odoo/enterprise#33541
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-02-17 13:06:53 +01:00
Victor Feyens 35e474b615 [FIX] account_payment: allow disabling payment of invoices on portal
Since e3eb7d9bef, the accounting logic
has been moved out of the payment module, to be only in the
account_payment bridge module.

This bridge module has been set as strict dependency of
module providing payment & invoicing abilities, e.g. sale .

Nevertheless, the account_payment module also held the logic to
allow users to pay for their invoices on the portal and there
was no dedicated setting to enable/disable this feature.
This means that in 16.0+, you cannot disable online invoices
payment without removing sale and subsequent modules.

This commit introduces a temporary bugfix module to allow
disabling invoices payment without uninstalling the
account_payment module.  It will be merged in the core
account_payment afterwards.

opw-3114860

closes odoo/odoo#110843

X-original-commit: be242cf658e7742600dec4824ba96a89f4d6142a
Related: odoo/documentation#3396
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2023-01-24 16:18:33 +01:00
Valentin Vallaeys (vava) 90af85c2e4 [IMP] payment(_*): show available currencies for payment providers
Before this commit, the lists of supported currencies by payment
provider were hard-coded in the Python scripts, which made them
unavailable to the users.

With this commit, the implemented initial lists of supported currencies
are displayed on the form view and are editable, because Odoo lists may
not be up-to-date. Empty lists do not trigger any filtering on the
payment providers to access payment methods.

For Authorize.net and Asiapay payment providers, the specific
`(authorize,asiapay)_currency_id` are removed and the generic payment
provider field `available_currency_ids` is restricted to a single-item
list when one of those providers is enabled.

task-2926016

closes odoo/odoo#101018

Related: odoo/enterprise#34158
Related: odoo/documentation#2788
Related: odoo/upgrade#4069
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
2023-01-05 16:51:56 +01:00
momegahed 636601c4a4 [FIX] payment: user is able to delete linked journals
Steps to reproduce:

1- install any payment acquirer (e.g. stripe)
2- configure the payment acquirer and link it to a journal
3- try to delete the journal
4- the journal can be deleted which will create an internal server
error when this payment acquirer is used

Bug:

There is no restriction on deleting `account.journal` linked to
payment acquirers

Fix:

add a restriction that forces the user to remove the journal from the
payment acquirers first

OPW-3089006

closes odoo/odoo#108403

X-original-commit: 3ec6fe4ab1df3e3368fd06ff0e18a240caf088e5
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Signed-off-by: Mohamed Megahed Abbas Megahed SALLAM (mome) <mome@odoo.com>
2022-12-21 15:35:53 +01:00
Goffin Simon 4be998412a [FIX] payment: Wrong use of write method on not stored field
Steps to reproduce the issue:

- Accounting > Configuration > Journals
- Click on Journal
- View metadata of Journal

Bug:

Even if no modification has been made to the journal, it marked current time
in Latest Modification By/Date

opw:3089551

closes odoo/odoo#107875

X-original-commit: 47999e7b1c9a52059f84abaafeac388f2991a621
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-12-13 19:11:22 +01:00
Antoine Vandevenne (anv) 78dee0874c [IMP] payment_demo: store a dummy provider reference on transactions
As provider references are included in the memo of `account.payment`
records, it makes sense to set one on demo transactions to mimic what
is done with other providers.

task-3063368

closes odoo/odoo#106486

X-original-commit: 73865f2bd03c7d224f0a64659652e8e40c4ba192
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Horacio Tellez Perez (hote) <hote@odoo.com>
2022-11-29 17:22:54 +01:00
Horacio Tellez 376ad4a429 [IMP] account_payment: Better reference for account payment memos
The Memo field in the form view of the `account.payment` model
(the `ref` field) was a little cryptic and did not supplied a lot
of information about the payment.
After this commit the Memo will (if available) provide information
about the sales order, the partner and the payment transaction.

Task - 3063368

X-original-commit: 414fb09b718a100cb96857725523e7a9109135cf
Part-of: odoo/odoo#106486
2022-11-29 17:22:53 +01:00
Valentin Vallaeys (vava) 6fc58cd0c6 [IMP] payment: remove duplicate chatter message
The confirmation message for the sale order appeared twice in the
chatter: first with the confirmation and second with the posted payment.
The second message is now rephrased in order to avoid any confusion for
the user (no double payment).

task-2965158

closes odoo/odoo#101921

X-original-commit: c1faff69db2a66e249bfbc5ea77644da0957d401
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
Signed-off-by: Vallaeys Valentin (vava) <vava@odoo.com>
2022-10-03 15:19:16 +02:00
Valentin Chevalier 2dc5bf555f [IMP] account_payment, sale: log messages with superuser
When payment providers receive a notification from a webhooks and log
something in the chatter of transactions, sale orders or invoices, the
message is shown as from 'Public User'.

Now, all messages will be logged as 'OdooBot'.

Part-of: odoo/odoo#100186
2022-09-19 08:38:11 +02:00
Valentin Chevalier 757a8a9c69 [FIX] account_payment: transfer provider code doesn't exists anymore
Fine-tuning of 61b8c0c1a2.

Missing rename of `transfer` to `custom` following commit 5f41f15.

Part-of: odoo/odoo#99846
2022-09-09 18:53:53 +02:00
Horacio Tellez f7b8f07501 [IMP] payment: rename of acquirer to provider
Changing the name of model payment.acquirer to payment.provider
and everything that it touches. It is technically incorrect to
use the term "acquirer" for systems that only provide a service
of payment.
After this commit the model payment.acquirer and all related to
it will be renamed to payment.provider.

Task - 2842088

closes odoo/odoo#90899

Related: odoo/upgrade#3542
Related: odoo/documentation#1981
Related: odoo/enterprise#27131
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2022-09-09 13:38:08 +02:00
Victor Feyens 3ae178780c [FIX] account_payment: do not check journals for custom acquirers 2022-09-06 14:14:07 +02:00
Victor Feyens 61b8c0c1a2 [REF] (account_)payment: extract accounting logic from payment 2022-09-06 13:31:00 +02:00
Antoine Vandevenne (anv)andVictor Feyens 573ed74c12 [REF] payment, *: refactor online payments API
This commit replaces the old online payments API of the `payment`
module with the new one and adapts to it all the implementing modules.

See the merge commit for more details.

task-2085989
task-2119838
task-2165982
task-2289255

Co-authored-by: Victor Feyens <vfe@odoo.com>
2021-03-30 09:25:51 +02:00
Thibault Francois c78bfb1da9 [FIX] account_payment: send amount in right currency
While sending payment request to acquirer
the amount used was the amout_residual_signed

This amound is in the currency of the company
and may be negative.

The currency send to the acquirer is the
currency on the invoice so you expect the
amount to be in the same currency and
being positive

amount_residual is exactly that amount

Solution: user amount_residual
          instead of amount_residual_signed

closes odoo/odoo#46082

X-original-commit: 1d1d5e27b4ad9f5ecbca60d8dacd4620d25dda99
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-02-24 11:50:06 +00:00
Johan Demaret Rivarola 54eddda79a [FIX] account_payment: post accounting-pocalypse aftermath
Some leftovers of
https://github.com/odoo/odoo/commit/beaa30a3d1843de43a45f419bfbc1bfa7613a920.

Fields have been renamed according to the following mapping:

residual_signed -> amount_residual_signed
reference       -> ref

State 'open' does not exist anymore, use 'posted' and combine it with
'invoice_payment_state' instead.
2019-07-11 09:32:41 +00:00
Nicolas Martinelli df3922f396 [FIX] account_payment: partial payment
- Activate Invoice Online Payments
- Create an invoice for 2000, make a partial payment of 500.
- Send the portal link to the client
- Open the portal link => the amount due is 1500
- Pay the invoice

The amount to pay is 2000 instead of 1500.

opw-1909118

closes odoo/odoo#29284
2018-12-06 07:17:12 +00:00
Toufik Benjaa 6ed44181d0 [IMP] payment_*: payment acquirers error handling
This commit aims to improve the user experience when using payment acquirers. There currently are no error feedback with some acquirers, which leaves the user wondering what is going on and what is the real status of its payment.
In some cases, the user is currently being redirected to the home page even though the payment has failed. We want to make it more obvious to the user that something unexpected has happened by redirecting to an intermediate page that will provide good feedback on payments status.

Another goal of this commit is to order acquirers by sequence instead of by flow and to select the first acquirer by default. This feature was already implmented in commit fe294fd43e521bd2d339e962f43acf46c3d4cb97, some UI adaptations were needed though.

Related to task #36680
Closes #26958
2018-09-19 18:25:32 +02: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
Nikunj Ladava cbd395ec36 [IMP] payment, sale_payment: set invoice id in payment transaction form after payment being done from sale order.
Until now invoice_id is filled on the transaction only when we make
payments through invoice. However if we make payments through sale order
then invoice_id is not filled.

This commit fixes that issue. As there is no common point between
sale_payment and account_payment except payment, a void method is added
in payment and an override done in account_payment. That was when both
modules are installed code is correctly triggered.

This commit is related to task ID 1813602. Closes #22746 .
2018-03-20 16:16:27 +01:00
Christophe Simonis 42264d8dcb [MERGE] forward port branch saas-16 up to 5d7ad2b16c 2017-11-30 18:43:08 +01:00
Thibault Delavallée 01f69f65fe [IMP] account_payment: add invoice payment support in customer portal
This commit adds support of payment in the account customer portal. This
is done in the account_payment module. This way customers can now pay
invoices directly on the customer portal and have access to the status
of their invoices. It replaces the old website payment mechanism that
was only allowing to pay without generating payments and reconciliating
them.

Two routes are defined in this commit, one for form-based payments and
one for server2server-based payment. Please refer to commit 1fdb10f0ac
for more details about the new payment form.

Tools methods are added to handle transaction / invoice matching, the
check of invoice and the automatic payment and reconciliation.
2017-09-06 11:41:25 +02:00
Thibault Delavallée 699aa47b00 [IMP] account_payment: add invoice / transaction link
Purpose of this commit is to add a link between invoices and transactions
to store payment data like what is already done for sale orders.

 * add payment_tx_id on account.invoice model that stores the last
   transaction; also add the acquirer related on the tx;
 * add a stat button on invoice with links to all transactions linked
   to that invoice;
 * add account_invoice_id on payment.transaction model that stores the
   link to the invoice;
 * add the inverse one2many from invoice to all its transactions so
   that we can browse them if necessary;
2017-09-06 10:49:03 +02:00