Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Point of Sale

Entity: pos.payment.method

Compute Method: _compute_qr

View 18.0
Inputs Method Outputs
  • payment_method_type
  • company_id
  • company_id.currency_id
  • company_id.currency_id.id
+ for pm in self:
+             if pm.payment_method_type != "qr_code":
+                 pm.default_qr = False
+                 continue
+             try:
+                 # Generate QR without amount that can then be used when the POS is offline
+                 pm.default_qr = pm.get_qr_code(False, '', '', pm.company_id.currency_id.id, False)
+             except UserError:
+                 pm.default_qr = False
  • default_qr

Back to entity