|
1 | 1 | <?xml version="1.0" encoding="UTF-8" ?> |
2 | | -<!-- Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>) |
3 | | - Frank Cespedes <fcespedes@nuobit.com> |
4 | | - Eric Antones <eantones@nuobit.com> |
| 2 | +<!-- Copyright NuoBiT Solutions - Frank Cespedes <fcespedes@nuobit.com> |
| 3 | + Copyright NuoBiT Solutions - Eric Antones <eatones@nuobit.com> |
| 4 | + Copyright 2025 NuoBiT Solutions - Deniz Gallo <dgallo@nuobit.com> |
5 | 5 | License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) --> |
6 | 6 | <odoo> |
7 | 7 | <record id="stock_inventory_line_tree" model="ir.ui.view"> |
8 | | - <field name="name">stock.inventory.line.tree</field> |
9 | | - <field name="model">stock.inventory.line</field> |
10 | | - <field name="inherit_id" ref="stock.stock_inventory_line_tree" /> |
| 8 | + <field name="name">stock.inventory.list</field> |
| 9 | + <field name="model">stock.inventory</field> |
| 10 | + <field name="inherit_id" ref="stock.view_inventory_group_tree" /> |
11 | 11 | <field name="arch" type="xml"> |
12 | 12 | <xpath expr="//field[@name='prod_lot_id']" position="before"> |
13 | 13 | <field name="is_lot_required" invisible="1" /> |
14 | 14 | </xpath> |
15 | 15 | <xpath expr="//field[@name='prod_lot_id']" position="attributes"> |
16 | | - <attribute name="attrs">{'readonly': ['|', '|', |
17 | | - ('product_tracking', '=', 'none'), |
18 | | - ('is_editable', '=', False), |
19 | | - ('state', '!=', 'confirm')], |
20 | | - 'required': [('is_lot_required', '!=', False), ('is_editable', '=', True), ('state', '=', 'confirm')]} |
21 | | - </attribute> |
| 16 | + <attribute |
| 17 | + name="readonly" |
| 18 | + >product_tracking == none or is_editable == False or state != 'confirm'</attribute> |
| 19 | + <attribute |
| 20 | + name="readonly" |
| 21 | + >is_lot_required != False and is_editable == True and state == 'confirm'</attribute> |
22 | 22 | </xpath> |
23 | 23 | </field> |
24 | 24 | </record> |
|
0 commit comments