Skip to content

Commit 4ad6fb5

Browse files
committed
[IMP] update for mollie_pos_terminal and payment_mollie_official
mollie_pos_terminal v18.0.0.1 - fixed issue of default customer not being set - fixed issue of payment refund directly from the terminal - fixed websocket issue - fixed payment lines issue in debug mode payment_mollie_official v18.0.0.1 - added support to capture authorized payment manually and automatically - added support for auto set delivered quantity for shipping lines when picking confirmed - improvements for ideal2 support
1 parent 32491dd commit 4ad6fb5

File tree

21 files changed

+397
-30
lines changed

21 files changed

+397
-30
lines changed

mollie_pos_terminal/__manifest__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
'name': 'Mollie Pos Terminal',
3-
'version': '18.0.0.0',
3+
'version': '18.0.0.1',
44
'description': '',
55
'summary': 'Connect your pos with mollie terminal',
66
'author': 'Mollie',

mollie_pos_terminal/models/pos_payment_method.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ class PosPaymentMethod(models.Model):
1111
mollie_latest_response = fields.Json('History', default={})
1212
mollie_payment_default_partner = fields.Many2one('res.partner')
1313

14+
@api.model
15+
def _load_pos_data_fields(self, config_id):
16+
result = super()._load_pos_data_fields(config_id)
17+
result += ['mollie_payment_default_partner']
18+
return result
19+
1420
def _get_payment_terminal_selection(self):
1521
return super(PosPaymentMethod, self)._get_payment_terminal_selection() + [('mollie', 'Mollie')]
1622

mollie_pos_terminal/models/pos_session.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@
66
class PosSession(models.Model):
77
_inherit = 'pos.session'
88

9-
def _loader_params_pos_payment_method(self):
10-
result = super()._loader_params_pos_payment_method()
11-
result['search_params']['fields'].append('mollie_payment_default_partner')
12-
return result
13-
149
def _create_split_account_payment(self, payment, amounts):
1510
payment_aml = super()._create_split_account_payment(payment, amounts)
1611
if payment and payment.payment_method_id.use_payment_terminal == 'mollie':

mollie_pos_terminal/static/description/index.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,18 @@ <h1 style="color: #000;font-weight: bold;/* font-size: 50px; */" class="mt-5 tex
201201
<span style="width:73px;height: 10px;display:inline-block;border-radius: 4px;background-color: #0077ff;"> </span>
202202
</div>
203203

204+
<div class="card mx-auto w-md-75">
205+
<div class="card-header bg-200">
206+
<h4 class="m-0">v18.0.0.1</h4>
207+
</div>
208+
<div class="card-body">
209+
<div> <b class="text-danger"> FIX </b> Improvement in default customer for order. </div>
210+
<div> <b class="text-danger"> FIX </b> Fixed error for payment refund directly from the terminal. </div>
211+
<div> <b class="text-danger"> FIX </b> Websocket improvement based on odoo's update. </div>
212+
<div> <b class="text-danger"> FIX </b> Fixed payment lines issue in debug mode. </div>
213+
</div>
214+
</div>
215+
204216
<div class="card mx-auto w-md-75">
205217
<div class="card-header bg-200">
206218
<h4 class="m-0">v18.0.0.0</h4>

mollie_pos_terminal/static/src/app/payment_mollie.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export class PaymentMollie extends PaymentInterface {
107107
if (order.get_selected_paymentline().amount < 0) {
108108
let refundOrderId = false;
109109
for (let line of order.lines) {
110-
refundOrderId = line?.refunded_orderline_id?._raw?.order_id || false;
110+
refundOrderId = line?.refunded_orderline_id?.raw?.order_id || false;
111111
if (refundOrderId) {
112112
break;
113113
}

mollie_pos_terminal/static/src/app/pos_store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { PosStore } from "@point_of_sale/app/store/pos_store";
66
patch(PosStore.prototype, {
77
async setup() {
88
await super.setup(...arguments);
9-
this.onNotified("MOLLIE_TERMINAL_RESPONSE", () => {
9+
this.data.connectWebSocket("MOLLIE_TERMINAL_RESPONSE", () => {
1010
let pendingLine = this.getPendingPaymentLine("mollie");
1111
if (pendingLine) {
1212
pendingLine.payment_method_id.payment_terminal.handleMollieStatusResponse();

mollie_pos_terminal/static/src/overrides/components/payment_screen/payment_screen.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,19 @@
22

33
import { _t } from "@web/core/l10n/translation";
44
import { PaymentScreen } from "@point_of_sale/app/screens/payment_screen/payment_screen";
5+
import { PaymentScreenPaymentLines } from "@point_of_sale/app/screens/payment_screen/payment_lines/payment_lines";
56
import { patch } from "@web/core/utils/patch";
67
import { onMounted } from "@odoo/owl";
78
import { AlertDialog, ConfirmationDialog } from "@web/core/confirmation_dialog/confirmation_dialog";
89
import { markup } from "@odoo/owl";
910

11+
patch(PaymentScreenPaymentLines, {
12+
props: {
13+
...PaymentScreenPaymentLines.props,
14+
sendMollieStatusCheck: { type: Function, optional: true },
15+
},
16+
});
17+
1018
patch(PaymentScreen.prototype, {
1119
setup() {
1220
super.setup(...arguments);
@@ -34,12 +42,11 @@ patch(PaymentScreen.prototype, {
3442
);
3543

3644
mollieLine = this.currentOrder.payment_ids[0];
37-
3845
if (mollieLine
3946
&& mollieLine.payment_method_id.split_transactions
4047
&& mollieLine.payment_method_id.mollie_payment_default_partner
4148
&& !this.currentOrder.get_partner()) {
42-
var partner = this.pos.db.get_partner_by_id(mollieLine.payment_method_id.mollie_payment_default_partner[0]);
49+
var partner = mollieLine.payment_method_id.mollie_payment_default_partner['id']
4350
this.currentOrder.set_partner(partner);
4451
}
4552

@@ -61,7 +68,7 @@ patch(PaymentScreen.prototype, {
6168
async addNewPaymentLine(paymentMethod) {
6269
let refundOrderId = false;
6370
for (let line of this.currentOrder.lines) {
64-
refundOrderId = line?.refunded_orderline_id?._raw?.order_id || false;
71+
refundOrderId = line?.refunded_orderline_id?.raw?.order_id || false;
6572
if (refundOrderId) {
6673
break;
6774
}

payment_mollie_official/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22

33
from . import controllers
44
from . import models
5+
from . import wizard

payment_mollie_official/__manifest__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{
44
'name': 'Mollie Payments Extended',
5-
'version': '18.0.0.0',
5+
'version': '18.0.0.1',
66
'category': 'eCommerce',
77
'license': 'LGPL-3',
88
'author': 'Mollie',
@@ -15,17 +15,19 @@
1515
""",
1616

1717
'depends': [
18-
'payment_mollie', 'product', 'account'
18+
'payment_mollie', 'product', 'account', 'base_automation'
1919
],
2020
'external_dependencies': {},
2121
'data': [
22+
'data/cron.xml',
2223
'security/ir.model.access.csv',
2324
'views/payment_views.xml',
2425
'views/payment_transaction.xml',
2526
'views/payment_method.xml',
2627
'views/payment_mollie_templates.xml',
2728
'views/account_move_view.xml',
2829
'views/account_payment_register.xml',
30+
'wizard/payment_capture_wizard_views.xml',
2931
],
3032

3133
'assets': {

payment_mollie_official/controllers/main.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ def _validate_transaction_kwargs(kwargs, additional_allowed_keys=()):
1313
if kwargs.get('provider_id'):
1414
provider_id = request.env['payment.provider'].sudo().browse(int(kwargs['provider_id']))
1515
if provider_id.code == 'mollie':
16-
additional_allowed_keys += ('mollie_card_token', 'mollie_payment_issuer', 'mollie_save_card')
16+
if isinstance(additional_allowed_keys, tuple):
17+
additional_allowed_keys += ('mollie_card_token', 'mollie_payment_issuer', 'mollie_save_card')
18+
if isinstance(additional_allowed_keys, set):
19+
additional_allowed_keys.update(['mollie_card_token', 'mollie_payment_issuer', 'mollie_save_card'])
1720
super(MolliePaymentPortal, MolliePaymentPortal)._validate_transaction_kwargs(kwargs, additional_allowed_keys=additional_allowed_keys)
1821

1922
def _create_transaction(

0 commit comments

Comments
 (0)