-
Notifications
You must be signed in to change notification settings - Fork 24.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[payment] Add extra fee to payment form #31730
Conversation
910cdc7
to
a70cda1
Compare
ec3a93e
to
ff32fe7
Compare
ff32fe7
to
4f4c99e
Compare
4f4c99e
to
5f2e772
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you rebase the branch + extract the text from the font awesome <i>
tag on those 2 lignes?
I know it is not related to your PR but since you are modifying the payment_tokens_list
template that would be nice to have.
Other than that it seems OK, I tested most flows
@@ -63,6 +63,12 @@ | |||
t-att-checked="acquirers_count==1 and pms_count==0 or acquirers[0] == acq"/> | |||
</t> | |||
<span class="payment_option_name" t-esc="acq.name"/> | |||
<t t-if="acq_extra_fees and acq_extra_fees.get(acq)"> | |||
<span class="badge badge-primary"> + <t t-esc="acq_extra_fees[acq]" t-options='{"widget": "monetary", "display_currency": acq_extra_fees["currency_id"]}'/> Fee </span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
badge-secondary
to fit other badge price style (eg variant extra on product page)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.!
<t t-if="acq_extra_fees and acq_extra_fees.get(acq)"> | ||
<span class="badge badge-primary"> + <t t-esc="acq_extra_fees[acq]" t-options='{"widget": "monetary", "display_currency": acq_extra_fees["currency_id"]}'/> Fee </span> | ||
</t> | ||
<t t-elif="acq.fees_active"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This elif
case was a bit mysterious when reading at first, can you confirm that it is needed for:
- Either special controller that would not set
acq_extra_fees
invalues
dict to render like the `/website_payment/pay' (that probably can't do it anyway since no currency). - Either for
payment.acquirer
that activatedfees
but did not overrideXX_compute_fees
, but such a case do not exists in standard Odoo code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -789,10 +789,6 @@ def extra_info(self, **post): | |||
# ------------------------------------------------------ | |||
|
|||
def _get_shop_payment_values(self, order, **kwargs): | |||
shipping_partner_id = False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
5f2e772
to
47b0029
Compare
47b0029
to
f283d05
Compare
Purpose of the task is when extra fee is activated on the payment acquirer, the customer is no warned about extra cost when choosing the payment acquirer. so display the extra fees on payment acquirer when doing the payment. Related Task ID : 1845815 Closes : odoo#31730
f283d05
to
a5f4181
Compare
So text do not inherit from font awesome font style
a5f4181
to
7532249
Compare
@robodoo r+ |
@robodoo r+ rebase-ff |
Merge method set to rebase and fast-forward |
I'm sorry, @JKE-be. This PR is already reviewed, reviewing it again is useless. |
Purpose of the task is when extra fee is activated on the payment acquirer, the customer is no warned about extra cost when choosing the payment acquirer. so display the extra fees on payment acquirer when doing the payment. Related Task ID : 1845815 Closes : #31730
So text do not inherit from font awesome font style closes #31730 Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
Merged, thanks! |
Description of the issue/feature this PR addresses:
Current behavior before PR:
Desired behavior after PR is merged:
--
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr