Commit Graph

18 Commits

Author SHA1 Message Date
oca-travis
98547ec049 [UPD] Update stock_location_zone.pot 2021-09-14 13:37:27 +00:00
OCA-git-bot
86638adec1 [UPD] README.rst 2021-09-14 10:12:05 +00:00
Tran Thanh Phuc
e371b705b8 [MIG] stock_location_zone: Migration to 14.0 2021-02-10 22:15:34 +07:00
OCA Transbot
260dc6cc18 Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-13.0/stock-logistics-warehouse-13.0-stock_location_zone
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_location_zone/
2021-02-10 21:42:11 +07:00
OCA Transbot
40391bdd9d Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: stock-logistics-warehouse-13.0/stock-logistics-warehouse-13.0-stock_location_zone
Translate-URL: https://translation.odoo-community.org/projects/stock-logistics-warehouse-13-0/stock-logistics-warehouse-13-0-stock_location_zone/
2021-02-10 21:42:11 +07:00
OCA-git-bot
5476a4374e [UPD] README.rst 2021-02-10 21:42:11 +07:00
oca-travis
236f078db3 [UPD] Update stock_location_zone.pot 2021-02-10 21:42:11 +07:00
Guewen Baconnier
2f6da0dd28 run pre-commit with new prettiers 2021-02-10 21:42:11 +07:00
Guewen Baconnier
ced75a289d [MIG] stock_location_zone: Migration to 13.0 2021-02-10 21:42:11 +07:00
Guewen Baconnier
855a2ae2f5 [IMP] stock_location_zone: black, isort 2021-02-10 21:42:11 +07:00
oca-travis
acc6eec464 [UPD] Update stock_location_zone.pot 2021-02-10 21:42:11 +07:00
Guewen Baconnier
38b60fbbf7 Add area location relation
So we can use it in group-by and filters. Note that we can have several
levels of areas... only the top-level will be used.

This commit fixes the computed field dependencies:
_compute_location_kind should have a dependency on both it's parent's
location_kind and on its child_ids to know if we are in a bin. This
can't work without triggering an infinite loop. The trick used here is
to split the computation of 'zone_location_id + area_location_id' in one
computed method, and move the computation of the kind in a different
method with triggers an the current record's zone_location +
area_location_id, but not on the parent.

Plus the zone_location_id and area_location_id do not depend anymore on
the parent's kind, which is the reason for the infinite loop.
2021-02-10 21:42:11 +07:00
Guewen Baconnier
a29a178e88 Improve performance
* Compute the 'zone' fields in the same method
* Remove the dependency on 'zone_location_id', which seems to take
  a lot of time if not an infinite loop
2021-02-10 21:42:11 +07:00
Guewen Baconnier
21f2f946e7 Remove unique constraint on location's name
It prevents other addons to work properly such as the vertical lift.
We remove the constraint for now, maybe to be re-introduced later in a
more permissive way.
2021-02-10 21:42:11 +07:00
Akim Juillerat
ef7732288d Rework stock_location_zone 2021-02-10 21:42:11 +07:00
Guewen Baconnier
df90f22386 Set Alpha development status
* Add copyright header
* Add myself as contributor of stock_location_zone
* Fix lint
2021-02-10 21:42:11 +07:00
Guewen Baconnier
bc2babe36d Add corrections to stock_location_zone
* Allow copy of stock locations (was blocked by constraint on unique name)
* Correct loop in _compute_name returning too early if a record had no
parent with a 'location_name_format'
* Rename field pick_type_id to picking_type_id for coherency
* Add missing _description on stock.picking.zone
* Correct location_name_format format when the record is a NewId
2021-02-10 21:42:11 +07:00
Jacques-Etienne Baudoux
8144f4302d [ADD] stock_location_zone 2021-02-10 21:42:11 +07:00