Skip to content
Health
80/100
good
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 5 months ago
  • Required by5/25
    0 modules depend on it
  • Maturity25/25
    In 6 Odoo series since 11.0

Heuristic over the facts below, not an audit · How it's computed

Security findings
Grave / minor (static analysis)
Required by
0
Modules depending on it
External deps
0 pip · 0 bin
Python packages / system binaries
License
AGPL-3
No conflicts with its dependencies
Folder size
0.24 MB
Module directory on disk
Code analysis 0 migration notes 6 models 3 views 0 HTTP endpoints

Description

This module extends the functionnality of the Odoo Point of Sale to allow the cashier to change the payments of a PoS order.

This feature is usefull when the user realized that he did a mistake, just after he marked the order as paid, or during the close of the session, Only if entries has not been generated.

Dependencies

Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
None

Code analysis

Extracted from the source by best-effort static analysis (no code is executed); details may be incomplete.

Views touched 3

XML IDNameModelTypeStatus
view_pos_order_form pos.order form Inherits point_of_sale.view_pos_pos_form
view_pos_payment_change_wizard_form pos.payment.change.wizard form New
view_res_config_settings_form res.config.settings form Inherits point_of_sale.res_config_settings_view_form

HTTP endpoints 0

No HTTP endpoints found for this module.

Models touched 6

New fields (1)
  • payment_change_policy Selection
    default='refund' help="Payment Change Policy when users want to change the payment lines of a given PoS Order.\n* 'Refund and Resale': Odoo will refund the current Pos Order to cancel it, and create a new PoS Order with the correct payment lines.\n* 'Update Payments': Odoo will change payment lines.\n\nNote : In some countries the 'Update Payments' Option is not allowed by law, because orders history shouldn't not be altered." required=True selection=_PAYMENT_CHANGE_POLICY_SELECTION
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • change_payment(self, payment_lines)
    Change payment of a given order. payment_lines should be a list of data that are the argument of the Odoo Core function add_payment() Return a list of order ids, depending on the payment_change_policy of the related pos_config.

New fields (4)
  • amount_total Float
    readonly=True string='Total'
  • new_line_ids One2many → pos.payment.change.wizard.new.line
    comodel_name='pos.payment.change.wizard.new.line' inverse_name='wizard_id' string='New Payment Lines'
  • old_line_ids One2many → pos.payment.change.wizard.old.line
    comodel_name='pos.payment.change.wizard.old.line' inverse_name='wizard_id' readonly=True string='Old Payment Lines'
  • order_id Many2one → pos.order
    comodel_name='pos.order' readonly=True string='Order'
Public methods (2)
  • button_change_payment(self)
  • default_get(self, fields)
    @api.model

New fields (5)
  • amount Monetary
    currency_field='company_currency_id' default=0.0 required=True
  • available_payment_method_ids Many2many → pos.payment.method
    comodel_name='pos.payment.method' related='wizard_id.order_id.session_id.payment_method_ids'
  • company_currency_id Many2one → res.currency
    comodel_name='res.currency' help='Utility field to express amount currency' readonly=True related='new_payment_method_id.company_id.currency_id' store=True string='Company Currency'
  • new_payment_method_id Many2one → pos.payment.method
    comodel_name='pos.payment.method' domain="[('id', 'in', available_payment_method_ids)]" required=True string='Payment Method'
  • wizard_id Many2one → pos.payment.change.wizard
    comodel_name='pos.payment.change.wizard' ondelete='cascade' required=True
Public methods (1)
  • default_get(self, fields)
    @api.model

New fields (4)
  • amount Monetary
    currency_field='company_currency_id' default=0.0 readonly=True required=True
  • company_currency_id Many2one → res.currency
    comodel_name='res.currency' help='Utility field to express amount currency' readonly=True related='old_payment_method_id.company_id.currency_id' store=True string='Company Currency'
  • old_payment_method_id Many2one → pos.payment.method
    comodel_name='pos.payment.method' readonly=True required=True string='Payment Method'
  • wizard_id Many2one → pos.payment.change.wizard
    comodel_name='pos.payment.change.wizard' ondelete='cascade' required=True
Public methods (0)

No public methods.

New fields (1)
  • pos_payment_change_policy Selection
    readonly=False related='pos_config_id.payment_change_policy'
Public methods (0)

No public methods.

Loading…

Loading…

Loading…

Loading…

Loading…

Loading…