Repository
odoo/odoo · module folder
Module version
2.0
Category
Hidden
Folder size
8.72 MB
License
LGPL-3
Application
No
Auto-installable
No
Website
None
Last tracking update
2026-08-15 22:44:20
Authors
Odoo S.A.
Maintainers
Odoo S.A.
Committers
Xavier Morel, Xavier ALT, Raphael Collet, Odoo Translation Bot, Aaron Bohy, qsm-odoo, Julien Castiaux, Victor Feyens, Tiffany Chang (tic), Gorash, Mathieu Duckerts-Antoine, William Braeckman, Miquel Raïch, Antoine Vandevenne (anv), Hubert Van De Walle, Valentin Chevalier, nni-odoo, Louis Wicket (wil), Pedram (PEBR), Victor Piryns (pivi), Gauthier Wala (gawa), Andrew Gavgavian, Levi Siuzdak (sile), Dylan Kiss (dyki), Jinane Maksoud, Valeriya(vchu), Brieuc-brd, Louis (loti), Julien Carion (juca), kcv-odoo, dere-odoo, Lina (liew), Patricia Daloze (pda), Manushi Shah, dija-odoo, nni@odoo.com, Pierre Lamotte (pila), Anton Romanova (roan), Shrey Mehta, Mahdi Alijani (malj), Krzysztof Magusiak (krma), utma-odoo, Elier Ayala Bernal, josm-odoo, adip-odoo, Nisarg (nipl), Lionel Piraux (lipi), livaios, Ravij Parikh, Pilar Vargas, Arnav Varshney, Mazen, saurabh, Woojang (WOPY), Julien (jdeh), Do Anh Duy, chpa-odoo, panj-odoo
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
account_payment, payment_adyen, payment_aps, payment_asiapay, payment_authorize, payment_buckaroo, payment_custom, payment_demo, payment_dpo, payment_ecpay, payment_flutterwave, payment_iyzico, payment_mercado_pago, payment_mollie, payment_nuvei, payment_paymob, payment_paypal, payment_payu, payment_razorpay, payment_redsys, payment_stripe, payment_toss_payments, payment_worldline, payment_xendit, sale_transaction_form_link, website_sale_acquirer_confirm_order, website_sale_charge_payment_fee
Description

Code Analysis

Views touched (40)
XML IDNameModelTypeStatus
availability_report_records availability_report_records ir.ui.view qweb New
payment.availability_report payment.availability_report ir.ui.view qweb New
payment.availability_report_button payment.availability_report_button ir.ui.view qweb New
payment.company_mismatch_warning Company Mismatch Warning ir.ui.view qweb New
payment.confirm payment.confirm ir.ui.view qweb New
payment.express_checkout Payment Express Checkout ir.ui.view qweb New
payment.form Payment Form ir.ui.view qweb New
payment.form_icon Form Icon ir.ui.view qweb New
payment.form_logo Form Logo ir.ui.view qweb New
payment.method_form Payment Method Form ir.ui.view qweb New
payment.no_pms_available_warning payment.no_pms_available_warning ir.ui.view qweb New
payment.pay payment.pay ir.ui.view qweb New
payment.payment_methods Payment Methods ir.ui.view qweb New
payment.payment_status Payment Status ir.ui.view qweb New
payment.portal_breadcrumb payment.portal_breadcrumb ir.ui.view qweb New
payment.state_header payment.state_header ir.ui.view qweb New
payment.submit_button Submit Button ir.ui.view qweb New
payment.summary_item payment.summary_item ir.ui.view qweb New
payment.token_form Payment Token Form ir.ui.view qweb New
payment_capture_wizard_view_form payment.capture.wizard.form payment.capture.wizard form New
payment_link_wizard_view_form payment.link.wizard.form payment.link.wizard form New
payment_method_form payment.method.form payment.method form New
payment_method_kanban payment.method.kanban payment.method kanban New
payment_method_search payment.method.search payment.method search New
payment_method_tree payment.method.list payment.method list New
payment_provider_form payment.provider.form payment.provider form New
payment_provider_kanban payment.provider.kanban payment.provider kanban New
payment_provider_list payment.provider.list payment.provider list New
payment_provider_search payment.provider.search payment.provider search New
payment_token_form payment.token.form payment.token form New
payment_token_list payment.token.list payment.token list New
payment_token_search payment.token.search payment.token search New
payment_transaction_form payment.transaction.form payment.transaction form New
payment_transaction_graph payment.transaction.graph payment.transaction graph New
payment_transaction_kanban payment.transaction.kanban payment.transaction kanban New
payment_transaction_list payment.transaction.list payment.transaction list New
payment_transaction_pivot payment.transaction.pivot payment.transaction pivot New
payment_transaction_search payment.transaction.search payment.transaction search New
portal_my_home_payment Payment Methods ir.ui.view qweb Inherits portal.portal_my_home
view_partners_form_payment_defaultcreditcard view.res.partner.form.payment.defaultcreditcard res.partner form Inherits base.view_partner_form
HTTP endpoints (7)
Route(s)HandlerAuthTypeMethodsFlags
/payment/archive_token PaymentPortal.archive_token user jsonrpc ALL sudo
/payment/confirmation PaymentPortal.payment_confirm public http GET sudo website
/my/payment_method PaymentPortal.payment_method user http GET sudo website
/payment/pay PaymentPortal.payment_pay public http GET sudo website
/payment/transaction PaymentPortal.payment_transaction public jsonrpc ALL
/payment/status PaymentPostProcessing.display_status public http ALL website
/payment/status/poll PaymentPostProcessing.poll_status public jsonrpc ALL
Models touched (11)

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (12)
  • amount_to_capture Monetary
    compute='_compute_amount_to_capture' readonly=False store=True
  • authorized_amount Monetary
    compute='_compute_authorized_amount' string='Authorized Amount'
  • available_amount Monetary
    compute='_compute_available_amount' string='Maximum Capture Allowed'
  • captured_amount Monetary
    compute='_compute_captured_amount' string='Already Captured'
  • currency_id Many2one
    related='transaction_ids.currency_id'
  • has_draft_children Boolean
    compute='_compute_has_draft_children'
  • has_remaining_amount Boolean
    compute='_compute_has_remaining_amount'
  • is_amount_to_capture_valid Boolean
    compute='_compute_is_amount_to_capture_valid'
  • support_partial_capture Boolean
    compute='_compute_support_partial_capture' compute_sudo=True help="Whether each of the transactions' provider supports the partial capture."
  • transaction_ids Many2many → payment.transaction
    comodel_name='payment.transaction' default=<expr> readonly=True
  • void_remaining_amount Boolean
  • voided_amount Monetary
    compute='_compute_voided_amount' string='Already Voided'
Public methods (1)
  • action_capture(self)

New fields (10)
  • amount Monetary
    currency_field='currency_id' required=True
  • amount_max Monetary
    currency_field='currency_id'
  • company_id Many2one → res.company
    compute='_compute_company_id' args: 'res.company'
  • currency_id Many2one → res.currency
    args: 'res.currency'
  • link Char
    compute='_compute_link' string='Payment Link'
  • partner_email Char
    related='partner_id.email'
  • partner_id Many2one → res.partner
    args: 'res.partner'
  • res_id Integer
    required=True args: 'Related Document ID'
  • res_model Char
    required=True args: 'Related Document Model'
  • warning_message Char
    compute='_compute_warning_message'
Public methods (1)
  • default_get(self, fields)
    @api.model

New fields (16)
  • active Boolean
    default=True string='Active'
  • brand_ids One2many → payment.method
    comodel_name='payment.method' help='The brands of the payment methods that will be displayed on the payment form.' inverse_name='primary_payment_method_id' string='Brands'
  • code Char
    help='The technical code of this payment method.' required=True string='Code'
  • image Image
    help='The base image used for this payment method; in a 64x64 px format.' max_height=64 max_width=64 required=True string='Image'
  • image_payment_form Image
    max_height=30 max_width=45 related='image' store=True string='The resized image displayed on the payment form.'
  • is_primary Boolean
    compute='_compute_is_primary' search='_search_is_primary' string='Is Primary Payment Method'
  • name Char
    required=True string='Name' translate=True
  • primary_payment_method_id Many2one → payment.method
    comodel_name='payment.method' help='The primary payment method of the current payment method, if the latter is a brand.\nFor example, "Card" is the primary payment method of the card brand "VISA".' index='btree_not_null' string='Primary Payment Method'
  • provider_ids Many2many → payment.provider
    comodel_name='payment.provider' help='The list of providers supporting this payment method.' string='Providers'
  • sequence Integer
    default=1 string='Sequence'
  • support_express_checkout Boolean
    help='Express checkout allows customers to pay faster by using a payment method that provides all required billing and shipping information, thus allowing to skip the checkout process.' string='Express Checkout'
  • support_manual_capture Selection
    default='none' help='The payment is authorized and captured in two steps instead of one.' required=True selection=[('none', 'Unsupported'), ('full_only', 'Full Only'), ('partial', 'Full & Partial')] string='Manual Capture'
  • support_refund Selection
    default='none' help='Refund is a feature allowing to refund customers directly from the payment in Odoo.' required=True selection=[('none', 'Unsupported'), ('full_only', 'Full Only'), ('partial', 'Full & Partial')] string='Refund'
  • support_tokenization Boolean
    help='Tokenization is the process of saving the payment details as a token that can later be reused without having to enter the payment details again.' string='Tokenization'
  • supported_country_ids Many2many → res.country
    comodel_name='res.country' help='The list of countries in which this payment method can be used (if the provider allows it). In other countries, this payment method is not available to customers.' string='Countries'
  • supported_currency_ids Many2many → res.currency
    comodel_name='res.currency' context={'active_test': False} help='The list of currencies for that are supported by this payment method (if the provider allows it). When paying with another currency, this payment method is not available to customers.' string='Currencies'
Public methods (1)
  • write(self, vals)

New fields (32)
  • allow_express_checkout Boolean
    help='This controls whether customers can use express payment methods. Express checkout enables customers to pay with Google Pay and Apple Pay from which address information is collected at payment.' string='Allow Express Checkout'
  • allow_tokenization Boolean
    help="This controls whether customers can save their payment methods as payment tokens.\nA payment token is an anonymous link to the payment method details saved in the\nprovider's database, allowing the customer to reuse it for a next purchase." string='Allow Saving Payment Methods'
  • auth_msg Html
    default=<expr> help='The message displayed if payment is authorized' string='Authorize Message' translate=True
  • available_country_ids Many2many → res.country
    column1='payment_id' column2='country_id' comodel_name='res.country' help='The countries in which this payment provider is available. Leave blank to make it available in all countries.' relation='payment_country_rel' string='Countries'
  • available_currency_ids Many2many → res.currency
    column1='payment_provider_id' column2='currency_id' comodel_name='res.currency' compute='_compute_available_currency_ids' context={'active_test': False} help='The currencies available with this payment provider. Leave empty not to restrict any.' readonly=False relation='payment_currency_rel' store=True string='Currencies'
  • cancel_msg Html
    default=<expr> help='The message displayed if the order is cancelled during the payment process' string='Cancelled Message' translate=True
  • capture_manually Boolean
    help='Capture the amount from Odoo, when the delivery is completed.\nUse this if you want to charge your customers cards only when\nyou are sure you can ship the goods to them.' string='Capture Amount Manually'
  • code Selection
    default='none' help='The technical code of this payment provider.' required=True selection=[('none', 'No Provider Set')] string='Code'
  • color Integer
    compute='_compute_color' help='The color of the card in kanban view' store=True string='Color'
  • company_id Many2one → res.company
    comodel_name='res.company' default=<expr> index=True required=True string='Company'
  • done_msg Html
    default=<expr> help='The message displayed if the order is successfully done after the payment process' string='Done Message' translate=True
  • express_checkout_form_view_id Many2one → ir.ui.view
    comodel_name='ir.ui.view' domain=[('type', '=', 'qweb')] help="The template rendering the express payment methods' form." ondelete='restrict' string='Express Checkout Form Template'
  • image_128 Image
    max_height=128 max_width=128 string='Image'
  • inline_form_view_id Many2one → ir.ui.view
    comodel_name='ir.ui.view' domain=[('type', '=', 'qweb')] help='The template rendering the inline payment form when making a direct payment' ondelete='restrict' string='Inline Form Template'
  • is_published Boolean
    copy=False help='Whether the provider is visible on the website or not. Tokens remain functional but are only visible on manage forms.' string='Published'
  • main_currency_id Many2one
    help='The main currency of the company, used to display monetary fields.' related='company_id.currency_id'
  • maximum_amount Monetary
    currency_field='main_currency_id' help='The maximum payment amount that this payment provider is available for. Leave blank to make it available for any payment amount.' string='Maximum Amount'
  • module_id Many2one → ir.module.module
    comodel_name='ir.module.module' string='Corresponding Module'
  • module_state Selection
    related='module_id.state' string='Installation State'
  • module_to_buy Boolean
    related='module_id.to_buy' string='Odoo Enterprise Module'
  • name Char
    required=True string='Name' translate=True
  • payment_method_ids Many2many → payment.method
    comodel_name='payment.method' string='Supported Payment Methods'
  • pending_msg Html
    default=<expr> help='The message displayed if the order pending after the payment process' string='Pending Message' translate=True
  • pre_msg Html
    help='The message displayed to explain and help the payment process' string='Help Message' translate=True
  • redirect_form_view_id Many2one → ir.ui.view
    comodel_name='ir.ui.view' domain=[('type', '=', 'qweb')] help='The template rendering a form submitted to redirect the user when making a payment' ondelete='restrict' string='Redirect Form Template'
  • sequence Integer
    help='Define the display order' string='Sequence'
  • state Selection
    copy=False default='disabled' help='In test mode, a fake payment is processed through a test payment interface.\nThis mode is advised when setting up the provider.' required=True selection=[('disabled', 'Disabled'), ('enabled', 'Enabled'), ('test', 'Test Mode')] string='State'
  • support_express_checkout Boolean
    compute='_compute_feature_support_fields' string='Express Checkout'
  • support_manual_capture Selection
    compute='_compute_feature_support_fields' selection=[('full_only', 'Full Only'), ('partial', 'Partial')] string='Manual Capture Supported'
  • support_refund Selection
    compute='_compute_feature_support_fields' help='Refund is a feature allowing to refund customers directly from the payment in Odoo.' selection=[('none', 'Unsupported'), ('full_only', 'Full Only'), ('partial', 'Full & Partial')] string='Refund'
  • support_tokenization Boolean
    compute='_compute_feature_support_fields' string='Tokenization'
  • token_inline_form_view_id Many2one → ir.ui.view
    comodel_name='ir.ui.view' domain=[('type', '=', 'qweb')] help='The template rendering the inline payment form when making a payment by token.' ondelete='restrict' string='Token Inline Form Template'
Public methods (7)
  • action_reset_credentials(self)
    Reset the credentials of the provider, disable it, and unpublish it. Note: self.ensure_one() :return: The result of the write operation. :rtype: bool
  • action_start_onboarding(self, menu_id=None)
    Start the provider-specific onboarding. Providers implementing a specific onboarding must override this method and return the action to run the onboarding. :param int menu_id: The menu from which the onboarding is started, as an `ir.ui.menu` id. :return: The onboarding action. :rtype: dict
  • action_toggle_is_published(self)
    Toggle the field `is_published`. :return: None :raise UserError: If the provider is disabled.
  • action_view_payment_methods(self)
  • button_immediate_install(self)
    Install the module and reload the page. Note: `self.ensure_one()` :return: The action to reload the page. :rtype: dict
  • create(self, vals_list)
    @api.model_create_multi
  • write(self, vals)

New fields (10)
  • active Boolean
    default=True string='Active'
  • company_id Many2one
    index=True related='provider_id.company_id' store=True
  • partner_id Many2one → res.partner
    comodel_name='res.partner' index=True required=True string='Partner'
  • payment_details Char
    help="The clear part of the payment method's payment details." string='Payment Details'
  • payment_method_code Char
    related='payment_method_id.code' string='Payment Method Code'
  • payment_method_id Many2one → payment.method
    comodel_name='payment.method' readonly=True required=True string='Payment Method'
  • provider_code Selection
    related='provider_id.code' string='Provider Code'
  • provider_id Many2one → payment.provider
    comodel_name='payment.provider' required=True string='Provider'
  • provider_ref Char
    help='The provider reference of the token of the transaction.' required=True string='Provider Reference'
  • transaction_ids One2many → payment.transaction
    comodel_name='payment.transaction' inverse_name='token_id' string='Payment Transactions'
Public methods (3)
  • create(self, vals_list)
    @api.model_create_multi
  • get_linked_records_info(self)
    Return a list of information about records linked to the current token. For a module to implement payments and link documents to a token, it must override this method and add information about linked document records to the returned list. The information must be structured as a dict with the following keys: - `description`: The description of the record's model (e.g. "Subscription"). - `id`: The id of the record. - `name`: The name of the record. - `url`: The url to access the record. Note: `self.ensure_one()` :return: The list of information about the linked document records. :rtype: list
  • write(self, vals)
    Prevent unarchiving tokens and handle their archiving. :return: The result of the call to the parent method. :rtype: bool :raise UserError: If at least one token is being unarchived.

New fields (32)
  • amount Monetary
    currency_field='currency_id' readonly=True required=True string='Amount'
  • child_transaction_ids One2many → payment.transaction
    comodel_name='payment.transaction' help='The child transactions of the transaction.' inverse_name='source_transaction_id' readonly=True string='Child Transactions'
  • company_id Many2one
    index=True related='provider_id.company_id' store=True
  • currency_id Many2one → res.currency
    comodel_name='res.currency' readonly=True required=True string='Currency'
  • is_live Boolean
    help='Whether the transaction happened in a production environment. False for transactions created before this tracking was implemented.' string='Production Environment'
  • is_post_processed Boolean
    help='Has the payment been post-processed' string='Is Post-processed'
  • landing_route Char
    help='The route the user is redirected to after the transaction' string='Landing Route'
  • last_state_change Datetime
    default=fields.Datetime.now readonly=True string='Last State Change Date'
  • operation Selection
    index=True readonly=True selection=[('online_redirect', 'Online payment with redirection'), ('online_direct', 'Online direct payment'), ('online_token', 'Online payment by token'), ('validation', 'Validation of the payment method'), ('offline', 'Offline payment by token'), ('refund', 'Refund')] string='Operation'
  • partner_address Char
    string='Address'
  • partner_city Char
    string='City'
  • partner_country_id Many2one → res.country
    comodel_name='res.country' string='Country'
  • partner_email Char
    string='Email'
  • partner_id Many2one → res.partner
    comodel_name='res.partner' ondelete='restrict' readonly=True required=True string='Customer'
  • partner_lang Selection
    selection=_lang_get string='Language'
  • partner_name Char
    string='Partner Name'
  • partner_phone Char
    string='Phone'
  • partner_state_id Many2one → res.country.state
    comodel_name='res.country.state' string='State'
  • partner_zip Char
    string='Zip'
  • payment_method_code Char
    related='payment_method_id.code' string='Payment Method Code'
  • payment_method_id Many2one → payment.method
    comodel_name='payment.method' readonly=True required=True string='Payment Method'
  • primary_payment_method_id Many2one → payment.method
    comodel_name='payment.method' compute='_compute_primary_payment_method_id' string='Primary Payment Method'
  • provider_code Selection
    related='provider_id.code' string='Provider Code'
  • provider_id Many2one → payment.provider
    comodel_name='payment.provider' readonly=True required=True string='Provider'
  • provider_reference Char
    help='The provider reference of the transaction' readonly=True string='Provider Reference'
  • reference Char
    help='The internal reference of the transaction' readonly=True required=True string='Reference'
  • refunds_count Integer
    compute='_compute_refunds_count' string='Refunds Count'
  • source_transaction_id Many2one → payment.transaction
    comodel_name='payment.transaction' help='The source transaction of the related child transactions' index='btree_not_null' readonly=True string='Source Transaction'
  • state Selection
    copy=False default='draft' index=True readonly=True required=True selection=[('draft', 'Draft'), ('pending', 'Pending'), ('authorized', 'Authorized'), ('done', 'Confirmed'), ('cancel', 'Canceled'), ('error', 'Error')] string='Status'
  • state_message Text
    help='The complementary information message about the state' readonly=True string='Message'
  • token_id Many2one → payment.token
    comodel_name='payment.token' domain='[("provider_id", "=", "provider_id")]' index='btree_not_null' ondelete='restrict' readonly=True string='Payment Token'
  • tokenize Boolean
    help='Whether a payment token should be created when post-processing the transaction' string='Create Token'
Public methods (6)
  • action_capture(self)
    Open the partial capture wizard if it is supported by the related providers, otherwise capture the transactions immediately. :return: The action to open the partial capture wizard, if supported. :rtype: action.act_window|None
  • action_post_process(self)
    Trigger the post-processing of the transactions. :return: A client action to soft-reload the view. :rtype: dict
  • action_refund(self, amount_to_refund=None)
    Check the state of the transactions and request their refund. :param float amount_to_refund: The amount to be refunded. :return: None
  • action_view_refunds(self)
    Return the windows action to browse the refund transactions linked to the transaction. Note: `self.ensure_one()` :return: The window action to browse the refund transactions. :rtype: dict
  • action_void(self)
    Check the state of the transaction and request to have them voided.
  • create(self, vals_list)
    @api.model_create_multi

New fields (0)

No new fields.

Public methods (1)
  • create(self, vals_list)
    @api.model_create_multi

New fields (3)
  • active_provider_id Many2one → payment.provider
    comodel_name='payment.provider' compute='_compute_active_provider_id' string='Active Provider'
  • has_enabled_provider Boolean
    compute='_compute_has_enabled_provider' string='Has Enabled Provider'
  • onboarding_payment_module Selection
    compute='_compute_onboarding_payment_module' selection=[('mercado_pago', 'Mercado Pago'), ('razorpay', 'Razorpay'), ('stripe', 'Stripe')] string='Onboarding Payment Module'
Public methods (1)
  • action_view_active_provider(self)

New fields (2)
  • is_mercado_pago_supported_country Boolean
    compute='_compute_provider_support'
  • is_stripe_supported_country Boolean
    compute='_compute_provider_support'
Public methods (0)

No public methods.

New fields (2)
  • payment_token_count Integer
    compute='_compute_payment_token_count' string='Payment Token Count'
  • payment_token_ids One2many → payment.token
    comodel_name='payment.token' inverse_name='partner_id' string='Payment Tokens'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…