[FIX] stock_putaway_rule_views: Remove required property from fields in putaway rules.

In this module, the product template, variant and category fields were made mandatory. Actually in relocation strategies it is not mandatory to set up a product, so the above mentioned fields should not be mandatory either.

TT48457
This commit is contained in:
pilarvargas-tecnativa
2024-03-22 17:03:44 +01:00
parent c8373e9225
commit 37360beb64

View File

@@ -7,21 +7,19 @@
<field name="inherit_id" ref="stock.stock_putaway_list" />
<field name="arch" type="xml">
<field name="product_id" position="attributes">
<attribute name="readonly">False</attribute>
<attribute
name="attrs"
>{'readonly': [('category_id', '!=', False)], 'required': [('category_id', '=', False),('product_tmpl_id', '=', False)]}</attribute>
>{'readonly': ['|',('category_id', '!=', False), ('product_tmpl_id', '!=', False)]}</attribute>
</field>
<field name="category_id" position="attributes">
<attribute name="readonly">False</attribute>
<attribute
name="attrs"
>{'readonly': ['|', ('product_id', '!=', False), ('product_tmpl_id', '!=', False)], 'required': [('product_id', '=', False),('product_tmpl_id', '=', False)]}</attribute>
>{'readonly': ['|', ('product_id', '!=', False), ('product_tmpl_id', '!=', False)]}</attribute>
</field>
<field name="product_id" position="before">
<field
name="product_tmpl_id"
attrs="{'readonly': [('category_id', '!=', False)], 'required': [('category_id', '=', False), ('product_id', '=', False)]}"
attrs="{'readonly': [('category_id', '!=', False)]}"
options="{'no_create': True, 'no_open': True}"
force_save="1"
/>