Fix Odoo 18 compatibility: Enable notebook widget and fix context references
- Uncomment and activate notebook widget in machine form view - Fix context reference from 'active_id' to 'id' for Odoo 18 compatibility - Remove duplicate category_icon field in form group - Clean up XML structure and indentation - Enable "Nutzungsprodukte" and "Einweisungsprodukte" tabs with editable lists - Resolve access rights inconsistency error for product_ids field Fixes module upgrade error: "Field 'active_id' does not exist in model 'ows.machine'"
This commit is contained in:
parent
5c7fd4330d
commit
f07f9dd8b3
|
|
@ -33,13 +33,10 @@
|
|||
<field name="category_icon" string="⚙" readonly="1"/>
|
||||
<field name="name"/>
|
||||
<field name="category"/>
|
||||
<field name="category_icon" string="⚙" readonly="1"/>
|
||||
<field name="code"/>
|
||||
<field name="area_id"/>
|
||||
|
||||
</group>
|
||||
<group>
|
||||
|
||||
<field name="description"/>
|
||||
<field name="storage_location"/>
|
||||
<field name="purchase_price"/>
|
||||
|
|
@ -47,23 +44,23 @@
|
|||
<field name="active"/>
|
||||
</group>
|
||||
|
||||
<!-- Neue
|
||||
<!-- Notebook für Produkte und Einweisungen -->
|
||||
<notebook>
|
||||
<page string="Nutzungsprodukte">
|
||||
<field name="product_ids" context="{'default_machine_id': active_id}">
|
||||
<field name="product_ids" context="{'default_machine_id': id}">
|
||||
<list editable="bottom">
|
||||
<field name="product_id" domain="[('categ_id.name', '=', 'Maschinennutzung')]" />
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
<page string="Einweisungsprodukte">
|
||||
<field name="training_ids" context="{'default_machine_id': context.get('active_id', False)}"/>
|
||||
<field name="training_ids" context="{'default_machine_id': id}">
|
||||
<list editable="bottom">
|
||||
<field name="training_id" domain="[('categ_id.name', 'in', ['Einweisungen', 'Kurse'])]" />
|
||||
</list>
|
||||
</field>
|
||||
</page>
|
||||
</notebook>-->
|
||||
</notebook>
|
||||
</sheet>
|
||||
</form>
|
||||
</field>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user