Initial commit: Odoo 18.0-20251222 extra-addons
This commit is contained in:
4
sale_product_identification/wizards/__init__.py
Executable file
4
sale_product_identification/wizards/__init__.py
Executable file
@@ -0,0 +1,4 @@
|
||||
# Copyright 2025 Binhex <https://www.binhex.cloud>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
from . import wizard_confirm_identification
|
||||
17
sale_product_identification/wizards/wizard_confirm_identification.py
Executable file
17
sale_product_identification/wizards/wizard_confirm_identification.py
Executable file
@@ -0,0 +1,17 @@
|
||||
# Copyright 2025 Binhex <https://www.binhex.cloud>
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
|
||||
|
||||
from odoo import fields, models
|
||||
|
||||
|
||||
class ConfirmIdentification(models.TransientModel):
|
||||
_name = "confirm.identification"
|
||||
_description = "Confirm Identification Wizard"
|
||||
|
||||
order_ids = fields.Many2many("sale.order", string="Orders")
|
||||
message = fields.Text()
|
||||
|
||||
def confirm_identification(self):
|
||||
ctx = dict(self.env.context, not_verify_optional_identification=True)
|
||||
self.order_ids.with_context(**ctx).action_confirm()
|
||||
31
sale_product_identification/wizards/wizard_confirm_identification.xml
Executable file
31
sale_product_identification/wizards/wizard_confirm_identification.xml
Executable file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<odoo>
|
||||
<record id="confirm_identification_view" model="ir.ui.view">
|
||||
<field name="name">Confirm identifications</field>
|
||||
<field name="model">confirm.identification</field>
|
||||
<field name="arch" type="xml">
|
||||
<form string="Confirm identifications">
|
||||
<group>
|
||||
<field name="order_ids" invisible="1" />
|
||||
<field name="message" readonly="1" nolabel="1" />
|
||||
</group>
|
||||
<footer>
|
||||
<button
|
||||
string="Confirm"
|
||||
name="confirm_identification"
|
||||
type="object"
|
||||
default_focus="1"
|
||||
class="btn-primary"
|
||||
data-hotkey="q"
|
||||
/>
|
||||
<button
|
||||
string="Cancel"
|
||||
class="btn-secondary"
|
||||
special="cancel"
|
||||
data-hotkey="x"
|
||||
/>
|
||||
</footer>
|
||||
</form>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user