summaryrefslogtreecommitdiff
path: root/addons/stock/wizard/stock_change_product_qty_views.xml
blob: 84bd3aefea4392da2199eddf0b97fab8023e1d9c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?xml version="1.0" encoding="utf-8"?>
<odoo>
    <data>
        <record id="view_change_product_quantity" model="ir.ui.view">
            <field name="name">Change Product Quantity</field>
            <field name="model">stock.change.product.qty</field>
            <field name="arch" type="xml">
                <form string="Update Product Quantity">
                    <group>
                        <field name="product_tmpl_id" invisible="1"/>
                        <field name="product_variant_count" invisible="1"/>
                        <field name="product_id" widget="selection"
                            domain="[('product_tmpl_id', '=', product_tmpl_id)]"
                            attrs="{'invisible': [('product_variant_count', '=', 1)]}"
                            invisible="context.get('default_product_id')"
                            readonly="context.get('default_product_id')"/>
                        <field name="new_quantity"/>
                    </group>
                    <footer>
                        <button name="change_product_qty" string="Apply" type="object" class="btn-primary"/>
                        <button string="Cancel" class="btn-secondary" special="cancel"/>
                    </footer>
                </form>
            </field>
        </record>

        <record id="action_change_product_quantity" model="ir.actions.act_window">
            <field name="name">Change Product Quantity</field>
            <field name="res_model">stock.change.product.qty</field>
            <field name="view_mode">form</field>
            <field name="target">new</field>
        </record>
    </data>
</odoo>