Skip to content
Health
60/100
fair
  • Security25/25
    No findings
  • Activity25/25
    Last human commit 1 month ago
  • Required by5/25
    0 modules depend on it
  • Maturity5/25
    In 1 Odoo series since 17.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.12 MB
Module directory on disk
Code analysis 0 migration notes 5 models 4 views 0 HTTP endpoints

Description

This module allows to mark a POS order as fully paid while writing off the difference to a pre-defined account.

A new "Mark as Paid" button is displayed on the POS payment screen. You configure the write-off thresholds per Point of Sale: a percentage of the order total and an amount. An order can be marked as paid only if the write-off amount does not exceed any of these thresholds.

The write-off is shown on the receipt, on the POS order, in the session report, and as a separate line on the invoice of an invoiced order. When the session is closed, the write-offs of the orders that are not invoiced are booked on the write-off account.

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 4

XML IDNameModelTypeStatus
pos_order_view_form pos.order form Inherits point_of_sale.view_pos_pos_form
pos_order_view_tree pos.order tree Inherits point_of_sale.view_pos_order_tree
report_saledetails report_saledetails ir.ui.view qweb Inherits point_of_sale.report_saledetails
res_config_settings_view_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 5

New fields (5)
  • mark_paid_account_id Many2one → account.account
    check_company=True domain="[('deprecated', '=', False), ('account_type', 'not in', ('asset_receivable', 'liability_payable', 'off_balance'))]" help='Account that receives the written-off residual amounts.' string='Write-off Account' args: 'account.account'
  • mark_paid_enabled Boolean
    help='Allow cashiers to settle a cash order paid slightly short and write off the residual' string='Mark as Paid'
  • mark_paid_label Char
    help="Label of the write-off line on the receipt and on the invoice, e.g. 'Extra discount'." string='Receipt Label'
  • mark_paid_max_amount Monetary
    currency_field='currency_id' help='Maximum write-off amount. 0 means no limit.' string='Max Write-off Amount'
  • mark_paid_max_percent Float
    help='Maximum write-off, in percent of the order total including taxes. 0 means no limit.' string='Max Write-off (%)'
Public methods (0)

No public methods.

New fields (1)
  • write_off_amount Monetary
    copy=False currency_field='currency_id' help='Residual amount not received from the customer and written off with Mark as Paid.' readonly=True string='Write-off Amount'
Public methods (1)
  • add_payment(self, data)
    Add the write-off back to Total Paid after core resets it. :param dict data: values of the new payment

New fields (0)

No new fields.

Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • get_sale_details(self, date_start=False, date_stop=False, config_ids=False, session_ids=False)
    @api.model
    Add the total write-off of the reported orders. :param str date_start: start of the period, default today 00:00:00 :param str date_stop: end of the period, default date_start + 23:59:59 :param list config_ids: ids of the Points of Sale to include :param list session_ids: ids of the sessions to include :return: sale details with ``write_off_total`` :rtype: dict

New fields (6)
  • mark_paid_currency_id Many2one
    related='pos_config_id.currency_id' string='Mark as Paid Currency'
  • pos_mark_paid_account_id Many2one
    readonly=False related='pos_config_id.mark_paid_account_id'
  • pos_mark_paid_enabled Boolean
    readonly=False related='pos_config_id.mark_paid_enabled'
  • pos_mark_paid_label Char
    readonly=False related='pos_config_id.mark_paid_label'
  • pos_mark_paid_max_amount Monetary
    currency_field='mark_paid_currency_id' readonly=False related='pos_config_id.mark_paid_max_amount'
  • pos_mark_paid_max_percent Float
    readonly=False related='pos_config_id.mark_paid_max_percent'
Public methods (0)

No public methods.