Repository
OCA/sale-workflow · module folder · Try on Runboat
Module version
1.1.1
Category
Sales
Folder size
0.06 MB
License
AGPL-3
Application
No
Auto-installable
No
Website
https://github.com/OCA/sale-workflow
Last tracking update
2026-08-07 08:42:48
Authors
Camptocamp, ACSONE SA/NV, Odoo Community Association (OCA), BCIM, Okia, MT Software
Maintainers
Camptocamp, ACSONE SA/NV, Odoo Community Association (OCA), BCIM, Okia, MT Software
Committers
Michael Tietz, Weblate, OCA-git-bot, oca-ci, David Gallay
Odoo dependencies
Python dependencies
None
System dependencies
None
Required by
sale_order_line_cancel_sale_stock
Description
This module allows you to cancel the remaining quantity on sale order by
adding a dedicated action to sale lines. It also add two new fields to
track canceled and remaining to deliver quantities.

This module differs from the original odoo behavior in the following
way:

- In odoo, if the update of the quantity ordered is allowed on the sale
  order at the confirmed state, odoo will recompute the required stock
  operations according to the new quantity. This change is possible even
  the stock operations are started for this sale order line.
- In this module, you can either decide if only the canceled quantity
  gets tracked or if it also should decrease the original ordered
  quantity.

Code Analysis

Views touched (5)
XML IDNameModelTypeStatus
res_config_settings_form_view res.config.settings.form.view res.config.settings form Inherits sale.res_config_settings_view_form
sale_order_form_view sale.order form Inherits sale.view_order_form
sale_order_line_cancel_view_form sale.order.line.cancel form New
sale_order_line_tree_view sale.order.line tree Inherits sale.view_order_line_tree
sale_order_line_view_form_readonly sale.order.line form Inherits sale.sale_order_line_view_form_readonly
HTTP endpoints (0)

No HTTP endpoints found for this module.

Models touched (5)

New fields (1)
  • on_sale_line_cancel_decrease_line_qty Boolean
    help='On canceling the remaining qty to deliver of an order line it decreases the initial quantity' args: 'On sale order line cancel decrease line quantity'
Public methods (0)

No public methods.

New fields (1)
  • on_sale_line_cancel_decrease_line_qty Boolean
    readonly=False related='company_id.on_sale_line_cancel_decrease_line_qty'
Public methods (0)

No public methods.

New fields (0)

No new fields.

Public methods (1)
  • action_draft(self)

New fields (3)
  • can_cancel_remaining_qty Boolean
    compute='_compute_can_cancel_remaining_qty'
  • product_qty_canceled Float
    copy=False digits='Product Unit of Measure' readonly=True args: 'Qty canceled'
  • product_qty_remains_to_deliver Float
    compute='_compute_product_qty_remains_to_deliver' digits='Product Unit of Measure' store=True string='Remains to deliver'
Public methods (2)
  • cancel_remaining_qty(self)
  • write(self, values)

New fields (0)

No new fields.

Public methods (1)
  • cancel_remaining_qty(self)

Loading…

Loading…

Status
Open migration PR — not merged yet for this version
CI status
green — ready to merge
Open since
29 days ago
Last activity
29 days ago
Repository
OCA/sale-workflow
Pull request
[19.0] [MIG] sale_order_line_cancel : Migration to 19.0 (#4485)