mirror of
https://github.com/bringout/oca-ocb-pos.git
synced 2026-04-23 21:01:59 +02:00
Initial commit: Pos packages
This commit is contained in:
commit
95dfb9edb0
1301 changed files with 264148 additions and 0 deletions
|
|
@ -0,0 +1,29 @@
|
|||
odoo.define('pos_adyen.models', function (require) {
|
||||
const { register_payment_method, Payment } = require('point_of_sale.models');
|
||||
const PaymentAdyen = require('pos_adyen.payment');
|
||||
const Registries = require('point_of_sale.Registries');
|
||||
|
||||
register_payment_method('adyen', PaymentAdyen);
|
||||
|
||||
const PosAdyenPayment = (Payment) => class PosAdyenPayment extends Payment {
|
||||
constructor(obj, options) {
|
||||
super(...arguments);
|
||||
this.terminalServiceId = this.terminalServiceId || null;
|
||||
}
|
||||
//@override
|
||||
export_as_JSON() {
|
||||
const json = super.export_as_JSON(...arguments);
|
||||
json.terminal_service_id = this.terminalServiceId;
|
||||
return json;
|
||||
}
|
||||
//@override
|
||||
init_from_JSON(json) {
|
||||
super.init_from_JSON(...arguments);
|
||||
this.terminalServiceId = json.terminal_service_id;
|
||||
}
|
||||
setTerminalServiceId(id) {
|
||||
this.terminalServiceId = id;
|
||||
}
|
||||
}
|
||||
Registries.Model.extend(Payment, PosAdyenPayment);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue