summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2022-08-31 16:32:02 +0700
committerIT Fixcomart <it@fixcomart.co.id>2022-08-31 16:32:02 +0700
commit1e8c8cf61497f7bc67b8282c34641474107e9d8e (patch)
tree2a20fa6b59d70cf89b3cb11b3853dae936864e8a
parente06fd148cb6872b1e9d864e16e63b845b5bb8878 (diff)
Add field account_id condition show and required when internal_use
-rw-r--r--indoteknik_custom/views/stock_picking.xml8
1 files changed, 7 insertions, 1 deletions
diff --git a/indoteknik_custom/views/stock_picking.xml b/indoteknik_custom/views/stock_picking.xml
index d2c1b26f..9081a58e 100644
--- a/indoteknik_custom/views/stock_picking.xml
+++ b/indoteknik_custom/views/stock_picking.xml
@@ -15,7 +15,13 @@
/>
</field>
<field name="origin" position="after">
- <field name="account_id"/>
+ <field name="account_id"
+ attrs="{
+ 'readonly': [['state', 'in', ['done', 'cancel']]],
+ 'invisible': [['is_internal_use', '=', False]],
+ 'required': [['is_internal_use', '=', True]]
+ }"
+ />
</field>
</field>
</record>