-
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] stock_barcodes: Migration to 16.0
- Loading branch information
1 parent
cf55c19
commit 5afdd8a
Showing
37 changed files
with
1,125 additions
and
1,229 deletions.
There are no files selected for viewing
This file contains 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 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 was deleted.
Oops, something went wrong.
This file contains 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 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 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 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,19 @@ | ||
/** @odoo-module */ | ||
/* Copyright 2022 Tecnativa - Alexandre D. Díaz | ||
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */ | ||
|
||
const barcodeModels = [ | ||
"stock.barcodes.action", | ||
"stock.picking", | ||
"stock.picking.type", | ||
"wiz.candidate.picking", | ||
"wiz.stock.barcodes.new.lot", | ||
"wiz.stock.barcodes.read", | ||
"wiz.stock.barcodes.read.inventory", | ||
"wiz.stock.barcodes.read.picking", | ||
"wiz.stock.barcodes.read.todo", | ||
]; | ||
|
||
export function isAllowedBarcodeModel(modelName) { | ||
return barcodeModels.indexOf(modelName) !== -1; | ||
} |
This file contains 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,17 @@ | ||
/** @odoo-module */ | ||
/* Copyright 2018-2019 Sergio Teruel <sergio.teruel@tecnativa.com>. | ||
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */ | ||
|
||
import {BooleanToggleField} from "@web/views/fields/boolean_toggle/boolean_toggle_field"; | ||
import {registry} from "@web/core/registry"; | ||
|
||
class BarcodeBooleanToggleField extends BooleanToggleField { | ||
onChange(newValue) { | ||
super.onChange(newValue); | ||
requestIdleCallback(() => { | ||
document.activeElement.blur(); | ||
}); | ||
} | ||
} | ||
|
||
registry.category("fields").add("barcode_boolean_toggle", BarcodeBooleanToggleField); |
This file contains 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,15 @@ | ||
/** @odoo-module */ | ||
/* Copyright 2021 Tecnativa - Alexandre D. Díaz | ||
* License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). */ | ||
|
||
import {FormController} from "@web/views/form/form_controller"; | ||
import {patch} from "@web/core/utils/patch"; | ||
|
||
patch(FormController.prototype, "Allow display.controlPanel overriding", { | ||
setup() { | ||
this._super(...arguments); | ||
if (this.props.context.control_panel_hidden) { | ||
this.display.controlPanel = false; | ||
} | ||
}, | ||
}); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.