Sale stock exception

sale_exception_nostock
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/10.0/sale_exception_nostock
VERSION
VERSION 1.2.0
CATEGORY
CATEGORYsale
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSPedro M. Baeza, Denis Roussel
WEBSITE
WEBSITEhttps://github.com/OCA/sale-workflow
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:19:56
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/sale-workflow:
    - sale_exception
OCA/server-tools:
    - base_exception
odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web_kanban
    - web
    - bus
    - web_tour
    - account
    - product
    - decimal_precision
    - report
    - analytic
    - web_planner
    - procurement
    - sale_stock
    - stock_account
    - stock
    - barcodes
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Sale stock exception
--------------------

This addon adds two new sales exceptions to be used by the `sale_exception`
addon:

* The first one ensures that an order line can be delivered on the delivery
  date if it is in MTS. Validation is done by using the order line location via
  related shop and using the line delay.

* The second one will create a sales exception if the current SO will break a
  sales order already placed in the future.

The second test will only look for stock moves that pass by the line location,
so if your stock have children or if you have configured automated stock
actions they must pass by the location related to the SO line, else they will
be ignored.

If the module sale_owner_stock_sourcing is installed, each sale order line can
specify a stock owner. In that case, the owner will be used when computing the
virtual stock availability. For this to work correctly,
https://github.com/odoo/odoo/issues/5814 needs to be fixed (fixes are proposed
both for odoo and OCB).

**Warning:**

The second test is a workaround to compensate the lack of
stock reservation process in OpenERP. This can be a performance killer
and should not be be used if you have hundreds of simultaneous open SO.

Code Analysis

Views touched (0)

No views found for this module.

Models touched (1)

New fields (0)

No new fields.

Public methods (2)
  • can_command_at_delivery_date(self)
    @api.multi
    Predicate that checks whether a SO line can be delivered at delivery date. The delivery date is computed using date of the order + line delay. The source location is predicted with a logic similar to the one that will be used for real. :return: True if line can be delivered on time
  • future_orders_are_affected(self)
    @api.multi
    Predicate function that is a naive workaround for the lack of stock reservation. This can be a performance killer, you should not use it if you have constantly a lot of running Orders :return: True if future order are affected by current command line
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/9.0/sale_exception_nostock
VERSION
VERSION 1.2.0
CATEGORY
CATEGORYsale
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSPedro M. Baeza, Stéphane Bidoul (ACSONE), Atchuthan, Sodexis
WEBSITE
WEBSITEhttp://www.camptocamp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:15:20
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/sale-workflow:
    - sale_exception
odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web_kanban
    - web
    - bus
    - account
    - product
    - decimal_precision
    - report
    - analytic
    - web_tip
    - web_planner
    - procurement
    - sale_stock
    - stock_account
    - stock
    - barcodes
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Sale stock exception
--------------------

This addon adds two new sales exceptions to be used by the `sale_exception`
addon:

* The first one ensures that an order line can be delivered on the delivery
  date if it is in MTS. Validation is done by using the order line location via
  related shop and using the line delay.

* The second one will create a sales exception if the current SO will break a
  sales order already placed in the future.

The second test will only look for stock moves that pass by the line location,
so if your stock have children or if you have configured automated stock
actions they must pass by the location related to the SO line, else they will
be ignored.

If the module sale_owner_stock_sourcing is installed, each sale order line can
specify a stock owner. In that case, the owner will be used when computing the
virtual stock availability. For this to work correctly,
https://github.com/odoo/odoo/issues/5814 needs to be fixed (fixes are proposed
both for odoo and OCB).

**Warning:**

The second test is a workaround to compensate the lack of
stock reservation process in OpenERP. This can be a performance killer
and should not be be used if you have hundreds of simultaneous open SO.

Code Analysis

Views touched (0)

No views found for this module.

Models touched (1)

New fields (0)

No new fields.

Public methods (2)
  • can_command_at_delivery_date(self)
    @api.multi
    Predicate that checks whether a SO line can be delivered at delivery date. The delivery date is computed using date of the order + line delay. The source location is predicted with a logic similar to the one that will be used for real. :return: True if line can be delivered on time
  • future_orders_are_affected(self)
    @api.multi
    Predicate function that is a naive workaround for the lack of stock reservation. This can be a performance killer, you should not use it if you have constantly a lot of running Orders :return: True if future order are affected by current command line
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/8.0/sale_exception_nostock
VERSION
VERSION 1.2.0
CATEGORY
CATEGORYsale
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSStéphane Bidoul, Yannick Vaucher, Alexandre Fayolle, Leonardo Pistone, Pedro M. Baeza, Stéphane Bidoul (ACSONE), OCA Transbot, oca-travis, Weblate
WEBSITE
WEBSITEhttp://www.camptocamp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:11:22
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/sale-workflow:
    - sale_exceptions
odoo/odoo:
    - sale
    - sales_team
    - base
    - mail
    - base_setup
    - web_kanban
    - web
    - web_kanban_sparkline
    - account_voucher
    - account
    - product
    - decimal_precision
    - report
    - analytic
    - board
    - edi
    - email_template
    - procurement
    - sale_stock
    - stock_account
    - stock
    - web_kanban_gauge
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Sale stock exception
--------------------

This addon adds two new sales exceptions to be used by the `sale_exception`
addon:

* The first one ensures that an order line can be delivered on the delivery
  date if it is in MTS. Validation is done by using the order line location via
  related shop and using the line delay.

* The second one will create a sales exception if the current SO will break a
  sales order already placed in the future.

The second test will only look for stock moves that pass by the line location,
so if your stock have children or if you have configured automated stock
actions they must pass by the location related to the SO line, else they will
be ignored.

If the module sale_owner_stock_sourcing is installed, each sale order line can
specify a stock owner. In that case, the owner will be used when computing the
virtual stock availability. For this to work correctly,
https://github.com/odoo/odoo/issues/5814 needs to be fixed (fixes are proposed
both for odoo and OCB).

**Warning:**

The second test is a workaround to compensate the lack of
stock reservation process in OpenERP. This can be a performance killer
and should not be be used if you have hundreds of simultaneous open SO.

Code Analysis

Views touched (0)

No views found for this module.

Models touched (1)

New fields (0)

No new fields.

Public methods (2)
  • can_command_at_delivery_date(self)
    @api.multi
    Predicate that checks whether a SO line can be delivered at delivery date. The delivery date is computed using date of the order + line delay. The source location is predicted with a logic similar to the one that will be used for real. :return: True if line can be delivered on time
  • future_orders_are_affected(self)
    @api.multi
    Predicate function that is a naive workaround for the lack of stock reservation. This can be a performance killer, you should not use it if you have constantly a lot of running Orders :return: True if future order are affected by current command line
REPOSITORY
REPOSITORYOCA/sale-workflow
GIT
GIThttps://github.com/OCA/sale-workflow.git
GIT FOLDER
GIT FOLDERhttps://github.com/OCA/sale-workflow/tree/7.0/sale_exception_nostock
VERSION
VERSION 0.1
CATEGORY
CATEGORYsale
LICENSE
LICENSEAGPL-3
APPLICATION
APPLICATIONNo
AUTO-INSTALLABLE
AUTO-INSTALLABLENo
AUTHORS
AUTHORSOdoo Community Association (OCA), Camptocamp
MAINTAINERS
MAINTAINERSCamptocamp
COMMITTERS
COMMITTERSGuewen Baconnier, Lorenzo Battistini, Alexandre Fayolle, unknown
WEBSITE
WEBSITEhttp://www.camptocamp.com
LAST TRACKING UPDATE
LAST TRACKING UPDATE2026-07-06 00:07:13
ODOO DEPENDENCIES
ODOO DEPENDENCIES OCA/sale-workflow:
    - sale_exceptions
odoo/odoo:
    - sale
    - account_voucher
    - account
    - base_setup
    - base
    - web_kanban
    - web
    - product
    - process
    - decimal_precision
    - mail
    - analytic
    - board
    - edi
    - email_template
    - sale_stock
    - stock
    - procurement
PYTHON DEPENDENCIES
PYTHON DEPENDENCIES Not have
SYSTEM DEPENDENCIES
SYSTEM DEPENDENCIES Not have
DESCRIPTION
DESCRIPTION
Sale stock exception
--------------------

This addon adds two new sales exceptions to be used by the `sale_exception`
addon:

* The first one ensures that an order line can be delivered on the delivery
  date if it is in MTS. Validation is done by using the order line location via
  related shop and using the line delay.

* The second one will create a sales exception if the current SO will break a
  sales order already placed in the future.

The second test will only look for stock moves that pass by the line location,
so if your stock have children or if you have configured automated stock
actions they must pass by the location related to the SO line, else they will
be ignored.

**Warning:**

The second test is a workaround to compensate the lack of
stock reservation process in OpenERP. This can be a performance killer
and should not be be used if you have hundreds of simultaneous open SO.

Code Analysis

Views touched (0)

No views found for this module.

Models touched (1)

New fields (0)

No new fields.

Public methods (2)
  • can_command_at_delivery_date(self, cr, uid, l_id, context=None)
    Predicate that checks whether a SO line can be delivered at delivery date. Delivery date is computed using date of the order + line delay. Location is taken from the shop linked to the line :return: True if line can be delivered on time
  • future_orders_are_affected(self, cr, uid, l_id, context=None)
    Predicate function that is a naive workaround for the lack of stock reservation. This can be a performance killer, you should not use it if you have constantly a lot of running Orders :return: True if future order are affected by current command line