changeset 845cc72d2bd8 in modules/stock_inventory_location:default
details: 
https://hg.tryton.org/modules/stock_inventory_location?cmd=changeset;node=845cc72d2bd8
description:
        Remove lost and found from inventory creation wizard

        The lost and found field has been removed from inventory since 
issue9071.

        issue9562
        review319881002
diffstat:

 inventory.py                         |  11 -----------
 view/inventory_create_start_form.xml |   7 +++----
 2 files changed, 3 insertions(+), 15 deletions(-)

diffs (51 lines):

diff -r eb6ab770711e -r 845cc72d2bd8 inventory.py
--- a/inventory.py      Mon May 04 12:31:07 2020 +0200
+++ b/inventory.py      Wed Sep 09 23:28:00 2020 +0200
@@ -10,21 +10,11 @@
     'Create Inventories'
     __name__ = 'stock.inventory.create.start'
     date = fields.Date('Date', required=True)
-    lost_found = fields.Many2One(
-        'stock.location', 'Lost and Found', required=True,
-        domain=[('type', '=', 'lost_found')])
     company = fields.Many2One('company.company', 'Company', required=True,
             select=True)
     locations = fields.Many2Many('stock.location', None, None,
             'Locations', required=True, domain=[('type', '=', 'storage')])
 
-    @classmethod
-    def default_lost_found(cls):
-        Location = Pool().get('stock.location')
-        locations = Location.search(cls.lost_found.domain)
-        if len(locations) == 1:
-            return locations[0].id
-
     @staticmethod
     def default_company():
         return Transaction().context.get('company')
@@ -48,7 +38,6 @@
             to_create.append({
                         'location': location.id,
                         'date': self.start.date,
-                        'lost_found': self.start.lost_found.id,
                         'company': self.start.company.id,
                         })
         if to_create:
diff -r eb6ab770711e -r 845cc72d2bd8 view/inventory_create_start_form.xml
--- a/view/inventory_create_start_form.xml      Mon May 04 12:31:07 2020 +0200
+++ b/view/inventory_create_start_form.xml      Wed Sep 09 23:28:00 2020 +0200
@@ -2,11 +2,10 @@
 <!-- This file is part of Tryton.  The COPYRIGHT file at the top level of
 this repository contains the full copyright notices and license terms. -->
 <form>
-    <label name="lost_found"/>
-    <field name="lost_found"/>
+    <label name="date"/>
+    <field name="date"/>
     <label name="company"/>
     <field name="company"/>
-    <label name="date"/>
-    <field name="date"/>
+
     <field name="locations" colspan="4" view_ids="stock.location_view_list"/>
 </form>

Reply via email to