changeset 405f0ae5b65f in modules/stock:5.8
details: https://hg.tryton.org/modules/stock?cmd=changeset;node=405f0ae5b65f
description:
        Add missing inventory to depends of inventory_state

        It is needed to have the inventory field to correctly compute the
        inventory_state value.

        issue9820
        review300911002
        (grafted from b7473de967d65966f9527f0ec8a8138830cb2934)
diffstat:

 inventory.py |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r c1058c9acb0c -r 405f0ae5b65f inventory.py
--- a/inventory.py      Mon Nov 02 16:13:20 2020 +0100
+++ b/inventory.py      Mon Nov 23 23:36:02 2020 +0100
@@ -361,7 +361,8 @@
         'on_change_with_inventory_date',
         searcher='search_inventory_date')
     inventory_state = fields.Function(
-        fields.Selection('get_inventory_states', "Inventory State"),
+        fields.Selection('get_inventory_states', "Inventory State",
+        depends=['inventory']),
         'on_change_with_inventory_state')
 
     @classmethod

Reply via email to