# Moving lots in a location outside the warehouse with intrastat module

**URL:** <https://discuss.tryton.org/t/moving-lots-in-a-location-outside-the-warehouse-with-intrastat-module/6324>\
**Category:** User\
**Created:** [July 7, 2023, 11:10am UTC](https://discuss.tryton.org/t/moving-lots-in-a-location-outside-the-warehouse-with-intrastat-module/6324 "2023-07-07T11:10:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![maxx](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/maxx/32/2320_2.png) [@maxx](https://discuss.tryton.org/u/maxx)\
**Post date:** [July 7, 2023, 11:10am UTC](https://discuss.tryton.org/t/moving-lots-in-a-location-outside-the-warehouse-with-intrastat-module/6324/1 "2023-07-07T11:10:41Z")

</div>

Hi,

We have defined a specific view “Quarantine Location” outside our warehouse (to avoid stock quantities for items in this location). When we have a problem with a lot we move his location under the quarantine view.

We have an android app to manage stocks and doing internal moves quickly with barcode scanning.  
User met a problem to move a lot to the location in quarantine because of intrastat module. Indeed, quarantine view has no address (because outside of warehouse) and then instrastat raise a warning there is no country for the move.

How to bypass this warning ([modules/account\_stock\_eu/stock.py · branch/default · Tryton / Tryton · GitLab](https://foss.heptapod.net/tryton/tryton/-/blob/branch/default/modules/account_stock_eu/stock.py#L241)) in our application to do the move?

When doing such thing, exception is caught, but the move is not done:

```auto
        try:
            Move.do(moves)
        except CountryNotFound as w:
            pass

```

How to continue the process in the “do” method after the exception is raised?

How do you deal with a quarantine location ?

---

<div class="post-metadata">

**Author:** ![maxx](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/maxx/32/2320_2.png) [@maxx](https://discuss.tryton.org/u/maxx)\
**Post date:** [July 10, 2023, 1:42pm UTC](https://discuss.tryton.org/t/moving-lots-in-a-location-outside-the-warehouse-with-intrastat-module/6324/2 "2023-07-10T13:42:14Z")

</div>

Solved using this decorator with route:

```auto
@app.route(...)
@with_pool
@with_transaction(context={'_skip_warnings': True})
...

```

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [July 10, 2023, 1:57pm UTC](https://discuss.tryton.org/t/moving-lots-in-a-location-outside-the-warehouse-with-intrastat-module/6324/3 "2023-07-10T13:57:00Z")

</div>

Skipping the warning does not sound good because you may skip also other warnings.

Indeed I think we should have a way to get the country of such location outside the warehouse.  
Maybe by allowing address on storage location without a warehouse.

---

<div class="post-metadata">

**Author:** ![maxx](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/maxx/32/2320_2.png) [@maxx](https://discuss.tryton.org/u/maxx)\
**Post date:** [July 10, 2023, 2:01pm UTC](https://discuss.tryton.org/t/moving-lots-in-a-location-outside-the-warehouse-with-intrastat-module/6324/4 "2023-07-10T14:01:39Z")

</div>

> [@ced](#):
>
> Indeed I think we should have a way to get the country of such location outside the warehouse.  
> Maybe by allowing address on storage location without a warehouse.

Indeed, this would be a better solution 🙂  
Anyway, wondering where such ‘Quarantine storage zone’ should be located. Indeed, products should not be part of the stock quantities but products are still there in the warehouse. So maybe i’m wrong to define such location outside the warehouse ?  
Did someone else using a “Quarantine Location” ? Where do you locate such place ?

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [July 10, 2023, 3:18pm UTC](https://discuss.tryton.org/t/moving-lots-in-a-location-outside-the-warehouse-with-intrastat-module/6324/5 "2023-07-10T15:18:01Z")

</div>

For me you could put the location under the warehouse but not under the storage location.

---

<div class="post-metadata">

**Author:** ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)\
**Post date:** [August 9, 2023, 3:18pm UTC](https://discuss.tryton.org/t/moving-lots-in-a-location-outside-the-warehouse-with-intrastat-module/6324/6 "2023-08-09T15:18:34Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
