Code Analysis

Views touched (9)
XML IDNameModelTypeStatus
pay pay ir.ui.view qweb New
pay_confirmation pay_confirmation ir.ui.view qweb New
pay_summary pay_summary ir.ui.view qweb New
payment_transaction_form payment.transaction.form payment.transaction form Inherits payment.payment_transaction_form
pos_payment_method_view_form_inherit_pos_online_payment pos.payment.method.form.inherit.pos_online_payment pos.payment.method form Inherits point_of_sale.pos_payment_method_view_form
pos_payment_method_view_tree_inherit_pos_online_payment pos.payment.method.list.inherit.pos_online_payment pos.payment.method list Inherits point_of_sale.pos_payment_method_view_tree
res_config_settings_view_form res.config.settings.view.form.inherit.pos.online.payment res.config.settings form Inherits point_of_sale.res_config_settings_view_form
view_account_payment_form_inherit_pos_online_payment view.account.payment.form.inherit.pos_online_payment account.payment form Inherits account.view_account_payment_form
view_pos_payment_form pos.payment.form pos.payment form Inherits point_of_sale.view_pos_payment_form
HTTP endpoints (3)
Route(s)HandlerAuthTypeMethodsFlags
/pos/pay/<int:pos_order_id> PaymentPortal.pos_order_pay public http GET sudo website
/pos/pay/confirmation/<int:pos_order_id> PaymentPortal.pos_order_pay_confirmation public http GET sudo website
/pos/pay/transaction/<int:pos_order_id> PaymentPortal.pos_order_pay_transaction public jsonrpc ALL website
Models touched (7)

New fields (1)
  • pos_order_id Many2one → pos.order
    help='The Point of Sale order linked to this payment' readonly=True string='POS Order' args: 'pos.order'
Public methods (1)
  • action_view_pos_order(self)
    Return the action for the view of the pos order linked to the payment.

New fields (1)
  • pos_order_id Many2one → pos.order
    help='The Point of Sale order linked to the payment transaction' readonly=True string='POS Order' args: 'pos.order'
Public methods (1)
  • action_view_pos_order(self)
    Return the action for the view of the pos order linked to the transaction.

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (2)
  • next_online_payment_amount Float
    digits=0 required=False string='Next online payment amount to pay'
  • online_payment_method_id Many2one → pos.payment.method
    compute='_compute_online_payment_method_id' args: 'pos.payment.method'
Public methods (2)
  • get_amount_unpaid(self)
  • get_and_set_online_payments_data(self, next_online_payment_amount=False)
    Allows to update the amount to pay for the next online payment and get online payments already made and how much remains to be paid. If next_online_payment_amount is different than False, updates the next online payment amount, otherwise, the next online payment amount is unchanged. If next_online_payment_amount is 0 and the order has no successful online payment, is in draft state, is not a restaurant order and the pos.config has no trusted config, then the order is deleted from the database, because it was probably added for the online payment flow.

New fields (1)
  • online_account_payment_id Many2one → account.payment
    readonly=True string='Online accounting payment' args: 'account.payment'
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (4)
  • has_an_online_payment_provider Boolean
    compute='_compute_has_an_online_payment_provider' readonly=True
  • is_online_payment Boolean
    default=False help='Use this payment method for online payments (payments made on a web page with online payment providers)' string='Online Payment'
  • online_payment_provider_ids Many2many → payment.provider
    domain="[('is_published', '=', True), ('state', 'in', ['enabled', 'test'])]" string='Allowed Providers' args: 'payment.provider'
  • type Selection
    selection_add=[('online', 'Online')]
Public methods (2)
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (0)

No new fields.

Public methods (0)

No public methods.

Loading…

Loading…