-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[16.0][IMP] sale_order_line_cancel: Allow to decrease product_uom_qty on line cancel #3757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
OCA-git-bot
merged 1 commit into
OCA:16.0
from
mt-software-de:16-sale_order_line_cancel-decrease-product_uom_qty
Jul 9, 2025
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,5 @@ | ||
| from . import sale_order_line | ||
| from . import stock_move | ||
| from . import sale_order | ||
| from . import res_company | ||
| from . import res_config_settings |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Copyright 2025 Michael Tietz (MT Software) <mtietz@mt-software.de> | ||
| # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
| from odoo import fields, models | ||
|
|
||
|
|
||
| class ResCompany(models.Model): | ||
| _inherit = "res.company" | ||
|
|
||
| on_sale_line_cancel_decrease_line_qty = fields.Boolean( | ||
| "On sale order line cancel decrease line quantity", | ||
| help="On canceling the remaining qty to deliver of an order line " | ||
| "it decreases the initial quantity", | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| # Copyright 2025 Michael Tietz (MT Software) <mtietz@mt-software.de> | ||
| # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). | ||
| from odoo import fields, models | ||
|
|
||
|
|
||
| class ResConfigSettings(models.TransientModel): | ||
| _inherit = "res.config.settings" | ||
|
|
||
| on_sale_line_cancel_decrease_line_qty = fields.Boolean( | ||
| related="company_id.on_sale_line_cancel_decrease_line_qty", readonly=False | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
sale_order_line_cancel/views/res_config_settings_views.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| <?xml version='1.0' encoding='utf-8' ?> | ||
| <odoo> | ||
| <record id="res_config_settings_form_view" model="ir.ui.view"> | ||
| <field name="name">res.config.settings.form.view</field> | ||
| <field name="model">res.config.settings</field> | ||
| <field name="inherit_id" ref="sale.res_config_settings_view_form" /> | ||
| <field name="arch" type="xml"> | ||
| <xpath expr="//div[@id='proforma_configuration']" position="after"> | ||
| <div | ||
| class="col-12 col-lg-6 o_setting_box" | ||
| id="line_cancel_decrease_qty_configuration" | ||
| > | ||
| <div class="o_setting_left_pane"> | ||
| <field name="on_sale_line_cancel_decrease_line_qty" /> | ||
| </div> | ||
| <div class="o_setting_right_pane"> | ||
| <label for="on_sale_line_cancel_decrease_line_qty" /> | ||
| <div class="text-muted"> | ||
| On canceling the remaining qty to deliver of an order line it decreases the initial quantity | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </xpath> | ||
| </field> | ||
| </record> | ||
| </odoo> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.